OpenAI

OpenAI-compatible API

Use the OpenAI SDK for models, files and vector stores; see each operation for support and differences.

Base URL

Loading…

Get started

Loading…

Endpoints

MethodPathDescriptionSupport
POST/v1/chat/completionsCreate chat completion● Supported
POST/v1/responsesCreate a response● Supported
GET/v1/responses/{response_id}Retrieve a response● Supported
DELETE/v1/responses/{response_id}Delete a response● Supported
POST/v1/responses/{response_id}/cancelCancel a response◐ Partial
GET/v1/responses/{response_id}/input_itemsList input items● Supported
POST/v1/responses/compactCompact a response○ Unsupported
POST/v1/responses/input_tokensCount input tokens○ Unsupported
POST/v1/conversationsCreate a conversation● Supported
GET/v1/conversations/{conversation_id}Retrieve a conversation● Supported
POST/v1/conversations/{conversation_id}Update a conversation● Supported
DELETE/v1/conversations/{conversation_id}Delete a conversation● Supported
POST/v1/conversations/{conversation_id}/itemsCreate conversation items● Supported
GET/v1/conversations/{conversation_id}/itemsList conversation items● Supported
GET/v1/conversations/{conversation_id}/items/{item_id}Retrieve a conversation item● Supported
DELETE/v1/conversations/{conversation_id}/items/{item_id}Delete a conversation item● Supported
POST/v1/images/generationsCreate an image● Supported
GET/v1/modelsList models● Supported
GET/v1/models/{model}Retrieve model● Supported
POST/v1/embeddingsCreate embeddings● Supported
POST/v1/videosCreate video● Supported
GET/v1/videosList videos● Supported
GET/v1/videos/{video_id}Retrieve video● Supported
GET/v1/videos/{video_id}/contentDownload video content● Supported
DELETE/v1/videos/{video_id}Delete video● Supported
POST/v1/videos/{video_id}/remixRemix video○ Unsupported
POST/v1/audio/transcriptionsTranscribe audio● Supported
POST/v1/filesUpload a file◐ Partial
GET/v1/filesList files● Supported
GET/v1/files/{file_id}Retrieve file● Supported
DELETE/v1/files/{file_id}Delete file● Supported
GET/v1/files/{file_id}/contentRetrieve file content● Supported
POST/v1/audio/speechGenerate speech● Supported
POST/v1/images/editsEdit images● Supported

Vector stores (16 operations): create stores, attach files, manage batches and search.

Unsupported endpoints

These endpoints are unavailable under /openai/v1 and return 404. The alternatives are workflows, not equivalent endpoints.

EndpointAlternative
/v1/moderationsNo alternative endpoint
/v1/batchesCall the required model endpoint individually
/v1/fine_tuningUse an existing model from the catalog
/v1/assistantsBuild sessions with Responses and Conversations
/v1/completionsUse chat/completions
/v1/audio/translationsTranscribe with audio/transcriptions, then translate with chat/completions
/v1/uploadsUpload files with files
/v1/images/variationsSubmit an image and editing prompt with images/edits

