Authentication

Base URL https://arteza.ai/api/v1

OpenAPI 3.1 specification, for SDK generators and agents: /api/v1/openapi.json

Official SDKs for TypeScript and Python, a command line and agent skills: SDKs and CLI

Send your key in the Authorization header of every request. Keys start with ark_live_ and are shown once, when you create them.

Authorization: Bearer ark_live_...
HTTP/1.1 401 Unauthorized
X-Request-Id: req_56X-0XttDr5iOugT

{
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "The API key is not valid.",
    "request_id": "req_56X-0XttDr5iOugT",
    "doc_url": "https://arteza.ai/developers/docs/errors#invalid_api_key"
  }
}

Keep keys on your server, never in a browser or app. If a key leaks, revoke it in the console; requests with it stop at once.

You can also lock a key to the IP addresses your servers use: in the console, open API keys and set its allowed IPs. A request from any other address is refused with 403 ip_not_allowed.

Each key can carry its own limits. When you create one in the console you can give it an expiry date and a spend limit per day, week, month or in total. A request past that limit returns 402 key_limit_exceeded, and an expired key returns 401 expired_api_key. A missing, unknown or revoked key also returns 401, so alert on that status instead of retrying. To rotate a key without downtime, create the new key, deploy it, then revoke the old one. For a browser or a mobile app, mint a short-lived client token on your server and never ship the key itself.