Authentication
Every route under /v1 needs an API key. Send it as a bearer token:
Two routes stay public: the service root / and the spec at /openapi.json.
Get a key
Create keys in the developer console at console.milliseconds.ai.
Get your test key
Setup creates a reusable test key named Playground. Open API keys to show or copy it, or create another test key.
Start with test tokens
Test keys share 125 million test tokens per organization each month, on every plan. The Free plan cannot buy credits: upgrade to Starter to use production keys. See Pricing.
Test and production keys
Each key belongs to one organization. Keys of the same type share that organization’s credit pool and rate limits.
Existing sk-ms- keys continue to work as test keys. Their secrets stay unchanged. They cannot spend purchased credits.
Show or copy a key
New test keys are encrypted at rest. Use Show or Copy on the API keys page to retrieve them later.
Production keys remain visible only when created. Only their hashes are stored. Save each production secret in your own secret store when you create it.
Older keys stored only as hashes cannot be recovered, including older test_sk- and legacy sk-ms- keys. They remain valid until revoked.
If you lost an older key, create a new test key. You do not need to revoke working keys to use the new workflow.
Use your workspace key automatically
The console playground uses your signed-in workspace’s test key on the server. You do not need to paste a key.
If an existing workspace has no active recoverable test key, the playground creates a reusable Playground test key when needed.
Demos automatically connect to your signed-in workspace and reuse its test key when the page loads. Automatic selection never supplies a production key.
Enable production access
Your organization must pay for a credit bundle of at least $10. This payment is the only production access requirement.
Auto top-up and a saved credit card are optional. Turning off auto top-up or removing a saved card does not disable production access.
The console disables production key creation until the qualifying bundle is paid. The console links to billing so you can buy credits.
Your lifetime paid spend and the age of your first payment determine the production tier. See Production tiers.
If eligibility changes, existing production keys return 403 production_access_disabled. The console shows a warning on every page while you have production keys without access.
Open Billing to refresh your status. If you have no qualifying purchase, buy a credit bundle of at least $10 to unlock production access. Test keys remain available with their separate allowance.
Need immediate assistance with a higher tier? Reach out to our support team: support@milliseconds.ai.
Keep the key secret. Hold it in an environment variable or a secret store, never in client-side code and never in a public repository. Revoke a leaked key in the console and create a new one.
Send the key
OpenAI clients
Set the client’s API key to your test or production key. Point base_url at https://api.milliseconds.ai/v1. The client then sends the right header itself.
When authentication fails
Next
- Quickstart: your first call, with the header in place.
- Pricing: the monthly test tokens and the price per token.
- Limits and rate limits: the per-organization request and token limits.
- Errors: every code the API returns.