Developer documentation
From model selection to your first request.
Compare capabilities and pricing, integrate a model, handle responses and inspect usage.
All chapters
Get started
OverviewAPI keys and authenticationYour first model requestPlayground and request recordsModel API reference
Catalog and configurationsChat CompletionsMessagesImage and video availabilityGuides and troubleshooting
Tools and structured outputStreamingPricing, usage and billingErrorsRate limits and output budgetsRetries and unknown outcomesClients and other APIs
Choose a client or HTTPMembership OAuth and SDKTypeScript SDKOther API indexAgent APIsSigning APIsEvidence APIsAvailability and specification
OpenAPI specificationAPI availabilityWebhook statusPython SDK statusGo SDK statusJava SDK statusBench API status (unavailable)Guides
Understand the core systems
Chat Completions
POST /v1/chat/completions; OpenAI requests, responses, max_tokens and errors.
Messages
POST /v1/messages; Anthropic messages, system prompts and response blocks.
Streaming
SSE, delta, DONE, message_stop, in-stream errors and cancellation.
Tools and structured output
tools, tool_choice, response_format, image input and caching.
Pricing, usage and billing
CNY, Credits, time windows, caches, tiers and refunds.
Errors
400, 401, 402, 403, 404, 409, 429, 503 and request IDs.
OpenAPI specificationDownload machine-readable routes, fields and authentication reference.API availabilityHow to inspect current catalog, capability and price states.Choose a client or HTTPOpenAI/Anthropic clients versus the Acosmi SDK.Membership OAuth and SDKMembership-authorized compliance, separate from model PAYG.