API reference
The full, interactive API contract is available at:
https://api.alt.advania.ai/docs
That page is generated from the same specification the API server uses, so it is always the source of truth for endpoints, request bodies, response shapes, and error codes.
Base URL
https://api.alt.advania.ai
All endpoints are under /v1/.
Authentication
Send Authorization: Bearer <token> on every request. <token> is either an API key (ygg_…) or a signed-in user session token.
See API keys for how to create keys and what scopes to grant.
Error envelope
All errors follow the OpenAI-compatible envelope:
{
"error": {
"message": "…",
"type": "…",
"param": null,
"code": "…"
}
}
Common error.type values:
type | Meaning |
|---|---|
invalid_request_error | Client-side problem: bad input, missing field |
authentication_error | Missing, invalid, revoked, or expired token |
permission_error | Correct auth but insufficient scope |
rate_limit_error | You exceeded a rate limit — see Retry-After |
guardrail_error | The request was blocked by the platform's guardrails |
server_error | Platform-side problem — retry with backoff |
Common response headers
| Header | Meaning |
|---|---|
x-request-id | This request's identifier |
x-decision-id | Guardrail decision reference |
x-policy-version | Guardrail policy version |
x-ratelimit-* | Rate-limit budget for the endpoint |