NezhaGate
POST https://nezhagate.com/v1/chat/completions

OpenAI-compatible chat completions backed by Anthropic Claude Fable 5 — tuned for narrative and long-form writing, with adaptive thinking, image input, tool use, prompt caching and streaming. Set model to claude-fable-5. Note: this model deprecates temperature / top_p / top_k upstream; the gateway silently drops them (no error) and sampling runs at the model default. Use reasoning_effort (low / medium / high / xhigh / max) to control thinking depth instead.

📥 Context window (max input):~200K tokens.

Try in Playground →

Authentication

Header
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Create an API Key in the console to start.

Request body

ParameterTypeRequiredDescription
model string Yes Model ID, here claude-fable-5.
messages array Yes Array of messages; each has role (system/user/assistant) and content. content may be a string, or an array of {type:text} and {type:image_url} parts for image understanding (multimodal/vision).
stream boolean No Stream the response as SSE. Default false.
temperature number No Not supported. This model deprecates sampling params; the gateway drops temperature / top_p / top_k silently (no error) and sampling runs at the model default. Use reasoning_effort to trade thinking depth for speed instead.
max_tokens integer No Maximum number of tokens to generate.
web_search boolean No Set true to enable web search: the gateway augments the prompt with live results (citing sources) before the model answers. Can also be triggered via a tools entry {"type":"web_search"}.
reasoning_effort string No Thinking effort: low / medium / high / xhigh / max. Higher means deeper, slower and more expensive — thinking tokens bill at the output rate inside usage.completion_tokens. Omit it and the model decides adaptively. The gateway translates this into the model's native output_config.effort; on the native Anthropic endpoint you can send output_config yourself. The suffix form works too (e.g. claude-opus-5-high) and bills exactly as the base model.

Request example

cURL
curl https://nezhagate.com/v1/chat/completions -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"model": "claude-fable-5", "messages": [{"role": "user", "content": "Hello"}], "stream": false}'

Response

200 · JSON
{
  "id": "chatcmpl_xxx",
  "object": "chat.completion",
  "model": "claude-fable-5",
  "choices": [
    {"index": 0, "message": {"role": "assistant", "content": "Hello!"}, "finish_reason": "stop"}
  ],
  "usage": {"prompt_tokens": 11, "completion_tokens": 7, "total_tokens": 18}
}

Image input (Vision)

Put an image in the message content array and the model will analyze it (visual Q&A, reading text / OCR, …). image_url accepts a public image link or an inline base64 data URL (data:image/png;base64,...). Available on multimodal models (gpt-5.5, gemini series, …).

curl · Image input (Vision)
curl https://nezhagate.com/v1/chat/completions -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"model": "claude-fable-5", "messages": [{"role": "user", "content": [{"type": "text", "text": "这张图里有什么?"}, {"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}}]}]}'

Error codes

CodeDescription
401Invalid or missing API key
402Insufficient balance / key limit reached
400Invalid parameters or model
429Rate limited
502All upstream providers failed