Reasoning & tracing
Docs · API

Reasoning & tracing

Set reasoning effort on reasoning models, and correlate any call with your own services using X-Request-Id.

Reasoning#

For reasoning models, set reasoning_effort on a chat request to "none", "low", "medium", or "high".

json
{
  "model": "deepseek/deepseek-v4-pro",
  "messages": [{ "role": "user", "content": "Plan a three-step migration." }],
  "reasoning_effort": "high"
}

The model's thinking comes back separately from its answer, as reasoning_content:

  • Non-streaming: choices[0].message.reasoning_content
  • Streaming: delta.reasoning_content on each chunk

Models that do not reason ignore the field.

Tracing#

Every response carries an X-Request-Id header. To follow one call across your own services, send your own X-Request-Id on the request and the gateway keeps it.

bash
curl https://api.lune.io/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "X-Request-Id: order-8841-step-2" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek/deepseek-v4-pro","messages":[{"role":"user","content":"Hi"}]}'

The same id appears in your request logs in the console. Open a row on the Usage page to see it. Include it when you contact support.