Referensi API/Penanganan request

Konversi protokol & penanganan parameter

Gateway mengonversi setiap request ke format asli model dan menghapus parameter yang ditolak atau diabaikan model. Jadi request yang mendapat 400 dari API resmi bisa mendapat 200 lewat Wokey. Halaman ini menjelaskan penanganan tersebut per endpoint dan model.

Di halaman iniexpand_more

Principleslink

  • The gateway removes or clamps two kinds of fields: those the target model is certain to reject, and those that have no effect on it. The request is then sent upstream as usual. So a request that returns 400 from the official API can return 200 through Wokey. For example, Claude Sonnet 5.5 with temperature: 0.5 returns 400 from the official API; through Wokey, temperature is removed and the request completes.
  • A request that has no equivalent form is not rewritten. It goes upstream as is, and the upstream returns the 400. For example, Claude Sonnet 5.5 with tool_choice set to any or tool.
  • The sections below list common parameter handling by model. Rules for a model change as its upstream changes.

To confirm a response really came from the official API, turn on Official direct verification for your key. About the verifiable API →

Sampling parameterslink

Most current reasoning models set their own sampling and ignore or reject parameters such as temperature. The table shows how each model is handled.

ModelHandling
Claude Opus 4.6, Sonnet 4.6, Sonnet 4.5, Haiku 4.5temperature is forwarded, clamped to 0–1. top_p and top_k are not forwarded.
Other Claude modelstemperature, top_p, and top_k are not forwarded.
GPTtemperature is not forwarded. Called through Chat Completions or Messages, top_p is not forwarded either. GPT-6 Astra and GPT-6.1 Sol never receive top_p, logprobs, or top_logprobs, whichever endpoint you call.
GrokThrough Chat Completions, sampling parameters are forwarded as is; Grok 4.3, 4.5, 4.6, and 4.7 do not receive stop, presence_penalty, or frequency_penalty. Through Responses or Messages, temperature and top_p are not forwarded.
Kimi K3, K3.1 ProThe gateway validates first: temperature must be within 0–1, top_p must be 0.95, presence_penalty and frequency_penalty must be 0, and n must be 1; otherwise it returns 400. After validation, temperature, top_p, and presence_penalty are not forwarded.
Other modelstemperature is usually not forwarded; top_p and other parameters are.

Thinking and reasoning effortlink

Thinking settings a model does not accept are rewritten or removed. Once removed, the model uses its default adaptive thinking.

ModelHandling
Claude Sonnet 5.5thinking: {"type": "disabled"} becomes between_tools at effort low, medium, high, or unset, and is removed at xhigh and max. enabled and manual budget_tokens are removed.
Claude Haiku 5.5disabled is kept at effort low, medium, high, or unset, and removed at xhigh and max. enabled and manual budget_tokens are removed.
Claude Opus 5.5, Fable 5 seriesOnly adaptive is accepted; any other thinking setting is removed.
Claude Opus 5disabled is removed at effort xhigh and max.
GPT-6 Astra, GPT-6.1 Sol, GPT-5.3-CodexEffort none or minimal is raised to low.
DeepSeekWhen the Responses endpoint forces a tool call (tool_choice is required or names a tool), thinking is turned off (reasoning.effort: none). The upstream does not support forced tool calls while thinking.

Output lengthlink

  • Claude: through Chat Completions or Responses, the output limit defaults to 4096. Through Messages, max_tokens is required; without it the gateway returns 400 and nothing is sent upstream.
  • Gemini: defaults to 65536.
  • GPT: max_tokens and max_output_tokens are not forwarded; the upstream decides.

Other handlinglink

  • Calling Claude through Chat Completions, reasoning_effort has no effect; Claude thinks the way the model does by default.
  • Calling GPT through Chat Completions or Messages, reasoning effort defaults to medium.
  • Calling Claude or GPT through Chat Completions, response_format has no effect.
  • Calling Claude through Chat Completions or Responses, parallel_tool_calls has no effect.
  • provider: a Wokey extension used only to choose providers; it is never sent upstream.
  • metadata: not forwarded upstream.
  • Claude speed (fast mode): not supported. The gateway does not forward it; the request runs at standard speed and the response reports usage.speed as standard.
  • GPT user and safety_identifier: not forwarded.
  • Assistant prefill: some Claude channels do not accept a request that ends with an assistant message. The gateway turns the whole conversation into one user message asking the model to continue from the prefill without repeating it. The multi-turn structure is not kept in that case.