{"slug":"agent402-tools-v1-auto-chat-completions-4df5bf","title":"OpenAI-compatible chat completions with the model chosen server-side","host":"agent402.tools","method":"POST","resource":"https://agent402.tools/v1/auto/chat/completions","category":"code","description":"OpenAI-compatible chat completions with the model chosen server-side: omit model and the gateway routes the prompt to the top-ranked model for its task (code, reasoning, long-context, general) from a fixed eval-derived ranking, failing over automatically on provider errors. Flat price per call, 16k ","price_listed":0.01,"price_asked":0.01,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":939,"reported_calls_30d":66,"reported_payers_30d":1,"networks":["algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=","eip155:10","eip155:1329","eip155:137","eip155:143","eip155:42161","eip155:42220","eip155:43114","eip155:4663","eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","stellar:pubnet"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"max_tokens":5,"messages":[{"content":"Reply with exactly: OK","role":"user"}]},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"properties":{"max_tokens":{"description":"Output token cap (clamped to the tier maximum)","type":"number"},"messages":{"description":"OpenAI chat messages: [{role, content}] - text and image_url content blocks supported","type":"array"},"model":{"description":"Optional - omit (or send \"auto\") for eval-ranked server-side routing. An explicit model from the auto ranking is honored at the auto caps.","type":"string"},"quality":{"description":"Optional routing band when the gateway picks the model: \"fast\" (cheapest/snappiest), \"balanced\" (default), \"best\" (strongest under the flat price). Never changes the price.","type":"string"},"service_tier":{"description":"Optional. \"priority\" (alias \"fast\") asks for the model's priority endpoint on /v1/pro and /v1/premium at the same flat price; max_tokens may be sized down. Refused with the reason on the other tiers; \"flex\" is applied by the gateway automatically and not accepted as a request.","type":"string"}},"required":["messages"]},"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":{"agent402_router":{"type":"object"},"choices":{"type":"array"},"created":{"type":"integer"},"id":{"type":"string"},"model":{"type":"string"},"object":{"type":"string"},"usage":{"type":"object"}},"required":["id","object","created","model","choices","usage","agent402_router"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-09-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.01,"price_match":true,"latency_ms":939,"error":null}],"description_full":"OpenAI-compatible chat completions with the model chosen server-side: omit model and the gateway routes the prompt to the top-ranked model for its task (code, reasoning, long-context, general) from a fixed eval-derived ranking, failing over automatically on provider errors. Flat price per call, 16k chars in, 1024 tokens out, streaming supported. Use it as a drop-in OpenAI base_url when you want good answers without picking a model.","last_updated":"2026-09-24T16:02:26.611Z","schemes":["exact","upto"]}