Authentication
Every request must include an Authorization header. Two token types are accepted depending on what you are doing.
Token types
| Type | Format | Use for |
|---|---|---|
| API key | sk-ps-<22+ chars> | Inference and usage — scoped to that key only |
| Session token | Bearer <jwt> | Account management: keys, billing, profile |
Creating an API key
API keys can be created from the dashboard or via the API using a session token. See Create API key for the endpoint reference.
Header format
Authorization: Bearer sk-ps-your-api-key-here
Example request
curl https://api.pinstripes.io/v1/models \ -H "Authorization: Bearer sk-ps-..."
Auth failures
A missing or invalid token returns HTTP 401. The response body follows the standard error shape:
{
"error": {
"message": "Invalid API key",
"type": "authentication_error",
"code": 401
}
}