{"uid":"cap_9VZbr5OgS5jNo1wc_hzsJ","slug":"openai-o4-mini-chat-completions-x402-f596b153","name":"OpenAI o4-mini Chat Completions (x402)","description":"o4-mini: OpenAI o4 Mini chat completions, paid per call in USDC. Per 1M tokens in/out: Flex (default) 0.55/2.2, Standard 1.1/4.4, Fast 2.0/8.0; pick with service_tier. Plus $0.0005 (Base) or $0.0005 (Solana) per call; the quote charges input plus 10% of max_tokens. Levels: low, medium, high, xhigh (model o4-mini:<level>). Empty answers are free. Rates: https://openai.mm.family/x402/pricing","url":"https://openai.mm.family/x402/v1/models/o4-mini/chat/completions?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"enum":["o4-mini","o4-mini:low","o4-mini:medium","o4-mini:high","o4-mini:xhigh"],"type":"string"},"tools":{"type":"array"},"stream":{"type":"boolean"},"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string"},"content":{"type":"string"}}}},"max_tokens":{"type":"integer"},"service_tier":{"enum":["flex","default","standard","auto","fast","priority"],"type":"string"},"response_format":{"type":"object"},"reasoning_effort":{"type":"string"}}},"responseSchema":{"type":"json","example":{"id":"chatcmpl-x","model":"o4-mini","usage":{"total_tokens":9,"prompt_tokens":8,"completion_tokens":1},"object":"chat.completion","choices":[{"index":0,"message":{"role":"assistant","content":"Hello","refusal":null},"finish_reason":"stop"}],"service_tier":"flex"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_0bu-OhxIgW-XG-oUGP34b","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs OpenAI o4-mini reasoning model chat completions with per-call USDC micropayment via x402 protocol, supporting adjustable reasoning effort and service tiers.","exampleAgentPrompt":"Use o4-mini with high reasoning effort to solve this multi-step math problem: if a train travels 120 miles in 90 minutes and then 200 miles in 2 hours, what is its average speed over the entire journey? Use the standard service tier and allow up to 1024 output tokens.","exampleUseCases":[{"title":"Complex reasoning on a budget","prompt":"I need to analyze this legal clause for potential ambiguities — use o4-mini at the xhigh reasoning level with the flex tier to keep costs low, and give me up to 2048 tokens of analysis."},{"title":"Automated coding assistant pipeline","prompt":"In my agent pipeline, call o4-mini:medium to review this Python function for bugs and suggest fixes — use the fast service tier so it responds quickly, max 512 tokens."},{"title":"Multi-turn tutoring session","prompt":"Walk me through solving this calculus problem step by step using o4-mini with high reasoning effort — I want detailed working, so allow up to 4096 output tokens on the standard tier."}],"resultDescription":"Returns a JSON chat completion object containing the assistant's reply message, finish reason (e.g. 'stop'), token usage breakdown (prompt, completion, total tokens), the model and service tier used, and a unique completion ID. Empty responses (no content) are billed at zero.","failureModes":["Insufficient USDC balance or x402 payment failure — returns 402 Payment Required","Invalid model enum value — returns 400 Bad Request","max_tokens exceeds model context limit — returns 400 or truncated response","Rate limiting on the chosen service tier — returns 429 Too Many Requests","Upstream OpenAI API error or timeout — returns 500 or 503"],"whenToPreferThis":"Choose this endpoint when you need OpenAI's o4-mini reasoning model with pay-per-call USDC micropayments (no subscription required), adjustable reasoning depth (low/medium/high/xhigh), and flexible cost-performance trade-offs via service tiers (flex is cheapest at $0.55/$2.2 per 1M tokens). Prefer over full o4 when cost efficiency matters and the task doesn't require maximum model capacity. Prefer over GPT-4o-class endpoints when structured multi-step reasoning is the priority.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:42:49.632Z","isFirstParty":false,"canonicalSlug":"openai-o4-mini-chat-completions-x402-f596b153"}