Skip to main content
The Deepshi API is an OpenAI-compatible REST API. The Endpoints section in the sidebar has full per-endpoint reference pages with request/response schemas and an interactive playground.

Base URL

Authentication

All requests require a bearer token:

Authentication

Create a key, send it as a bearer token, and keep it safe.

Errors

Status codes and the JSON error object, with handling tips.

Endpoints

Chat and image requests are synchronous: the response carries the result. Video and music requests are asynchronous: they return a job that you poll until it completes.

Conventions

  • Format: JSON request and response bodies, matching the OpenAI schema.
  • Streaming: Set "stream": true for Server-Sent Events. The final chunk carries a usage object with cost. See Streaming.
  • Usage & cost: Synchronous responses (chat and image) include a usage object; Deepshi adds usage.cost.total_cost, the USD cost of the request, drawn from your balance. Asynchronous video and music jobs do not carry an inline usage.cost; check per-model rates and your balance on deepshi.ai.
  • Errors: Standard HTTP status codes with a JSON error object. See Errors.