OpenAI
OpenAI gives the apps you build access to GPT models for chat and reasoning, embeddings for semantic search, Whisper for speech-to-text transcription, and image generation. Connect it inside a project and the agent can wire those features for that project.
What you get by connecting it
With your OpenAI key connected, the agent can build and wire up:
- GPT chat and reasoning - assistants, summarisers, classifiers, and structured-output features powered by GPT models.
- Embeddings - turn text into vectors for semantic search, "find similar" lists, and recommendations (a natural fit with Postgres/pgvector when Supabase is connected).
- Whisper transcription - convert recorded audio or voice notes into text.
- Image generation - create images from a text prompt inside your app.
The agent builds the feature and can generate a server-side relay. You deploy that relay and provision its runtime key separately; the model prompt never receives your saved connector key.
Connecting it
You need an API key (it starts with sk-proj- or sk-). You can optionally add an organisation ID and a project ID if your account uses them to scope usage.
- Sign in at the OpenAI platform and open the API keys section under your account.
- Create a new secret key and copy it (OpenAI shows the full value only once).
- In the Appsanic project build, select Connectors → OpenAI and enter it. Add the organisation and project IDs only if your OpenAI setup requires them.
The connection applies only to the project where you save it and requires a paid plan. Saved secrets are shown as dots, never the value. Use Test now to re-check the key against OpenAI or Disconnect to remove it from the project.
Keys and security
An OpenAI key is a secret key: anyone holding it can spend your money, so it must never be bundled into an app people download. The generated app must call a narrow server-side relay that holds a dedicated key in its own environment.
The agent can generate a Supabase Edge Function or another backend and wire the app to its URL. Connecting OpenAI does not deploy that function or copy the stored key. Deploy the backend and place a separate OpenAI key directly in its secret manager.
Your managed connector secret is encrypted at rest with AES-256-GCM. Browser JavaScript sees only that it exists; the model prompt never receives the decrypted key, and the agent will never ask you for a key in chat.
Useful links
- OpenAI documentation: https://platform.openai.com/docs
- Appsanic guide: AI Features in Your App
- How connectors work: Connectors Overview
Next
Read AI Features for how to add chat, search, transcription, and image generation to the apps you build.
