Agent Integrations

Create a chat completion directly against OpenRouter

Proxies the request body to OpenRouter's OpenAI-compatible /chat/completions. Most parameters OpenRouter accepts are forwarded verbatim (sampling knobs, tools, tool_choice, response_format, reasoning, transforms, route). Two are not: provider is merged, not forwarded as-is — caller routing preferences are honoured but the per-token price cap is always applied, so upstream spend never exceeds the rate the call is billed at — and models (OpenRouter's own fallback-routing list) and plugins (paid addons like web search) are stripped and silently ignored: neither is validated against this proxy's catalog/policy/price cap or billed for, so honoring them isn't safe. Responses are returned unchanged apart from an appended openhuman billing envelope. Set stream: true for an SSE stream.

post/agent-integrations/openrouter/chat/completions

Request

  • Base URL: https://api.tinyhumans.ai
  • URL: https://api.tinyhumans.ai/agent-integrations/openrouter/chat/completions
  • Auth: HTTP bearer

Request body

modelstring required

OpenRouter slug, e.g. anthropic/claude-sonnet-4.5. The namespaced form (openrouter/<author>/<slug>) is accepted too. Must be present in the cached catalog.

streamboolean
temperaturenumber
max_tokensinteger

Defaults to 4096 so an unbounded call cannot drain a balance.

toolsobject[]
thread_idstring

Optional caller-supplied conversation id, persisted on the InferenceLog.

Example request

{
  "model": "anthropic/claude-sonnet-4.5"
}

Response

Chat completion response in OpenAI format

Changes

No recorded changes to this operation across all 1 revision of this API.