Skip to content
All docs

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

FieldNeededWhat it does
modelYesA model id from GET /v1/models, such as deepseek-v4.1-flash-uncensored.
messagesYes1 to 2,000 messages. Roles: system, developer, user, assistant, tool. Content is a string, or a list of text and image_url parts.
streamNotrue for server-sent events. See Streaming.
stream_optionsNo{"include_usage": true} adds a last chunk with usage.
max_tokens, max_completion_tokensNoThe 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_effortNoHow hard the model thinks. See Thinking.
tools, tool_choice, parallel_tool_callsNoSee Tool calls.
response_formatNoSee JSON output.
temperature, top_p, top_k, min_pNoSampling. See Samplers.
frequency_penalty, presence_penalty, repetition_penaltyNoRepetition control.
stop, seedNoStop strings, and a seed for more repeatable replies.
nNoMust be 1.

Which model takes which

FieldDeepSeekGLM
temperatureYesDropped
top_pYesDropped
stopYesDropped
seedYesDropped
frequency_penaltyYesDropped
presence_penaltyYesDropped
repetition_penaltyYesDropped
min_pYesDropped
top_kYesDropped
toolsYesYes
tool_choiceYesYes
parallel_tool_callsYesDropped
response_formatYesDropped
reasoning_effortYesYes

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

Response
{
  "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
  }
}
  • id and model are ours. Nothing from the model’s host is passed on.
  • message.reasoning_content holds the thinking, when there was any.
  • message.tool_calls holds tool calls, with finish_reason tool_calls.
  • usage.nokeep_credits is 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.