Get started
Authentication
Every request carries one API key from the console.
API keys
Create keys in the console. A key is shown once, when you create it; Parsec stores only a hash, so a lost key cannot be recovered. Revoke it and create a new one instead.
Every key can call every model. The request names the model; usage is billed to the account that owns the key.
Sending the key
| Endpoint | Header |
|---|---|
/v1/* (decisions) | Authorization: Bearer $PARSEC_API_KEY or X-API-Key: $PARSEC_API_KEY |
/v1beta/* (Gemini API) | x-goog-api-key: $PARSEC_API_KEY, which Google’s SDK sends for you |
A missing, unknown or revoked key is refused with 401 unauthorized.
Keeping keys safe
- Call the API from your server, not from a browser or mobile app, where the key would be visible to anyone.
- Read the key from an environment variable or a secret manager rather than committing it.
- Use a separate key per service so you can revoke one without touching the others.