{"slug":"x402-onhub-ai-v1-chat-completions-9eda47","title":"Text completion using the model selected in the request body","host":"x402.onhub.ai","method":"POST","resource":"https://x402.onhub.ai/v1/chat/completions","category":"other","description":"Text completion using the model selected in the request body.","price_listed":0.002,"price_asked":0.002,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":750,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"messages":[{"content":"Say hello in one sentence.","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":{"additionalProperties":false,"properties":{"enable_thinking":{"description":"For reasoning-capable Workers AI models. Defaults to false for GPT-OSS chat reliability.","type":"boolean"},"max_tokens":{"default":1024,"maximum":2048,"minimum":1,"type":"integer"},"messages":{"items":{"additionalProperties":false,"properties":{"content":{"type":"string"},"role":{"enum":["system","user","assistant"],"type":"string"}},"required":["role","content"],"type":"object"},"minItems":1,"type":"array"},"model":{"description":"Optional; must match the model in the selected route.","type":"string"},"reasoning_effort":{"description":"For reasoning-capable Workers AI models.","enum":["low","medium","high",null],"type":["string","null"]},"stream":{"const":false,"default":false,"type":"boolean"},"temperature":{"maximum":2,"minimum":0,"type":"number"}},"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":{"message":{"properties":{"content":{"type":"string"},"role":{"const":"assistant","type":"string"}},"required":["role","content"],"type":"object"}},"required":["message"],"type":"object"},"minItems":1,"type":"array"},"model":{"type":"string"},"object":{"const":"chat.completion","type":"string"}},"required":["object","model","choices"],"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.002,"price_match":true,"latency_ms":750,"error":null}],"description_full":"Text completion using the model selected in the request body.","last_updated":"2026-09-23T12:30:56.961Z","schemes":["exact"]}