API Key and Authentication
Every request you send to the i14 API must include a Bearer token in the Authorization header. The token is an API key that you generate from the i14 developer platform. Without a valid key the API returns a 401 error and discards the request - no partial processing occurs. This page shows you how to get a key, attach it to requests, keep it secure, and interpret authentication errors when they arise.
Get your API key
Section titled “Get your API key”- Log in or create an account on the i14 Platform with your email address or Google account.
- Open API Keys.
- If you have a referral code, click Redeem a code and enter it.
- Click Create key.
- Copy the key right away - the dashboard shows the full value only once.
No referral code? Join the waitlist.
Keys are scoped to the models your account has access to. If your key does not have access to a specific model, the API returns a 403 error for that model even if the key is otherwise valid.
Pass Your Key in Requests
Section titled “Pass Your Key in Requests”Include your key as a Bearer token in the Authorization HTTP header on every request.
Authorization: Bearer YOUR_API_KEYcurl https://api.i14.ai/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $I14_API_KEY" \ -d '{ "model": "i14-sugarglider-nemotron3-super-120B-v1", "messages": [ { "role": "user", "content": "Your message here" } ], "max_tokens": 2048 }'import osfrom openai import OpenAI
client = OpenAI( base_url="https://api.i14.ai/v1", api_key=os.environ["I14_API_KEY"],)
response = client.chat.completions.create( model="i14-sugarglider-nemotron3-super-120B-v1", messages=[{"role": "user", "content": "Your message here"}], max_tokens=2048,)
print(response.choices[0].message.content)Replace Your message here with your own prompt.
Keep Your Key Safe
Section titled “Keep Your Key Safe”Your API key grants full access to your i14 account. Follow these practices to protect it:
- Use environment variables. Store the key in
I14_API_KEY(or any name you choose) and read it at runtime. Never hard-code it in source files. - Keep it out of version control. Add
.envfiles and any file containing secrets to your.gitignore. If you use a secrets scanner such asgit-secretsor GitHub secret scanning, enable it on every repository that touches the key. - Rotate immediately if exposed. If you suspect your key has been leaked - for example, committed to a public repo - go to the dashboard, revoke the key, and create a new one. Old keys stop working as soon as you revoke them.
- Create per-environment keys. Use separate keys for development, staging, and production so you can revoke one without affecting the others.
Authentication Errors
Section titled “Authentication Errors”The i14 API returns standard HTTP status codes for authentication and authorization failures. The response body is a JSON error object with a message, a type, and a machine-readable code:
{ "error": { "message": "Model 'example-model' is not available to this API key.", "type": "permission_error", "code": "model_not_allowed" }}| Status | code |
Meaning | Common Cause |
|---|---|---|---|
401 Unauthorized |
missing_api_key |
The request could not be authenticated. | The Authorization header is missing, or the Bearer prefix was omitted. |
401 Unauthorized |
invalid_api_key |
The request could not be authenticated. | The key is wrong or has been revoked. |
403 Forbidden |
model_not_allowed |
The request was authenticated but not authorized. | Your key does not have access to the requested model, or the model ID is misspelled. Use i14-sugarglider-nemotron3-super-120B-v1. |
When you receive a 401, check that:
- The
Authorizationheader is present and formatted asBearer YOUR_API_KEY(note the space afterBearer). - You are using a key from platform.i14.ai and not a key from another provider.
- The key has not been revoked in the dashboard.