Go-live checklist
Credentials
Section titled “Credentials”- API keys live only on your server, in an environment variable or a secret manager. None is in client code, logs or a repository.
- Each key has the projects and spending limit it needs, and no more.
- You know that a key unused for 30 days expires, and keys you rely on are used at least that often.
- Apps that act for other people use OAuth, not your API key.
- If you upload or import files, the upload rights and processing terms are accepted for the credential.
- Every paid start sends
max_cost, or starts from a quote you checked. - You handle
402 insufficient_balance,402 spending_limit_reachedand402 max_cost_exceeded, and showmanage_urlto the account owner where one is given. - You read
cost.chargedoncecost.finalis true, rather than assuming the quoted maximum was charged.
Reliability
Section titled “Reliability”- Every
POST,PATCHandDELETEsends anIdempotency-Key, and a retry reuses the key of the request it repeats. See Idempotency. - You retry only when the response has
Retry-After, and wait that long. See Errors and Rate limits. - You wait for results with webhooks or by polling at
poll_after_seconds, not in a tight loop. - Webhooks verify the signature on the raw body, reject old timestamps, deduplicate on
webhook-idand answer 2xx within 10 seconds. - After downtime you catch up with
GET /v1/events. - Output URLs expire after an hour: you download or store outputs promptly, or read the object again for a fresh URL.
Compatibility
Section titled “Compatibility”- Your code ignores response fields it does not know.
- You log the
Request-Idof failed requests. - You read a model’s
deprecationfield (and theDeprecationandSunsetheaders), and have a plan for itsreplacement. See Versioning.
Content
Section titled “Content”- Your prompts and inputs follow the acceptable use policy, and you handle
403 content_blockedand failed generations. See Moderation and acceptable use.