API Reference
Control How Much the Model Thinks
Set an effort level with the same reasoning parameters the OpenAI and Anthropic APIs use. A token budget is optional.
Every camelStream endpoint accepts its native reasoning controls and passes them to the model serving your request. Use the field your API format already defines. There is no camelStream-specific parameter to learn.
| Endpoint | Effort level | Token budget (optional) |
|---|---|---|
/v1/chat/completions | reasoning_effort | reasoning.max_tokens |
/v1/responses | reasoning.effort | reasoning.max_tokens |
/v1/messages | output_config.effort | thinking.budget_tokens |
Both fields are optional. An effort level on its own is enough, and camelStream never requires a budget. Leave everything out and the serving model uses its own default.
Chat Completions
Set reasoning_effort at the top level of the request, using any level the
OpenAI API defines. none is the exception; see
Can I turn reasoning off?.
curl --no-buffer https://stream.camelai.com/v1/chat/completions \
-H "Authorization: Bearer $CAMEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"reasoning_effort": "high",
"messages": [
{"role": "user", "content": "Find the race condition in this worker."}
],
"stream": true
}'If you would rather bound thinking by tokens, a reasoning object with
max_tokens is also accepted. It is optional. Use either an effort level
or a token ceiling, not both.
Responses
Set reasoning.effort. Add reasoning.summary if your client expects
reasoning summaries in the output. This is the field Codex sends when you set
model_reasoning_effort in its config. See
Use Codex.
curl --no-buffer https://stream.camelai.com/v1/responses \
-H "Authorization: Bearer $CAMEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"reasoning": { "effort": "high", "summary": "auto" },
"input": "Find the race condition in this worker.",
"stream": true
}'Messages
thinking is optional. To turn it on without choosing a budget, send
{"type": "adaptive"} and let the serving model decide how much to think.
To steer the level, add output_config with an effort value.
curl --no-buffer https://stream.camelai.com/v1/messages \
-H "x-api-key: $CAMEL_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"max_tokens": 16000,
"thinking": { "type": "adaptive" },
"output_config": { "effort": "high" },
"messages": [
{"role": "user", "content": "Find the race condition in this worker."}
],
"stream": true
}'Both forms work on camelStream. {"type": "enabled", "budget_tokens": 8000}
is the form to use when you want a hard ceiling on thinking tokens. It is
the one form that expects a budget, and the budget must be lower than
max_tokens.