Skip to main content

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:

typeMeaning
invalid_request_errorClient-side problem: bad input, missing field
authentication_errorMissing, invalid, revoked, or expired token
permission_errorCorrect auth but insufficient scope
rate_limit_errorYou exceeded a rate limit — see Retry-After
guardrail_errorThe request was blocked by the platform's guardrails
server_errorPlatform-side problem — retry with backoff

Common response headers

HeaderMeaning
x-request-idThis request's identifier
x-decision-idGuardrail decision reference
x-policy-versionGuardrail policy version
x-ratelimit-*Rate-limit budget for the endpoint