https://clawrouter.com/v1/completionsTakes a bare prompt instead of a message list. Kept for older integrations; new code should use chat completions, which every current model is tuned for.
modelstringrequiredModel to use.
promptstring | string[]requiredThe prompt to complete.
streambooleandefault: falseStream the completion as it is produced.
temperaturenumberdefault: 1Sampling temperature between 0 and 2. Lower is more deterministic. Claude Opus 4.7 and later, Claude Sonnet and Haiku 5.x, and Claude Fable accept only the default, so the gateway leaves it out for those models.
top_pnumberdefault: 1Nucleus sampling. Consider setting this or temperature, not both. Left out for the same Claude models as temperature.
max_tokensintegerUpper bound on the visible answer. On reasoning models (DeepSeek, Doubao, MiniMax, Kimi, GLM and others) the thinking is generated and billed on top of it, so a max_tokens of 50 can produce thousands of billed tokens; the reasoning share is reported in usage.completion_tokens_details.reasoning_tokens.
max_completion_tokensintegerHard cap on everything generated, reasoning included — use this to bound cost. A reasoning model that hits it while still thinking returns an empty answer with finish_reason length.
stopstring | string[]Up to four sequences that end generation when produced.
curl https://clawrouter.com/v1/completions \
-H "Authorization: Bearer $CLAWROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-3.5-turbo-instruct",
"prompt": "Once upon a time",
"max_tokens": 64
}'