HeyRoute Docs

HeyRoute docs and help

Set up clients, connect models, manage credits and limits, and recover from failed requests with copyable configs, commands, and checks.

59docs · 6 topics

Help center

Start here

Docs topics

Browse by topic

Developer docs

Call the API directly

API overviewWhen calling HeyRoute from your own code: which base URL to use, how to send the key, and which endpoint each of the four protocols maps to.ReferencePrompt cachingCached input costs far less than regular input. Whether you hit the cache depends on two things in your code: whether the prefix stays byte-identical, and whether the conversation identifier stays stable.ExplanationUsage fields and billingThe four protocols name and count usage differently. This explains what each field means, how it is billed, and how to match it against your usage logs line by line.ReferenceErrors and retriesSort errors by status code into fix the request, wait, and safe to retry, with retry and timeout settings you can use as-is.ReferenceRate and concurrency limitsEach account has a cap on requests in flight and on requests per minute. This page lists the limits, the exact text of each kind of 429, and how to pace batch jobs.ReferenceStreaming and timeoutsStream formats and end markers per protocol, the keepalive comments the gateway sends, how long silence lasts before a stream is cut, and how to set client timeouts.ReferenceKey restrictions and balanceRestrict an API key by IP, model, credit, and expiry, and recognize the error each restriction returns; then use the key itself to list models and check balance.ReferenceReasoning effortThe parameter that controls reasoning effort in each protocol, which model-name suffixes you can use directly, and which common parameters reasoning models ignore.ReferenceContext lengthHow much input each model family accepts, how requests above 272K or 200K are billed at long-context rates, how to enable 1M for Claude, and what to do about too-long errors and long sessions.ReferenceProtocol compatibilityOne table showing which endpoints can reach GPT, Claude, Gemini, Grok, and Chinese models, plus which parameters stop working when you are not on a model’s native protocol.ReferenceModel names and logsHow model names must be written, the few legacy names that map to standard ones, what each model-name error means, and how to read usage logs that show models you did not request.ReferenceSDK quick referenceWhich base URL to use for the OpenAI, Anthropic, Google GenAI, Vercel AI SDK, and LangChain clients, whether to include /v1, and what errors a wrong value produces.ReferenceTool use and JSON outputHow to write a full tool-calling round trip, how to assemble streamed tool calls, which method to use per model when you need JSON-only output, and which tools and parameters have no effect.GuideImage and file inputHow to include images and PDFs in each of the four protocols, what GPT, Claude, Gemini, and Chinese models support, limits on request size and image URLs, and how images are billed.ReferenceGemini native APIUsing Gemini through the Google GenAI SDK or the native /v1beta API: base URL and auth, streaming, thinking settings, function calling, JSON output, images, and the endpoints that are not available.ReferenceGrok and Chinese modelsWhich Chinese models can see images, where the reasoning output lives, which values of the thinking switch and reasoning_effort are safe, and where Grok differs on parameters and tools.ReferenceCN Models reportMeasured results for the 13 DeepSeek, Zhipu GLM, Kimi, Hunyuan, and MiniMax models in the CN Models group: three protocols, thinking, tool calls, images, JSON, prompt caching, long context, and speed, plus model picks and limits.ReferenceGLM-5.3 compatibilityItem-by-item results for glm-5.3 on OpenAI Chat, OpenAI Responses, and Anthropic Messages: streaming and non-streaming, thinking parameters, sampling, JSON, tool calls and full tool round trips, prompt caching, plus parameter validation boundaries and latency.Reference

More resources

Prompts & tools

Prompts, MCP servers and Skills, ready to useEvery entry has been run on a real project, with the results attached. Copy it, then paste it into Claude Code or Codex.Take a look

Still stuck?

Include the exact error text, the client you used, and the model name. We'll email you as your ticket progresses.