Gateway concepts

Compatibility

The gateway implements a deliberate subset of OpenAI API and SDK behavior; review this profile before migrating an existing integration.

文

This guide has an independently written Vietnamese edition. Đọc bằng Tiếng Việt

SDK documentation · API v1

Supported endpoints

The current service exposes the following OpenAI-compatible /v1 operations:

APIOperations
ModelsGET /models, GET /models/{model}
Chat CompletionsPOST /chat/completions
ResponsesPOST /responses, GET /responses/{response_id}, DELETE /responses/{response_id}
EmbeddingsPOST /embeddings
FilesPOST /files, GET /files, GET /files/{file_id}, GET /files/{file_id}/content, DELETE /files/{file_id}

The full method and example list is in the API reference. All /v1 operations use a bearer application key.

Conditional features

Parameter acceptance is checked against the configured profile and the eligible model/provider. Support does not guarantee every provider implements a parameter identically.

  • Chat supports messages, text generation, completion limits, streaming responses, function tools, tool-call history, n from 1 to 4, supported sampling settings, JSON object output, and a validated JSON Schema subset.
  • Responses supports text input, message history, previous_response_id, storage, function tools, supported output formats and sampling settings.
  • Embeddings supports string input, batches of strings, token IDs and batches of token IDs; input and output are limited by the gateway profile.
  • Files supports a bounded set of PDF, image, and text media used by the gateway’s attachment-analysis pipeline.

For Chat, sampling parameters are only eligible on models that support them. Reasoning models conservatively reject unsupported sampling options. Gemini does not cover the full Chat profile: Gemini tools, frequency/presence penalties and multiple choices are outside the checked profile.

Unsupported features

The compatibility profile does not claim support for the full OpenAI API. Examples outside the current profile include Audio, image generation, Moderation, Batch, Assistants, hosted OpenAI tools, and Realtime. The Responses surface also rejects or ignores parameters such as reasoning, conversation, include, background=true, text.verbosity, and automatic truncation where indicated by the implementation profile.

Unknown or unsupported parameters can return 400 before provider execution. Do not assume an SDK method works just because the upstream OpenAI SDK exposes it.

Provider differences

Providers have different capabilities, limits, supported schemas, and usage reporting. Tool and schema behavior can be narrower on one provider than another. The gateway validates the requested profile, then selects an eligible model/provider; an unsupported combination can fail even when the endpoint itself is available.

For structured output, use an object-root JSON Schema with all properties required and additionalProperties: false. The supported subset includes nested objects, enums, arrays, nullable values, local definitions and supported references. External references, root recursion, allOf, conditional/dependent keywords, unevaluated* keywords and patternProperties are rejected.

The Files API analyzes supported attachments into text. The gateway does not promise full image-vision input or direct remote-image URL retrieval. See Files and attachments for the current media limits.