POST
/
completions
Create completion
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"
}

Authorizations

Authorization
string
header
required

Use the following format for authentication: Bearer <your api key>

Body

application/json

Response

200
application/json

200

The response is of type object.