ComfyUI
ComfyOrganize visual generation and processing pipelines with node-based workflows.
Modify a small set of configurations such as base_url, model, and api_key to call Ark model services using the OpenAI SDK.
Volcano Ark's models API maintain compatibility with OpenAI API as much as possible. Developers only need to modify a small set of configurations such as base_url, model, and api_key in their existing OpenAI SDK code to access Ark models (the documentation examples use doubao-seed-2-1-pro-260915). The documentation provides Python examples covering chat completions calls, passing a thinking field via extra_body to toggle deep thinking, passing a request ID via custom headers to correlate logs, and integration with the LangChain OpenAI SDK. Note that: text embedding models are being gradually deprecated, and embedding-capable models do not support OpenAI API, so the Ark SDK must be used instead; community third-party SDKs are not maintained by the Volcano Engine team. Suitable for developers who already have OpenAI ecosystem code and want to migrate to or integrate with Ark-hosted models.
Python developers and backend engineers who already have OpenAI SDK or LangChain integration code and need to access Volcano Ark-hosted models (such as the doubao-seed series). This judgment is based on the integration scenarios the documentation targets: the documentation uses Python and LangChain OpenAI SDK examples to explain how to integrate Ark model services into existing systems.
Install or upgrade the OpenAI SDK (openai>=1.0, Python 3.7 or above).
Complete the preparation steps, such as obtaining the API Key and activating models, per the quick start guide.
Create an OpenAI client, set base_url to https://ark.cn-beijing.volces.com/api/v3, and pass api_key via the ARK_API_KEY environment variable.
In chat.completions.create, replace model with the Ark model ID (the example uses doubao-seed-2-1-pro-260915).
For fields not supported by the OpenAI SDK, such as deep thinking, pass the thinking configuration via the extra_body dictionary.
To correlate logs or enable data encryption, set custom headers via extra_headers (e.g., X-Client-Request-Id).
For LangChain, install langchain-openai and configure ChatOpenAI with the same api_key, base_url, and model ID.
When text embedding is needed, note that it does not support OpenAI API; use the Ark SDK instead and refer to the embedding documentation.
请核对官方的地区支持、数据政策和商用约定。
费用与套餐:以官网当前说明为准,本站不提供套餐价格保证。