{"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":7,"answered_7d":7,"latency_ms_median":610,"reported_calls_30d":38,"reported_payers_30d":8,"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 models with capabilities.reasoning. When true the reasoning is returned in message.reasoning_content, separate from content. Defaults to false.","type":"boolean"},"max_tokens":{"default":1024,"maximum":2048,"minimum":1,"type":"integer"},"messages":{"items":{"additionalProperties":false,"properties":{"content":{"description":"Text, or (user role, vision models only) an array of text and image_url parts.","oneOf":[{"type":"string"},{"items":{"oneOf":[{"additionalProperties":false,"properties":{"text":{"type":"string"},"type":{"const":"text"}},"required":["type","text"],"type":"object"},{"additionalProperties":false,"properties":{"image_url":{"additionalProperties":false,"properties":{"url":{"description":"https:// URL or data:image/(png|jpeg|webp|gif);base64 URI.","type":"string"}},"required":["url"],"type":"object"},"type":{"const":"image_url"}},"required":["type","image_url"],"type":"object"}]},"minItems":1,"type":"array"}]},"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":{"default":false,"description":"Server-sent events in OpenAI chat.completion.chunk format. Only on models with capabilities.streaming.","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":{"finish_reason":{"description":"\"length\" means max_tokens truncated the answer.","enum":["stop","length","content_filter"],"type":"string"},"message":{"properties":{"content":{"type":"string"},"reasoning_content":{"description":"Present when enable_thinking is true and the model produced reasoning.","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-11-26","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":1166,"error":null},{"day":"2026-11-25","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":721,"error":null},{"day":"2026-11-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":298,"error":null},{"day":"2026-11-23","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":297,"error":null},{"day":"2026-11-22","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":1030,"error":null},{"day":"2026-11-21","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":610,"error":null},{"day":"2026-11-20","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":520,"error":null},{"day":"2026-11-19","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":879,"error":null},{"day":"2026-11-18","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":578,"error":null},{"day":"2026-11-17","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":269,"error":null},{"day":"2026-11-16","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":623,"error":null},{"day":"2026-11-15","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":557,"error":null},{"day":"2026-11-14","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":864,"error":null},{"day":"2026-11-13","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":550,"error":null},{"day":"2026-11-12","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":1087,"error":null},{"day":"2026-11-11","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":557,"error":null},{"day":"2026-11-10","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":644,"error":null},{"day":"2026-11-09","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":659,"error":null},{"day":"2026-11-08","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":259,"error":null},{"day":"2026-11-07","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":579,"error":null},{"day":"2026-11-06","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":284,"error":null},{"day":"2026-11-05","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":262,"error":null},{"day":"2026-11-04","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":292,"error":null},{"day":"2026-11-03","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":255,"error":null},{"day":"2026-11-02","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":277,"error":null},{"day":"2026-11-01","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":261,"error":null},{"day":"2026-10-31","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":283,"error":null},{"day":"2026-10-29","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":724,"error":null}],"description_full":"Text completion using the model selected in the request body.","last_updated":"2026-11-26T01:10:34.974Z","schemes":["exact"]}