{"uid":"cap_1cmjxvjFb-gReCl0WN9Hi","slug":"payai-api-key-vending-endpoint-34137e1e","name":"PayAI API Key Vending Endpoint","description":"PayAI facilitator API key + credits for the requested USD amount","url":"https://merchant.payai.network/api/v1/keys/vend?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","properties":{"keyName":{"type":"string","maxLength":64},"recoveryEmail":{"type":"string","pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$","maxLength":254}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"queryParams":{"type":"object","properties":{"amount":{"type":"string","pattern":"^\\d+(\\.\\d{1,2})?$","description":"USD amount"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["credits","account","next"],"properties":{"next":{"type":"object"},"apiKey":{"type":"object"},"account":{"type":"object"},"credits":{"type":"object"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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":"$1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_yOzAtHQ4sm65vwu_nu49Y","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"1","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Issues a new PayAI API key with purchased credits for a specified USD amount, paid via USDC","exampleAgentPrompt":"Can you buy me a PayAI API key with $10 worth of credits? Name the key 'my-agent-key' and use recovery email dev@example.com.","exampleUseCases":[{"title":"Bootstrap agent with paid API access","prompt":"I need to get a PayAI API key loaded with $25 in credits for my new AI agent project — name it 'project-alpha' and set the recovery email to team@mycompany.com."},{"title":"Quick credit top-up via new key","prompt":"Can you vend me a PayAI key with $5 in credits using the recovery email personal@gmail.com? Just use a short name like 'quick-key'."},{"title":"Automated key provisioning for a fleet","prompt":"Set up a new PayAI API key called 'fleet-node-7' with $50 of credits, recovery email ops@aifleet.io, so I can plug it into my agent deployment."}],"resultDescription":"Returns a JSON object containing the newly created API key details, account information, purchased credit balance, and next-step guidance for using the key.","failureModes":["Insufficient USDC payment — payment of exactly $1 USDC per call is required via x402 protocol","Invalid amount format — query param must match pattern ^\\d+(\\.\\d{1,2})?$","Invalid recovery email format — must match standard email pattern","Key name too long — maximum 64 characters","Payment not confirmed — USDC transaction may fail or timeout","Missing required fields — type, method, bodyType, and body must all be present"],"whenToPreferThis":"Use this endpoint when you need to programmatically purchase and provision a new PayAI API key funded with a specific USD-denominated credit balance in a single atomic call, especially in agentic or automated workflows that need fresh credentials on demand. Prefer this over manual dashboard key creation when operating in agent pipelines that require self-funded API access.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T06:31:07.308Z","isFirstParty":false,"canonicalSlug":"payai-api-key-vending-endpoint-34137e1e"}