đ Banner is live! Learn more
cURL
curl --request POST \ --url https://api.deepseek.com/chat/completions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: <content-type>' \ --data ' { "messages": [ { "content": "You are a helpful assistant", "role": "system" }, { "content": "Hi", "role": "user" } ], "model": "deepseek-chat", "frequency_penalty": 0, "max_tokens": 2048, "presence_penalty": 0, "response_format": { "type": "text" }, "stop": null, "stream": false, "stream_options": null, "temperature": 1, "top_p": 1, "tools": null, "tool_choice": "none", "logprobs": false, "top_logprobs": null } '
200
1
{ "id": "string", "choices": [ { "finish_reason": "stop", "index": 0, "message": { "content": "string", "reasoning_content": "string", "tool_calls": [ { "id": "string", "type": "function", "function": { "name": "string", "arguments": "string" } } ], "role": "assistant" }, "logprobs": { "content": [ { "token": "string", "logprob": 0, "bytes": [ 0 ], "top_logprobs": [ { "token": "string", "logprob": 0, "bytes": [ 0 ] } ] } ] } } ], "created": 0, "model": "string", "system_fingerprint": "string", "object": "chat.completion", "usage": { "completion_tokens": 0, "prompt_tokens": 0, "prompt_cache_hit_tokens": 0, "prompt_cache_miss_tokens": 0, "total_tokens": 0, "completion_tokens_details": { "reasoning_tokens": 0 } } }
Creates a model response for the given chat conversation.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Show child attributes
OK, returns a chat completion object
chat completion object