{"slug":"api-ai-open-models-com-v1-router-chat-completions-66e3b7","title":"An LLM router for an open-weight inference service","host":"api.ai-open-models.com","method":"POST","resource":"https://api.ai-open-models.com/v1/router/chat/completions","category":"other","description":"An LLM router for an open-weight inference service. It analyzes your request, selects a suitable compatible model, runs the selected model, and returns its answer in OpenAI-compatible format.","price_listed":0.004748,"price_asked":0.004748,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":1188,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"max_tokens":1024,"messages":[{"content":"Design a secure migration plan for a large TypeScript API.","role":"user"}],"stream":false,"temperature":0.2},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"properties":{"max_tokens":{"default":8192,"description":"Maximum completion tokens. Models incompatible with the requested output or context limits are excluded before routing.","maximum":131072,"minimum":1,"type":"integer"},"messages":{"description":"OpenAI-compatible conversation messages containing the task the Router will analyze and execute.","items":{"additionalProperties":false,"allOf":[{"if":{"properties":{"role":{"const":"system"}},"required":["role"]},"then":{"properties":{"content":{"type":"string"}},"required":["content"]}},{"if":{"properties":{"role":{"const":"user"}},"required":["role"]},"then":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"additionalProperties":false,"allOf":[{"if":{"properties":{"type":{"const":"text"}},"required":["type"]},"then":{"not":{"required":["image_url"]},"required":["text"]}},{"if":{"properties":{"type":{"const":"image_url"}},"required":["type"]},"then":{"not":{"required":["text"]},"required":["image_url"]}}],"properties":{"image_url":{"additionalProperties":false,"properties":{"detail":{"description":"Requested image detail level. Availability and visual-token usage are provider-specific.","enum":["auto","low","high"],"type":"string"},"url":{"anyOf":[{"maxLength":8192,"minLength":1,"pattern":"^https://","type":"string"},{"maxLength":6990540,"minLength":1,"pattern":"^data:image/(png|jpeg|webp|gif);base64,[A-Za-z0-9+/]+={0,2}$","type":"string"}],"description":"Public HTTPS image URL or a base64 data URI containing a PNG, JPEG, WebP, or GIF image."}},"required":["url"],"type":"object"},"text":{"type":"string"},"type":{"enum":["text","image_url"],"type":"string"}},"required":["type"],"type":"object"},"minItems":1,"type":"array"}]}},"required":["content"]}},{"if":{"properties":{"role":{"const":"assistant"}},"required":["role"]},"then":{"properties":{"content":{"type":["string","null"]}},"required":["content"]}},{"if":{"properties":{"role":{"const":"tool"}},"required":["role"]},"then":{"properties":{"content":{"type":"string"},"tool_call_id":{"minLength":1,"type":"string"}},"required":["content","tool_call_id"]}}],"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"},{"items":{"additionalProperties":false,"allOf":[{"if":{"properties":{"type":{"const":"text"}},"required":["type"]},"then":{"not":{"required":["image_url"]},"required":["text"]}},{"if":{"properties":{"type":{"const":"image_url"}},"required":["type"]},"then":{"not":{"required":["text"]},"required":["image_url"]}}],"properties":{"image_url":{"additionalProperties":false,"properties":{"detail":{"description":"Requested image detail level. Availability and visual-token usage are provider-specific.","enum":["auto","low","high"],"type":"string"},"url":{"anyOf":[{"maxLength":8192,"minLength":1,"pattern":"^https://","type":"string"},{"maxLength":6990540,"minLength":1,"pattern":"^data:image/(png|jpeg|webp|gif);base64,[A-Za-z0-9+/]+={0,2}$","type":"string"}],"description":"Public HTTPS image URL or a base64 data URI containing a PNG, JPEG, WebP, or GIF image."}},"required":["url"],"type":"object"},"text":{"type":"string"},"type":{"enum":["text","image_url"],"type":"string"}},"required":["type"],"type":"object"},"minItems":1,"type":"array"}]},"name":{"minLength":1,"type":"string"},"reasoning_content":{"type":"string"},"role":{"enum":["system","user","assistant","tool"],"type":"string"},"tool_call_id":{"minLength":1,"type":"string"},"tool_calls":{"items":{"additionalProperties":false,"properties":{"function":{"additionalProperties":false,"properties":{"arguments":{"type":"string"},"name":{"minLength":1,"type":"string"}},"required":["name","arguments"],"type":"object"},"id":{"minLength":1,"type":"string"},"type":{"const":"function","type":"string"}},"required":["id","type","function"],"type":"object"},"minItems":1,"type":"array"}},"required":["role"],"type":"object"},"minItems":1,"type":"array"},"model":{"const":"ai-open-models/router","default":"ai-open-models/router","description":"Optional Router alias. When omitted, the server uses ai-open-models/router.","type":"string"},"parallel_tool_calls":{"description":"Whether the selected model may request multiple tool calls in one response.","type":"boolean"},"response_format":{"additionalProperties":false,"allOf":[{"else":{"not":{"required":["json_schema"]}},"if":{"properties":{"type":{"const":"json_schema"}},"required":["type"]},"then":{"required":["json_schema"]}}],"description":"Optional text or JSON response format. Models incompatible with the requested format are excluded before routing.","properties":{"json_schema":{"additionalProperties":false,"properties":{"description":{"type":"string"},"name":{"minLength":1,"type":"string"},"schema":{"additionalProperties":true,"type":"object"},"strict":{"type":"boolean"}},"required":["name","schema"],"type":"object"},"type":{"enum":["text","json_object","json_schema"],"type":"string"}},"required":["type"],"type":"object"},"stream":{"const":false,"default":false,"description":"Streaming is not currently supported.","type":"boolean"},"temperature":{"description":"Optional sampling temperature passed to the selected model.","maximum":2,"minimum":0,"type":"number"},"tool_choice":{"anyOf":[{"enum":["none","auto","required"],"type":"string"},{"additionalProperties":false,"properties":{"function":{"additionalProperties":false,"properties":{"name":{"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"type":{"const":"function","type":"string"}},"required":["type","function"],"type":"object"}],"description":"Optional tool-selection policy."},"tools":{"description":"Optional client-executed function definitions. The selected model may request these functions, but the endpoint does not execute them.","items":{"additionalProperties":false,"properties":{"function":{"additionalProperties":false,"properties":{"description":{"type":"string"},"name":{"minLength":1,"type":"string"},"parameters":{"additionalProperties":true,"type":"object"},"strict":{"type":"boolean"}},"required":["name","parameters"],"type":"object"},"type":{"const":"function","type":"string"}},"required":["type","function"],"type":"object"},"minItems":1,"type":"array"}},"required":["messages"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"properties":{"choices":{"items":{"properties":{"finish_reason":{"type":["string","null"]},"index":{"type":"integer"},"message":{"properties":{"content":{"type":["string","null"]},"role":{"const":"assistant","type":"string"},"tool_calls":{"type":"array"}},"required":["role"],"type":"object"}},"required":["index","message"],"type":"object"},"minItems":1,"type":"array"},"created":{"type":"integer"},"id":{"type":"string"},"model":{"enum":["moonshotai/kimi-k3","Qwen/Qwen3.6-35B-A3B","zai-org/GLM-5.2","zai-org/GLM-5.3","zai-org/GLM-5.3-Flash","Qwen/Qwen3.8-27B","deepseek-ai/DeepSeek-V4.1-Flash"],"type":"string"},"object":{"type":"string"},"usage":{"properties":{"completion_tokens":{"type":"integer"},"prompt_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}},"type":"object"}},"required":["id","object","created","model","choices"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-10-19","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.004748,"price_match":true,"latency_ms":1188,"error":null}],"description_full":"An LLM router for an open-weight inference service. It analyzes your request, selects a suitable compatible model, runs the selected model, and returns its answer in OpenAI-compatible format.","last_updated":"2026-10-19T10:53:03.042Z","schemes":["exact"]}