curl --request POST \
--url https://api.ap.siliconflow.com/v1/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "<s>[INST] What is the capital of Germany? [/INST]",
"model": "deepseek-ai/DeepSeek-R1"
}'
{
"id": "<string>",
"choices": [
{
"text": "<string>",
"finish_reason": "stop",
"logprobs": {
"tokens": [
"<string>"
],
"token_logprobs": [
123
]
}
}
],
"prompt": [
{
"text": "<s>[INST] What is the capital of France? [/INST]",
"logprobs": {
"tokens": [
"<string>"
],
"token_logprobs": [
123
]
}
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
},
"created": 123,
"model": "<string>",
"object": "text_completion"
}
Query a language, code, or image model.
curl --request POST \
--url https://api.ap.siliconflow.com/v1/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "<s>[INST] What is the capital of Germany? [/INST]",
"model": "deepseek-ai/DeepSeek-R1"
}'
{
"id": "<string>",
"choices": [
{
"text": "<string>",
"finish_reason": "stop",
"logprobs": {
"tokens": [
"<string>"
],
"token_logprobs": [
123
]
}
}
],
"prompt": [
{
"text": "<s>[INST] What is the capital of France? [/INST]",
"logprobs": {
"tokens": [
"<string>"
],
"token_logprobs": [
123
]
}
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
},
"created": 123,
"model": "<string>",
"object": "text_completion"
}
Use the following format for authentication: Bearer <your api key>
200
The response is of type object
.