Create a key
OpenAI's quickstart says to click "Create an API Key" in the dashboard and store it somewhere safe. SDKs can read it from the OPENAI_API_KEY environment variable, so it never has to appear in code. Detailed dashboard screens were not described in the pages we could read.
Set a spend limit (OpenAI's steps)
- Open Project settings.
- Select Limits.
- Under Spend, click Edit spend limit.
- Enter a Monthly spend limit.
- Optionally turn on "Enforce a hard limit".
- Save.
- Alerts only notify you; they do not stop traffic.
- A hard limit makes requests fail with a 429 error (code project_spend_limit_exceeded), and recorded spend can slightly exceed the limit.
Good habits
OpenAI recommends separate projects for staging and production, each with its own limits, and an expiry date on project keys. See the key safety checklist and key errors.
Using it with GPT Migrator: paste the key in your bot's settings: how hosting works.
Need your GPT running again without ChatGPT?
GPT Migrator can host your instructions and files as a standalone chat page for $47 per month. You bring your own OpenAI or Anthropic API key. It answers from your instructions and files and does not run GPT Actions.
See how hosting worksRelated guides
- OpenAI developers: Quickstart
- OpenAI developers: Spend limits
- OpenAI developers: Production best practices
Pages describing other companies' products reflect their public documentation on the date shown and can go out of date.