Documentation index for AI agents (llms.txt)
Skip to main content

OpenAI

Power AI features in your site, like a chat assistant, text generation or structured outputs, with your own OpenAI account. Usage is billed to your OpenAI account.

Connect​

  1. Open Settings > Connectors, click OpenAI, then Connect.
  2. platform.openai.com/api-keys opens. Click Create new secret key and copy it.
  3. Come back to WebTwizz. The key is picked up, checked with OpenAI and connected. You can also paste it into API key yourself.

If OpenAI rejects the key, you'll see That key was not accepted. No OpenAI key? Sign in with OpenRouter gets you OpenAI's models and many more in one step. See OpenRouter.

What you see​

OpenAI in a project: the key works, the models it can use, account and model setting
  • Overview:
    • The key works with a Working label, checked when you open it. Check again checks it now. Usage opens your usage on OpenAI. If OpenAI turns the key down, it reads Not accepted: replace the key or check billing. A restricted key without the Models permission still works, but says it can't list models.
    • Test message: Send sends one short message to your model and shows how long the reply took, with Requests left and Tokens left a minute. It uses a few tokens, so it only runs when you press it. If it fails, it says why, like no credit left, a rate limit or a model the key can't use.
  • Model: shows only when your key can't reach the model you picked, so you can pick another under Settings.
  • Live site errors: when your published site logs errors that mention OpenAI, the latest ones, each with the page and when. Ask the AI to fix starts a new chat that asks the AI to find the cause and fix it. Show more loads older ones.
  • Account: the key, shown by its last four characters, with Replace key.
  • Settings: Model, used whenever your app doesn't ask for a specific one. The list shows the models your key can use, newest first, with the recommended one marked.

What the AI can do​

The AI checks that your key works and which models it reaches, then uses those exact model names in your code.

Secrets​

  • OPENAI_API_KEY: your OpenAI API key, server-side only
  • OPENAI_MODEL: the default model, gpt-6-luna unless you pick another

Good to know​

  • Replacing the key under Account switches every project that uses it.
  • Removing OpenAI from a project takes both secrets out. Your OpenAI account is untouched.