{"uid":"cap_72ZO_t4UhQFvM26fBxeCu","slug":"openai-gpt-4-1-chat-completions-x402-usdc-de902e98","name":"OpenAI GPT-4.1 Chat Completions (x402/USDC)","description":"gpt-4.1: OpenAI GPT 4.1 chat completions, paid per call in USDC. Per 1M tokens in/out: Standard (default) 2.0/8.0, Fast 3.5/14.0; pick with service_tier. Plus $0.0005 (Base) or $0.0005 (Solana) per call; the quote charges input plus 10% of max_tokens. Empty answers are free. Rates: https://openai.mm.family/x402/pricing","url":"https://openai.mm.family/x402/v1/models/gpt-4.1/chat/completions?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"enum":["gpt-4.1"],"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-4.1","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":"default"}},"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_QXHe9GYcA7DVJ4U2wGxKC","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-4.1 chat completions via a pay-per-call USDC gateway using the x402 payment protocol, with configurable service tiers (standard, fast, flex).","exampleAgentPrompt":"Using the GPT-4.1 model on the mm.family x402 gateway with standard service tier, answer this multi-turn conversation: the system says 'You are a helpful assistant' and the user asks 'What are three key differences between supervised and unsupervised learning?' — limit the response to 500 tokens.","exampleUseCases":[{"title":"Crypto-native AI agent reasoning","prompt":"I'm building an autonomous agent that needs to reason over tool outputs and generate structured JSON replies — use GPT-4.1 via the x402 USDC gateway with the standard tier and cap it at 1000 tokens so costs stay predictable."},{"title":"Cost-controlled content drafting","prompt":"Draft a professional two-paragraph LinkedIn post about our product launch using GPT-4.1 on mm.family, using the fast service tier and limiting output to 300 tokens to keep the cost low."},{"title":"Tool-augmented chatbot backend","prompt":"Send this conversation history to GPT-4.1 — system prompt is 'You are a customer support agent', and the user's latest message is 'How do I reset my password?' — use the default service tier and allow up to 200 tokens in the reply."}],"resultDescription":"Returns a standard OpenAI-compatible chat completion JSON object containing the assistant's message text, finish reason (e.g. 'stop'), token usage breakdown (prompt, completion, total), model name, and the service tier that was applied. Empty responses when the answer is empty are provided at no charge.","failureModes":["Insufficient USDC balance or failed x402 payment — request rejected before inference","max_tokens set too high causes quote to exceed available balance","Unsupported service_tier value returns validation error","Malformed messages array (missing 'role' or 'content') causes 400 error","Model unavailable or rate-limited on the upstream OpenAI side — 503 or 429 propagated","Streaming mode (stream:true) may require specific client handling not supported by all x402 clients"],"whenToPreferThis":"Choose this endpoint when you need GPT-4.1 quality chat completions and want to pay per-call in USDC without managing an OpenAI API key or subscription — ideal for crypto-native agents, x402-compatible wallets, or workflows where on-chain micropayments are required. Prefer the 'standard' tier for cost efficiency or 'fast' for lower latency. If you need a cheaper model, prefer gpt-4.1-nano; for the latest model alias, prefer chat-latest.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:42:34.467Z","isFirstParty":false,"canonicalSlug":"openai-gpt-4-1-chat-completions-x402-usdc-de902e98"}