Connecting OpenAI
This article covers obtaining an OpenAI API key, fixing common errors, and keeping keys safe. Adding the key in Limb is done under Chatbot → AI Settings (see your AI Settings documentation for that flow).
Before you start: OpenAI’s API needs billing enabled. Have a payment method ready; keys will not work until billing is set up.
Getting your OpenAI API key
Follow these steps in the OpenAI dashboard:
- Open the API keys page — https://platform.openai.com/api-keys (sign in or create an OpenAI account).
- Set up billing — in OpenAI go to Settings → Billing, add a payment method, and set usage limits if you want cost caps.
- Create a secret key — use Create new secret key, give it a clear name (e.g. your site or environment), optionally assign a project, then confirm.
- Copy the key once — it starts with
sk-orsk-proj-. Copy it immediately; OpenAI does not show it again. If you lose it, create a new key and retire the old one in the dashboard.
Important: Without billing, the API returns auth or usage errors even if a key exists. Set usage alerts or budgets under OpenAI Settings → Limits if you want notifications or hard caps.
Troubleshooting
Invalid API key
- Confirm the full key was pasted with no spaces or line breaks.
- Check the key is still active and not rotated or revoked in OpenAI.
- Ensure billing is active and the account is in good standing.
Insufficient quota / rate limit
- You may have hit usage or rate limits; review limits and billing in OpenAI.
- Add credits, raise limits, or wait for the window to reset.
- New accounts sometimes have lower initial rate limits.
Was working, then stopped
- Check usage caps, failed payments, or a revoked key in OpenAI.
- Check the OpenAI status page for outages.
Security best practices
- Never publish keys, paste them in public tickets, or commit them to Git.
- Use clear key names and separate keys for production, staging, and experiments where possible.
- Set budgets and alerts in OpenAI; review usage regularly.
- Revoke any key you believe is exposed and replace it in Limb.
- Keep a secondary key available for failover only if your process allows it—never share it broadly.