Reference
POST /v1/chat/completions
OpenAI’s chat completions, at https://nokeep.ai/v1/chat/completions. Send a bearer key and a JSON body; get a chat completion back, or a stream of chunks.
Checked 26 October 2026
Request fields
| Field | Needed | What it does |
|---|---|---|
model | Yes | A model id from GET /v1/models, such as deepseek-v4.1-flash-uncensored. |
messages | Yes | 1 to 2,000 messages. Roles: system, developer, user, assistant, tool. Content is a string, or a list of text and image_url parts. |
stream | No | true for server-sent events. See Streaming. |
stream_options | No | {"include_usage": true} adds a last chunk with usage. |
max_tokens, max_completion_tokens | No | The longest reply, thinking included, up to the model’s own longest. Unset: the room your cap and balance pay for, up to 8,192. |
reasoning_effort | No | How hard the model thinks. See Thinking. |
tools, tool_choice, parallel_tool_calls | No | See Tool calls. |
response_format | No | See JSON output. |
temperature, top_p, top_k, min_p | No | Sampling. See Samplers. |
frequency_penalty, presence_penalty, repetition_penalty | No | Repetition control. |
stop, seed | No | Stop strings, and a seed for more repeatable replies. |
n | No | Must be 1. |
Which model takes which
| Field | DeepSeek | GLM |
|---|---|---|
temperature | Yes | Dropped |
top_p | Yes | Dropped |
stop | Yes | Dropped |
seed | Yes | Dropped |
frequency_penalty | Yes | Dropped |
presence_penalty | Yes | Dropped |
repetition_penalty | Yes | Dropped |
min_p | Yes | Dropped |
top_k | Yes | Dropped |
tools | Yes | Yes |
tool_choice | Yes | Yes |
parallel_tool_calls | Yes | Dropped |
response_format | Yes | Dropped |
reasoning_effort | Yes | Yes |
A field the model can’t take is dropped and named in the x-nokeep-ignored header. A field neither model knows is dropped the same way.
The reply
{
"id": "chatcmpl-…",
"object": "chat.completion",
"created": 1792972800,
"model": "deepseek-v4.1-flash-uncensored",
"choices": [{
"index": 0,
"message": { "role": "assistant", "content": "…" },
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 412,
"completion_tokens": 286,
"total_tokens": 698,
"nokeep_credits": 1
}
}idandmodelare ours. Nothing from the model’s host is passed on.message.reasoning_contentholds the thinking, when there was any.message.tool_callsholds tool calls, withfinish_reasontool_calls.usage.nokeep_creditsis what the call cost, in credits (1,000 are $1).
Limits on a request
At most 12 MB, 2,000 messages and 10 pictures (DeepSeek only). Requests that pass them are refused with a code; see Errors.