{"uid":"cap_Xm59-qGQ6kd-uUiJIfP01","slug":"openai-gpt-4-1-mini-chat-completions-x402-usdc-a391e488","name":"OpenAI GPT-4.1 Mini Chat Completions (x402/USDC)","description":"gpt-4.1-mini: OpenAI GPT 4.1 Mini chat completions, paid per call in USDC. Per 1M tokens in/out: Standard (default) 0.4/1.6, Fast 0.7/2.8; 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-mini/chat/completions?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"enum":["gpt-4.1-mini"],"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-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":"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_fIZIxhhnmzJjuMzGbb2Uo","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 GPT-4.1 Mini chat completions via an x402 pay-per-call USDC micropayment gateway, with configurable service tiers (standard/fast) and optional tool use.","exampleAgentPrompt":"Using GPT-4.1 Mini via the x402 gateway, send this conversation — system: 'You are a helpful assistant', user: 'Summarize the key benefits of renewable energy in 3 bullet points' — with a max of 300 tokens and the standard service tier.","exampleUseCases":[{"title":"Agent reasoning step on a budget","prompt":"Have GPT-4.1 Mini decide which of these three options is best for my customer support case: escalate to human, send a refund, or send a templated reply — here's the case context: [customer complained about delayed shipment, order #4421]. Keep the response under 200 tokens and use the standard tier."},{"title":"Structured JSON extraction from text","prompt":"Use GPT-4.1 Mini to extract the name, date, and amount from this invoice text and return it as JSON: 'Invoice from Acme Corp, dated March 15 2025, total due $1,240.00'. Set max_tokens to 150 and use the fast service tier."},{"title":"Lightweight creative content generation","prompt":"Ask GPT-4.1 Mini to write a punchy 2-sentence product tagline for my new app called 'FocusFlow' — it's a Pomodoro timer for remote teams. Use the standard tier and cap it at 100 tokens."}],"resultDescription":"Returns a JSON chat completion object containing the assistant's reply message, finish reason (e.g. 'stop'), token usage counts (prompt, completion, total), a completion ID, the model name, and the service tier used. The response mirrors the OpenAI Chat Completions API format.","failureModes":["Insufficient USDC balance or failed x402 payment — returns 402 Payment Required","Invalid or missing messages array — returns 400 Bad Request","max_tokens set too high relative to quote budget — may be rejected or truncated","Empty/trivial assistant response — billed as free (no charge for empty answers)","Rate limits or upstream OpenAI errors — may return 429 or 500","Unsupported service_tier value — rejected with validation error"],"whenToPreferThis":"Choose this endpoint when you need cost-effective GPT-4.1 Mini chat completions billed in USDC on a per-call basis via the x402 protocol — ideal for AI agents operating in crypto-native environments, or when you want fine-grained per-call spending control without a monthly subscription. Prefer this over gpt-4.1 or o3 endpoints on the same gateway when task complexity does not require a larger model, and over gpt-4.1-nano when you need slightly more capability at a modest price increase.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:42:30.784Z","isFirstParty":false,"canonicalSlug":"openai-gpt-4-1-mini-chat-completions-x402-usdc-a391e488"}