One address for text requests
For an OpenAI-compatible text model, set https://api.modelseed.dev/v1 and your modelseed key. Set the exact ID in model. The example uses Chat Completions; additional parameters depend on the route.
# Python
python -m pip install openai
# Node.js
npm install openaiStore MODELSEED_API_KEY in the server environment. In Python, use os.environ["MODELSEED_API_KEY"] instead of YOUR_API_KEY. Run this code on your server or locally, where website visitors cannot access the key.
Python, JavaScript & cURL examples
curl https://api.modelseed.dev/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-1-flash",
"messages": [{"role": "user", "content": "Hello!"}]
}'Streaming & tools
OpenAI SDK compatibility does not imply support for every OpenAI feature. Verify stream, tool calls, JSON and Responses API separately for the chosen model. Text requests cannot automatically be reused for Seedance or Seedream.
When migrating an application, update the address and key, and retain your budget controls and error handling. Avoid uncontrolled retries: the first generation may have completed before a network interruption.