OpenAPI
The complete /v1 API is described in an OpenAPI 3.1 document. Use it to browse the reference interactively, to generate clients, or to validate requests.
- Raw specification:
/openapi.yaml - Servers: the document lists
https://api.smartapihub.comas the default server; substitute your deployment's URL. - Security scheme:
bearerAuth(Authorization: Bearer sk-llm-…).
Interactive viewer
The viewer is loaded on demand from a CDN so this page works offline without it.
Endpoint index
Generated from openapi.yaml at build time.
Models
- GET
/v1/modelsList models - GET
/v1/models/{id}Get a model
Text
- POST
/v1/chat/completionsCreate a chat completionIdempotency-Key optional - POST
/v1/completionsCreate a completion (legacy) - POST
/v1/responsesCreate a response (partial Responses API) - POST
/v1/embeddingsCreate embeddings
Images
- POST
/v1/images/generationsGenerate imagesIdempotency-Key optional - POST
/v1/images/editsEdit an imageIdempotency-Key optional
Audio
- POST
/v1/audio/speechGenerate speechIdempotency-Key optional - POST
/v1/audio/transcriptionsTranscribe audio
Video
- POST
/v1/video/generationsSubmit a video generation job202 asyncIdempotency-Key required - GET
/v1/video/generations/{id}Get a video job - DELETE
/v1/video/generations/{id}Cancel or delete a video job
Music
- POST
/v1/music/generationsSubmit a music generation job202 asyncIdempotency-Key required - GET
/v1/music/generations/{id}Get a music job - DELETE
/v1/music/generations/{id}Cancel or delete a music job
Jobs
- GET
/v1/jobs/{id}Get any job by id
Ops
- GET
/healthLiveness - GET
/readyReadiness
Generating a client
bash
# TypeScript (fetch)
curl -sO "$(dirname "$DOCS_URL")/openapi.yaml" # openapi.yaml is served by this docs site && npx openapi-typescript openapi.yaml -o gateway.d.ts
# Any language via OpenAPI Generator
docker run --rm -v "$PWD:/local" openapitools/openapi-generator-cli generate \
-i /local/openapi.yaml -g python -o /local/client-pythonFor chat, embeddings, images and audio the official openai SDKs remain the simplest option — see SDK Examples. Generated clients are most useful for the async video and music job endpoints.