Skip to main content
Most requests use your standard API key. Only account endpoints under /v1/account/* use a provisioning key. If you only need to call models, generate embeddings, create images, or use the chat-compatible APIs, your normal API key is enough.

Which key do I use?

Request typeUse this key
Most API requests to models and generation endpointsStandard API key
Administrative requests under /v1/account/*Provisioning key

Standard API requests

Endpoints like Responses, Embeddings, Images, Audio, Moderations, Chat Completions, and Messages accept your standard API key. You can send it in either header:
Authorization: Bearer YOUR_API_KEY
x-api-key: YOUR_API_KEY
Use one header style consistently inside your application. Authorization: Bearer is the best default unless you already rely on x-api-key.

Account endpoints

Endpoints under /v1/account/* require a provisioning key instead of a regular inference key. Use it in the bearer header:
Authorization: Bearer YOUR_PROVISIONING_KEY
These endpoints power administrative actions such as:
  • checking account balance
  • retrieving account activity
  • creating and managing API keys
See Account Management for workflows built on top of those endpoints.

Public or optional-auth endpoints

  • GET /v1/models can be called anonymously or with standard API auth.
  • GET /v1/startups is public metadata and does not require auth.

Standard request example

import requests

response = requests.post(
    "https://api.naga.ac/v1/responses",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "model": "gpt-4.1-mini",
        "input": "Say hello.",
    },
)
response.raise_for_status()

print(response.json()["output"][0]["content"][0]["text"])
If you prefer x-api-key, the same request works with:
x-api-key: YOUR_API_KEY

Account request example

For provisioning-key-protected account endpoints, use the same bearer pattern:
import requests

response = requests.get(
    "https://api.naga.ac/v1/account/balance",
    headers={"Authorization": "Bearer YOUR_PROVISIONING_KEY"},
)
response.raise_for_status()

print(response.json()["balance"])

Common Mistakes

ProblemLikely causeFix
401 Unauthorized on inference endpointsMissing or invalid API keyRecreate or resend a standard API key
401 Unauthorized on /v1/account/*Used a normal API key instead of a provisioning keyUse the provisioning key from the dashboard
Request works in one SDK but not anotherMixed base_url or header configurationEnsure requests go to https://api.naga.ac/v1
Browser-side key leakage riskAPI key embedded in client-side codeMove calls behind your server or trusted backend