Reference
OpenAPI spec
The full typed spec is at https://api.aigateway.sh/openapi.json. Use it to code-gen clients in any language. Most code-gen tools (openapi-generator, oazapfts, swagger-codegen, Kiota) work without modification.
What the spec covers
/v1/chat/completions,/v1/embeddings,/v1/images/*,/v1/audio/*,/v1/videos/*- Aggregator-native routes —
/v1/models,/v1/jobs/*,/v1/batches,/v1/files - Account + auth —
/v1/keys,/v1/webhook-secret,/v1/usage - Discriminated unions for every polymorphic response (tool calls, content parts)
- Named
errors.*schemas keyed by the error code table
Quick code-gen
# Python — openapi-python-client openapi-python-client generate \ --url https://api.aigateway.sh/openapi.json \ --meta setup # TypeScript — openapi-typescript npx openapi-typescript https://api.aigateway.sh/openapi.json -o aig.d.ts # Go — oapi-codegen oapi-codegen -package aigateway \ https://api.aigateway.sh/openapi.json > aigateway.go
Versioning
The spec is versioned alongside the API — the current stable tag is in info.version. Breaking changes bump the major number and are announced via the model.deprecated webhook at least 90 days in advance.
Why not Postman?
A Postman collection is auto-generated from the OpenAPI spec on every release — grab it from /reference or re-import the spec directly into Postman to get the latest.