{"uid":"cap_BCEtB6iRn5mvBePB48pgb","slug":"openai-gpt-5-4-chat-completions-x402-01fd86ce","name":"OpenAI GPT-5.4 Chat Completions (x402)","description":"gpt-5.4: OpenAI GPT 5.4 (<=272K input tokens) chat completions, paid per call in USDC. Per 1M tokens in/out: Flex (default) 1.25/7.5, Standard 2.5/15.0, Fast 5.0/30.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: none, low, medium, high, xhigh (model gpt-5.4:<level>). Empty answers are free. Rates: https://openai.mm.family/x402/pricing","url":"https://openai.mm.family/x402/v1/models/gpt-5.4/chat/completions?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"enum":["gpt-5.4","gpt-5.4:none","gpt-5.4:low","gpt-5.4:medium","gpt-5.4:high","gpt-5.4: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":"gpt-5.4","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_AqgbxLXx9vVjwSdRQPuV5","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 GPT-5.4 chat completions with up to 272K input tokens, billed per call in USDC via x402 protocol with configurable service tiers.","exampleAgentPrompt":"Send this conversation to GPT-5.4 using the standard service tier with a max of 1000 output tokens: system says 'You are a helpful assistant', user says 'Explain quantum entanglement in simple terms'.","exampleUseCases":[{"title":"On-demand AI reasoning with crypto billing","prompt":"I need to query GPT-5.4 with this prompt — 'Draft a professional apology email for a delayed shipment' — using the flex tier and cap the response at 500 tokens, and bill it to my USDC wallet via x402."},{"title":"High-throughput document summarization","prompt":"Summarize this 200,000-token legal document using GPT-5.4 with the fast service tier and a max of 2000 output tokens — I want the key clauses and obligations extracted."},{"title":"Structured JSON output from AI","prompt":"Call GPT-5.4 with the messages: system 'You are a data extractor', user 'Extract name, date, and amount from: Invoice #1234, John Doe, 2024-06-01, $450.00' — set response_format to JSON and use the standard tier with 256 max tokens."}],"resultDescription":"Returns an OpenAI-compatible chat completion JSON object containing the assistant's reply text, role, finish reason (e.g. 'stop'), token usage counts (prompt, completion, total), the model name, the service tier used, and a unique completion ID.","failureModes":["Insufficient USDC balance causes payment failure before generation begins","Exceeding 272K input token limit results in rejection — use gpt-5.4-long sibling instead","Invalid model enum value (not in allowed list) returns a 400 error","max_tokens set too high relative to available funds causes quote rejection","Empty or malformed messages array returns a validation error","Rate limits at the underlying OpenAI layer may cause 429 errors","Streaming mode (stream:true) may not be supported by all x402 proxy clients"],"whenToPreferThis":"Choose this endpoint when you need GPT-5.4 quality responses (up to 272K input tokens) and want to pay per call in USDC without a traditional OpenAI API subscription. It is ideal for agents that handle variable or unpredictable inference loads, prefer crypto-native billing, or need to run in environments where x402 payment is the available protocol. Use gpt-5.4-long for contexts exceeding 272K tokens. Choose faster/cheaper siblings (gpt-5.4-nano, o4-mini) for cost-sensitive or simpler tasks.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:41:43.593Z","isFirstParty":false,"canonicalSlug":"openai-gpt-5-4-chat-completions-x402-01fd86ce"}