DeepSeek
1. Overview
DeepSeek offers the most affordable domestic large language models currently available, with low prompt/generation costs, making it ideal for translation needs.
This API is compatible with the OpenAI interface format.
Model List:
deepseek-v3deepseek-v3.1deepseek-r1deepseek-v4-flashdeepseek-v4-pro
2. Request Description
Request Method:
POSTRequest URL:
https://gateway.theturbo.ai/v1/chat/completions
To ensure concurrent resource availability, the backend uses multi-account load balancing. To improve cache hit rates in multi-turn conversation mode, include the HTTP request header X-Conversation-Id with a random string in your request. The platform will preferentially route requests to the same backend account. Reference Documentation
3. Request Parameters
3.1 Header Parameters
Content-Type
string
Yes
Set the request header type, must be application/json
application/json
Accept
string
Yes
Set the response type, recommended to use application/json
application/json
Authorization
string
Yes
API_KEY required for authentication, format Bearer $YOUR_API_KEY
Bearer $YOUR_API_KEY
3.2 Body Parameters (application/json)
model
string
Yes
The model ID to use. See Overview for available versions, e.g. deepseek-v3.
deepseek-v3
messages
array
Yes
Chat message list, compatible with OpenAI format. Each object in the array contains role and content.
[{"role": "user","content": "Hello"}]
role
string
No
Message role, possible values: system, user, assistant.
user
content
string
No
The specific content of the message.
Hello, please tell me a joke.
temperature
number
No
Sampling temperature, ranging from 0~2. Higher values make the output more random; lower values make the output more focused and deterministic.
0.7
top_p
number
No
Another way to adjust the sampling distribution, ranging from 0~1. Usually set one of these or temperature.
0.9
n
number
No
Number of replies to generate for each input message.
1
stream
boolean
No
Whether to enable streaming output. When set to true, returns streaming data similar to ChatGPT.
false
stop
string
No
Up to 4 strings can be specified. Once any of these strings appears in the generated content, token generation stops.
"\n"
max_tokens
number
No
Maximum number of tokens that can be generated in a single reply, limited by the model's context length.
1024
presence_penalty
number
No
-2.0 ~ 2.0. Positive values encourage the model to generate more new topics, while negative values reduce the probability of new topics.
0
frequency_penalty
number
No
-2.0 ~ 2.0. Positive values reduce the frequency of the model repeating phrases, while negative values increase the probability of repetition.
0
4. Request Examples
5. Response Example
Last updated