POST
https://your-instance.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.
top_pnumberdefault: 1Nucleus sampling. Consider setting this or temperature, not both.
max_tokensintegerUpper bound on generated tokens. The request fails if the prompt plus this exceeds the model's context window.
stopstring | string[]Up to four sequences that end generation when produced.
curl
curl https://your-instance.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
}'