Help

Move an OpenAI SDK integration to the gateway

Keep the OpenAI SDK, then update the service URL, application credential, model choice, and request assumptions.

文

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

SDK documentation · API v1

Update client configuration

You can keep using the official OpenAI SDK for the endpoints in this guide. Point base_url (Python) or baseURL (Node) to the AI service origin plus /v1, and replace the provider key with an application API key. Keep the key on your server. The management website URL is not the API base URL unless it is configured to proxy /v1.

For this Taskway deployment, use https://taskway-ai-be.onrender.com/v1 as the base URL. If you use a different workspace, ask its administrator for that workspace’s API URL and an application key.

Review model and request behavior

The gateway exposes a defined subset of OpenAI-compatible operations. Use auto to follow the application’s configured routing policy, or call GET /v1/models and select a visible concrete model. Embeddings require a concrete embedding model; text-generation aliases do not select one.

Under the default strict idempotency policy, every Chat, Responses, or Embeddings create request must include an Idempotency-Key. Keep its value unchanged when retrying one logical request. Python passes it through extra_headers; Node passes it in the request options headers object.

Account for state and Files

Chat Completions stays stateless: your application sends the message history each time. Responses can keep a same-application history when store=true and previous_response_id is supplied. Files are application-scoped and pass through the gateway’s attachment-analysis pipeline; they are not a substitute for full image-vision input.

Review retention, file limits, and model availability with the workspace owner because a deployment can be configured more strictly than the source defaults.

Check the supported API surface

Do not assume an SDK method is available just because the OpenAI SDK implements it. This gateway does not claim support for the full OpenAI API, including Audio, image generation, Moderation, Batch, Assistants, hosted OpenAI tools, or Realtime. Check the compatibility guide before migrating optional fields, tools, structured output, or provider-specific settings.