{"uid":"cap_cBWasCGEjUPJHNt1zcB6c","slug":"api-paysponge-com-ff1853f6","name":"PaySponge LLM Text Completions","description":"Unlock LLM text completions via PaySponge payments, accepting on-chain USDC (eip155:8453) and Solana SPL token payments with exact, time-limited receipts.","url":"https://api.paysponge.com/x402/purchase/svc_d5zgtpg00dvssgj28/completions","method":"POST","headers":{},"bodySchema":{"type":"object","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["prompt","models"],"properties":{"models":{"type":"array","items":{"type":"string"},"description":"List of model identifiers to use (e.g. OpenRouter model names like 'gpt-4o-mini')"},"prompt":{"type":"string","description":"The input text prompt for LLM completion"},"max_tokens":{"type":"integer","description":"Maximum number of tokens to generate in the completion. Should be set to a value the account can afford."}},"additionalProperties":true},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","additionalProperties":true}},"additionalProperties":false}},"additionalProperties":false},"responseSchema":{"type":"object","required":["id","object","created","model","provider","system_fingerprint","choices","usage"],"properties":{"id":{"type":"string"},"model":{"type":"string"},"usage":{"type":"object","required":["prompt_tokens","completion_tokens","total_tokens","cost","is_byok","prompt_tokens_details","cost_details","completion_tokens_details","service_tier"],"properties":{"cost":{"type":"number"},"is_byok":{"type":"boolean"},"cost_details":{"type":"object","required":["upstream_inference_cost","upstream_inference_prompt_cost","upstream_inference_completions_cost"],"properties":{"upstream_inference_cost":{"type":"number"},"upstream_inference_prompt_cost":{"type":"number"},"upstream_inference_completions_cost":{"type":"number"}}},"service_tier":{"type":"null"},"total_tokens":{"type":"number"},"prompt_tokens":{"type":"number"},"completion_tokens":{"type":"number"},"prompt_tokens_details":{"type":"object","required":["cached_tokens","cache_write_tokens","audio_tokens","video_tokens"],"properties":{"audio_tokens":{"type":"number"},"video_tokens":{"type":"number"},"cached_tokens":{"type":"number"},"cache_write_tokens":{"type":"number"}}},"completion_tokens_details":{"type":"object","required":["reasoning_tokens","image_tokens","audio_tokens"],"properties":{"audio_tokens":{"type":"number"},"image_tokens":{"type":"number"},"reasoning_tokens":{"type":"number"}}}}},"object":{"type":"string"},"choices":{"type":"array","items":{"type":"object","required":["index","text","reasoning","logprobs","finish_reason","native_finish_reason"],"properties":{"text":{"type":"string"},"index":{"type":"number"},"logprobs":{"type":"null"},"reasoning":{"type":"null"},"finish_reason":{"type":"string"},"native_finish_reason":{"type":"string"}}}},"created":{"type":"number"},"provider":{"type":"string"},"system_fingerprint":{"type":"string"}}},"example":{"request":{"input":{"body":{"models":["gpt-4o-mini"],"prompt":"Hello","max_tokens":100},"type":"http","method":"POST","bodyType":"json"}},"response":{"id":"gen-1781036566-HSW2tseOV86mcr1aW5AK","model":"openai/gpt-4o-mini","usage":{"cost":0.0000072,"is_byok":false,"cost_details":{"upstream_inference_cost":0.0000072,"upstream_inference_prompt_cost":0.0000012,"upstream_inference_completions_cost":0.000006},"service_tier":null,"total_tokens":18,"prompt_tokens":8,"completion_tokens":10,"prompt_tokens_details":{"audio_tokens":0,"video_tokens":0,"cached_tokens":0,"cache_write_tokens":0},"completion_tokens_details":{"audio_tokens":0,"image_tokens":0,"reasoning_tokens":0}},"object":"text_completion","choices":[{"text":"Hello! How can I assist you today?","index":0,"logprobs":null,"reasoning":null,"finish_reason":"stop","native_finish_reason":"stop"}],"created":1781036566,"provider":"Azure","system_fingerprint":"fp_4dcfea0a44"}},"exampleRequest":{"models":["gpt-4o-mini"],"prompt":"Hello","max_tokens":100},"tags":["x402"],"displayCostAmount":"0.010000","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.010000/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_grPfAOmcViNkIr4UTB3Ao","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates LLM text completions gated by on-chain crypto payments (USDC on Base or Solana SPL tokens) via the x402 payment protocol.","exampleAgentPrompt":"Using PaySponge's pay-per-call completions endpoint, generate a short product description for a wireless ergonomic keyboard — pay with USDC on Base via the x402 protocol.","exampleUseCases":null,"resultDescription":"A JSON response containing an LLM-generated text completion, returned after a valid on-chain USDC (Base/EIP-155:8453) or Solana SPL token payment is confirmed via the x402 protocol.","failureModes":["Payment not provided or expired receipt — 402 Payment Required response","Insufficient USDC or SPL token balance — payment rejected","Invalid or malformed POST body — 400 Bad Request","Time-limited receipt expired before request processed — authentication failure","Unsupported chain or token — payment method not accepted"],"whenToPreferThis":"Choose this endpoint when your agent needs LLM text completions in a trustless, pay-per-use model using on-chain crypto payments (USDC on Base or Solana SPL tokens) without requiring traditional API keys or subscriptions, particularly in Web3-native or autonomous agent contexts using the x402 protocol.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:38:40.832Z","isFirstParty":false}