Your SDK, connected to Renio.
Keep your provider’s formats. Set your SDK’s URL and authentication to use Renio with a re_ access key, following the examples below. The vault then supplies the real provider key for you.
The rule, in one sentence
Renio identifies you only through your re_ access key in the Authorization: Bearer header. For OpenAI, Mistral and OpenRouter, this is already the native header: set your SDK’s key to your re_ key. For Anthropic and Gemini (which normally use x-api-key / x-goog-api-key), explicitly set the Authorization header — the proxy adds the native authentication expected by the provider.
In the examples below, re_xxxxxxxxxxxxxxxxxxxx is a placeholder — replace it with the secret of your access key, shown only once when it is created.
OpenAI
https://api.renio.ai/openai/v1/chat/completionscurl https://api.renio.ai/openai/v1/chat/completions \
-H "Authorization: Bearer re_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o","max_tokens":256,"messages":[{"role":"user","content":"Hello"}]}'SDK — OpenAI SDK: set api_key to your re_ key and base_url to the URL above (without the endpoint suffix).
Anthropic (Claude)
https://api.renio.ai/anthropic/v1/messagescurl https://api.renio.ai/anthropic/v1/messages \
-H "Authorization: Bearer re_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"model":"claude-sonnet-5","max_tokens":256,"messages":[{"role":"user","content":"Hello"}]}'SDK — Anthropic SDK: keys normally go in x-api-key; instead, send your re_ as Authorization: Bearer (using the SDK’s authToken option or defaultHeaders). The proxy sets x-api-key and anthropic-version for you.
Mistral
https://api.renio.ai/mistral/v1/chat/completionscurl https://api.renio.ai/mistral/v1/chat/completions \
-H "Authorization: Bearer re_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"model":"mistral-large-latest","max_tokens":256,"messages":[{"role":"user","content":"Hello"}]}'SDK — Native Bearer authentication: set the SDK key to your re_ key.
OpenRouter
https://api.renio.ai/openrouter/api/v1/chat/completionscurl https://api.renio.ai/openrouter/api/v1/chat/completions \
-H "Authorization: Bearer re_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"model":"openai/gpt-4o","max_tokens":256,"messages":[{"role":"user","content":"Hello"}]}'SDK — Native Bearer authentication: set the SDK key to your re_ key. The exact cost returned by OpenRouter is used for your budgets.
Gemini (Google)
https://api.renio.ai/gemini/v1beta/models/gemini-2.5-pro:generateContentcurl https://api.renio.ai/gemini/v1beta/models/gemini-2.5-pro:generateContent \
-H "Authorization: Bearer re_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"contents":[{"role":"user","parts":[{"text":"Hello"}]}],"generationConfig":{"maxOutputTokens":256}}'SDK — Gemini keys normally go in x-goog-api-key or ?key=; instead, send your re_ as Authorization: Bearer (the proxy removes any ?key= from the URL and sets x-goog-api-key for you).
What you should know
- Capped access keys — Include an output limit in every generation:
max_tokens,max_completion_tokens,max_output_tokensorgenerationConfig.maxOutputTokens, depending on your provider. The examples above include one. Unpriced models, multiple simultaneous generations or remote content whose cost cannot be estimated are refused with HTTP 422 andbudget_measurement_unavailable. This check applies to access keys with a spending cap. - Unavailable budget counter — New controlled requests are refused with HTTP 503 and
budget_unavailable. A request already sent to the provider may still incur charges, even if its stream is interrupted. - Mistral streaming — Usage may be absent from the stream; in that case the cost is marked “unmeasured” rather than invented.
- OpenRouter — The exact cost returned by OpenRouter is used for your budgets. Interrupting a stream does not always stop upstream billing.
- Images, audio and hosted tools — Their cost cannot be estimated reliably enough for capped access keys. For uncapped access keys, measurement depends on the adapter; for example, text pricing may be applied to Gemini audio usage. The journal does not replace the provider’s invoice.