Differences from OpenAI

  • Create chat completion:Unknown top-level fields are forwarded unchanged to same-protocol upstream providers, which decide whether to accept them. Declared fields still undergo type and range validation; invalid values return 400 naming the field.
  • Create a response:Unknown top-level fields are forwarded unchanged to same-protocol upstream providers, which decide whether to accept them. Declared fields still undergo type and range validation; invalid values return 400 naming the field.
  • Retrieve a response:Reads a stored response by ID. If it was created with store set to false we did not store it, and the read returns 404 response_not_found; after the retention period (30 days by default) the read returns the same 404.
  • Delete a response:Deletes a stored response by ID immediately. If it was created with store set to false we did not store it, and the delete returns 404 response_not_found.
  • Cancel a response:Available only for responses created with background:true and routed to a model that can generate in the background. Cancel is idempotent — repeated calls return the same terminal response. Cancelling stops us reading the upstream stream; it cannot guarantee that compute already sent upstream stops, and usage is billed for what was actually received. Calling cancel on a non-background (synchronous) response returns 404 object_not_found if the response id does not exist (not stored, expired or wrong id), or 400 native_responses_operation_unsupported if the response exists but its provider does not declare cancel support (none of the upstreams we connect declares it for synchronous responses). Neither case is the not-implemented 501.
  • List input items:Lists the input items of a stored response. Supports limit (1–100, default 20), order (asc/desc, default desc, as in the official API) and cursor pagination by item id with after; has_more / first_id / last_id match the page actually returned, so you can page through without gaps or repeats. Every item carries a server-issued id (msg_ for messages, and each of function_call / function_call_output / reasoning has its own prefix); older data stored before ids existed gets deterministic ids on read, without a destructive migration, so repeated reads with the same cursor stay stable. For a response created with previous_response_id, the list shows the full resolved input: the input and output items of the earlier responses in the chain plus the input submitted this turn; if an ancestor response was not stored on the platform (for example created with store false) or has expired, only this turn's own input is listed. If the response was created with store set to false we did not store it, and the list returns 404 response_not_found.
  • Compact a response:Compacts a response's input into a summary. It depends on OpenAI Responses' official server-side storage (store) semantics, which we have not implemented yet; calling it returns 501 (message “This platform has not implemented … yet.”, with the x-should-retry header set to false), has no side effects, and the official SDK will not retry.
  • Count input tokens:Counts the tokens the request input would consume without generating content. It depends on OpenAI Responses' official server-side storage (store) semantics, which we have not implemented yet; calling it returns 501 (message “This platform has not implemented … yet.”, with the x-should-retry header set to false), has no side effects, and the official SDK will not retry.
  • Create a conversation:Creates a conversation, optionally with initial items (up to 20 at a time) and metadata. Conversations are partitioned by tenant; only the creating tenant can reference it.
  • Retrieve a conversation:Reads a conversation by ID. A conversation that does not exist or belongs to another tenant returns 404 conversation_not_found.
  • Update a conversation:Updates a conversation's metadata — the whole object is replaced, not merged with the existing metadata.
  • Delete a conversation:Deletes a conversation. After deletion neither the conversation nor its items can be referenced again (including as the conversation parameter of Responses create).
  • Create conversation items:Appends items to a conversation (up to 20 at a time) and returns the items just added.
  • List conversation items:Lists a conversation's items in creation order, with limit / after / order pagination.
  • Retrieve a conversation item:Reads a single item of a conversation by ID.
  • Delete a conversation item:Deletes a single item of a conversation and returns the conversation object (not the deleted item).
  • Retrieve model:Returns the same model object as its entry in the list. Only models that declare an OpenAI API are visible; model IDs may carry slash-separated publisher prefixes. A model that does not exist or declares no OpenAI API returns 404.
  • Create embeddings:Forwarded the same way as chat completions, and usage is billed on the same account. Unknown top-level fields are forwarded unchanged to same-protocol upstream providers, which decide whether to accept them. Declared fields still undergo type and range validation; invalid values return 400 naming the field.
  • Create video:Generates video asynchronously: create a job, poll its status, then download the content. Billed per second of output; GET /model/v1/models exposes pricing.video_second in USD per second. Select a registered video model explicitly, for example wan2.7-t2v.
  • List videos:Lists the video jobs of your account. limit is 1–100, order is asc or desc, and after must refer to an existing job.
  • Retrieve video:Reads the job's current status and progress. Keep polling while status is queued or in_progress, inspect error when it is failed, and download the content only once it is completed. An unknown job returns 404.
  • Download video content:Downloads the video file (video, MP4) or the thumbnail (thumbnail) once the job is completed; spritesheet returns 400 and index supports 0 only. An unknown job returns 404.
  • Delete video:Deletes the job and its generated content. An unknown job returns 404.
  • Remix video:Unsupported; the call always returns 400 (invalid_request_error, message "Video remix is not supported"). Do not retry.
  • Transcribe audio:Standard request fields; unrepresentable parameters return input_not_representable.
  • Upload a file:Upload one file, up to 100 MB (104857600 bytes), using streaming multipart/form-data. Supported content-detected types: PDF; DOCX, XLSX, PPTX; PNG, JPEG, GIF, WebP; MP3, WAV, FLAC, OGG, M4A; MP4, WebM; UTF-8 JSON, NDJSON, CSV, Markdown and plain text. Purposes: user_data, assistants, vision. Other purposes and empty/unsupported/oversized files return 400. OpenAI Uploads chunking is not supported. expires_after accepts anchor created_at and seconds 3600–2592000. Only form file, purpose, expires_after[anchor] and expires_after[seconds] are accepted; any other form field or any query parameter returns 400 invalid_request_error "Unrecognized request argument supplied: <name>" with param naming it.
  • List files:Only the after, order, limit and purpose query parameters are accepted; any other returns 400 invalid_request_error "Unrecognized request argument supplied: <name>" with param naming it.

For authoritative parameter definitions, see the official OpenAI documentation.

Errors follow the OpenAI format, see errors; quotas and response headers are covered in rate limits.

Export

On this page