{"uid":"cap_EZjSf5Ij0uItgKMF97M-b","slug":"perplexity-agent-via-paysponge-x402-fe5963ee","name":"Perplexity Agent (via paysponge x402)","description":"Create Agent Response","url":"https://pplx.x402.paysponge.com/v1/agent?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","title":"ResponsesRequest","required":["input"],"properties":{"input":{"oneOf":[{"type":"string","title":"StringInput"},{"type":"array","items":{"oneOf":[{"type":"object","title":"InputMessage","required":["type","role","content"],"properties":{"role":{"enum":["user","assistant","system","developer"],"type":"string"},"type":{"enum":["message"],"type":"string"},"content":{"$ref":"#/components/schemas/InputContent"}}},{"type":"object","title":"FunctionCallOutputInput","required":["type","call_id","output"],"properties":{"name":{"type":"string","description":"Function name (required by some providers)"},"type":{"enum":["function_call_output"],"type":"string"},"output":{"type":"string","description":"Function result (JSON string)"},"call_id":{"type":"string","description":"The call_id from function_call output"},"thought_signature":{"type":"string","description":"Base64-encoded signature from function_call"}}},{"type":"object","title":"FunctionCallInput","required":["type","call_id","name","arguments"],"properties":{"name":{"type":"string","description":"The function name"},"type":{"enum":["function_call"],"type":"string"},"call_id":{"type":"string","description":"The call_id that correlates with function_call_output"},"arguments":{"type":"string","description":"Function arguments (JSON string)"},"thought_signature":{"type":"string","description":"Base64-encoded signature for thinking models"}}}],"title":"InputItem","discriminator":{"mapping":{"message":"#/components/schemas/InputMessage","function_call":"#/components/schemas/FunctionCallInput","function_call_output":"#/components/schemas/FunctionCallOutputInput"},"propertyName":"type"}},"title":"InputItemArray"}],"title":"Input","description":"Input content - either a string or array of input items"},"model":{"type":"string","description":"Model ID in provider/model format (e.g., \"xai/grok-4-1\", \"openai/gpt-4o\").\nIf models is also provided, models takes precedence.\nRequired if neither models nor preset is provided.\n"},"tools":{"type":"array","items":{"oneOf":[{"type":"object","title":"WebSearchTool","required":["type"],"properties":{"type":{"enum":["web_search"],"type":"string","description":"Tool type identifier"},"filters":{"allOf":[{"$ref":"#/components/schemas/SearchDomainFilter"},{"$ref":"#/components/schemas/DateFilters"}],"title":"WebSearchFilters"},"max_tokens":{"type":"integer","format":"int32","description":"Maximum total tokens for search context"},"user_location":{"type":"object","title":"ToolUserLocation","properties":{"city":{"type":"string","description":"City name"},"region":{"type":"string","description":"State or region name"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code"},"latitude":{"type":"number","format":"double","description":"Latitude coordinate"},"longitude":{"type":"number","format":"double","description":"Longitude coordinate"}},"description":"User's geographic location for search personalization"},"max_tokens_per_page":{"type":"integer","format":"int32","description":"Maximum tokens to extract per search result page"}},"description":"Web search tool configuration for the Responses API"},{"type":"object","title":"FetchUrlTool","required":["type"],"properties":{"type":{"enum":["fetch_url"],"type":"string"},"max_urls":{"type":"integer","format":"int32","maximum":10,"minimum":1,"description":"Maximum number of URLs to fetch per tool call"}}},{"type":"object","title":"FunctionTool","required":["type","name"],"properties":{"name":{"type":"string","description":"The name of the function"},"type":{"enum":["function"],"type":"string"},"strict":{"type":"boolean","description":"Whether to enable strict schema validation"},"parameters":{"type":"object","description":"JSON Schema defining the function's parameters","additionalProperties":true},"description":{"type":"string","description":"A description of what the function does"}}}],"title":"Tool","discriminator":{"mapping":{"function":"#/components/schemas/FunctionTool","fetch_url":"#/components/schemas/FetchUrlTool","web_search":"#/components/schemas/WebSearchTool"},"propertyName":"type"}},"description":"Tools available to the model"},"models":{"type":"array","items":{"type":"string"},"maxItems":5,"minItems":1,"description":"Model fallback chain. Each model is in provider/model format.\nModels are tried in order until one succeeds.\nMax 5 models allowed. If set, takes precedence over single model field.\nThe response.model will reflect the model that actually succeeded.\n"},"preset":{"type":"string","description":"Preset configuration name (e.g., \"fast-search\", \"pro-search\", \"deep-research\").\nPre-configured model with system prompt and search parameters.\nRequired if model is not provided.\n"},"stream":{"type":"boolean","description":"If true, returns SSE stream instead of JSON"},"max_steps":{"type":"integer","format":"int32","maximum":10,"minimum":1,"description":"Maximum number of research loop steps.\nIf provided, overrides the preset's max_steps value.\nMust be >= 1 if specified. Maximum allowed is 10.\n"},"reasoning":{"type":"object","title":"ReasoningConfig","properties":{"effort":{"enum":["low","medium","high"],"type":"string","description":"How much effort the model should spend on reasoning"}}},"instructions":{"type":"string","description":"System instructions for the model"},"response_format":{"type":"object","title":"ResponseFormat","required":["type"],"properties":{"type":{"enum":["json_schema"],"type":"string","description":"The type of response format"},"json_schema":{"type":"object","title":"JSONSchemaFormat","required":["name","schema"],"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"description":"Name of the schema (1-64 alphanumeric chars)"},"schema":{"type":"object","description":"The JSON schema object","additionalProperties":true},"strict":{"type":"boolean","description":"Whether to enforce strict schema validation"},"description":{"type":"string","description":"Optional description of the schema"}},"description":"Defines a JSON schema for structured output validation"}},"description":"Specifies the desired output format for the model response"},"max_output_tokens":{"type":"integer","format":"int32","minimum":1,"description":"Maximum tokens to generate"},"language_preference":{"type":"string","description":"ISO 639-1 language code for response language"}}},"responseSchema":{"type":"object","title":"ResponsesResponse","required":["id","object","created_at","status","model","output"],"properties":{"id":{"type":"string","description":"Unique identifier for the response"},"error":{"type":"object","title":"ErrorInfo","required":["message"],"properties":{"code":{"type":"string","description":"Error code"},"type":{"type":"string","description":"Error type category"},"message":{"type":"string","description":"Human-readable error message"}},"description":"Error information returned when a request fails"},"model":{"type":"string","description":"Model used for generation"},"usage":{"type":"object","title":"ResponsesUsage","required":["input_tokens","output_tokens","total_tokens"],"properties":{"cost":{"type":"object","title":"ResponsesCost","required":["currency","input_cost","output_cost","total_cost"],"properties":{"currency":{"enum":["USD"],"type":"string","description":"Currency code for cost values"},"input_cost":{"type":"number","format":"double","description":"Cost for input tokens in USD"},"total_cost":{"type":"number","format":"double","description":"Total cost for the request in USD"},"output_cost":{"type":"number","format":"double","description":"Cost for output tokens in USD"},"cache_read_cost":{"type":"number","format":"double","description":"Cost for cache reads in USD"},"tool_calls_cost":{"type":"number","format":"double","description":"Cost for tool call invocations in USD"},"cache_creation_cost":{"type":"number","format":"double","description":"Cost for cache creation in USD"}},"description":"Cost breakdown for a Responses API request"},"input_tokens":{"type":"integer","format":"int64","description":"Number of input tokens used"},"total_tokens":{"type":"integer","format":"int64","description":"Total tokens used (input + output)"},"output_tokens":{"type":"integer","format":"int64","description":"Number of output tokens generated"},"tool_calls_details":{"type":"object","description":"Details about tool call invocations","additionalProperties":{"type":"object","title":"ToolCallDetails","properties":{"invocation":{"type":"integer","format":"int64","description":"Number of times this tool was invoked"}},"description":"Details about a tool call invocation"}},"input_tokens_details":{"type":"object","properties":{"cache_read_input_tokens":{"type":"integer","format":"int64","description":"Tokens read from cache"},"cache_creation_input_tokens":{"type":"integer","format":"int64","description":"Tokens used for cache creation"}}}},"description":"Token usage and cost information for a Responses API request"},"object":{"enum":["response"],"type":"string","title":"ResponsesObjectType","description":"Object type in API responses"},"output":{"type":"array","items":{"oneOf":[{"type":"object","title":"MessageOutputItem","required":["type","id","status","role","content"],"properties":{"id":{"type":"string"},"role":{"enum":["assistant"],"type":"string","title":"RoleType","description":"Role in a message"},"type":{"enum":["message"],"type":"string"},"status":{"enum":["completed","failed","in_progress","requires_action"],"type":"string","title":"Status","description":"Status of a response or output item"},"content":{"type":"array","items":{"type":"object","title":"ContentPart","required":["type","text"],"properties":{"text":{"type":"string"},"type":{"$ref":"#/components/schemas/ContentPartType"},"annotations":{"type":"array","items":{"$ref":"#/components/schemas/Annotation"}}}}}}},{"type":"object","title":"SearchResultsOutputItem","required":["type","results"],"properties":{"type":{"enum":["search_results"],"type":"string"},"queries":{"type":"array","items":{"type":"string"}},"results":{"type":"array","items":{"type":"object","title":"SearchResult","required":["id","url","title","snippet"],"properties":{"id":{"type":"integer","format":"int64","description":"Unique numeric identifier for the result"},"url":{"type":"string","description":"URL of the search result page"},"date":{"type":"string","description":"Publication date of the result"},"title":{"type":"string","description":"Title of the search result page"},"source":{"$ref":"#/components/schemas/SearchSource","description":"Source type of the result"},"snippet":{"type":"string","description":"Text snippet from the search result"},"last_updated":{"type":"string","description":"Date the result was last updated"}},"description":"A single search result used in LLM responses"}}}},{"type":"object","title":"FetchUrlResultsOutputItem","required":["type","contents"],"properties":{"type":{"enum":["fetch_url_results"],"type":"string"},"contents":{"type":"array","items":{"type":"object","title":"UrlContent","required":["url","title","snippet"],"properties":{"url":{"type":"string","description":"The URL from which content was fetched"},"title":{"type":"string","description":"The title of the page"},"snippet":{"type":"string","description":"The fetched content snippet"}},"description":"Content fetched from a URL"}}}},{"type":"object","title":"FunctionCallOutputItem","required":["type","id","status","name","call_id","arguments"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"enum":["function_call"],"type":"string"},"status":{"enum":["completed","failed","in_progress","requires_action"],"type":"string","title":"Status","description":"Status of a response or output item"},"call_id":{"type":"string","description":"Correlates with function_call_output input"},"arguments":{"type":"string","description":"JSON string of arguments"},"thought_signature":{"type":"string","description":"Base64-encoded opaque signature for thinking models"}}}],"title":"OutputItem","discriminator":{"mapping":{"message":"#/components/schemas/MessageOutputItem","function_call":"#/components/schemas/FunctionCallOutputItem","search_results":"#/components/schemas/SearchResultsOutputItem","fetch_url_results":"#/components/schemas/FetchUrlResultsOutputItem"},"propertyName":"type"}},"description":"Array of output items (messages, search results, tool calls)"},"status":{"enum":["completed","failed","in_progress","requires_action"],"type":"string","title":"Status","description":"Status of a response or output item"},"created_at":{"type":"integer","format":"int64","description":"Unix timestamp when the response was created"}},"description":"Non-streaming response returned when stream is false"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/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_7bfixmw5RUtpYEqpUsjos","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates an AI response for a given input using selectable models, with optional web search and reasoning capabilities, paid per-call via x402/USDC.","exampleAgentPrompt":"Use the Perplexity agent endpoint to answer this question with web search enabled: 'What are the latest developments in fusion energy as of this week?' — use the sonar model and give me a detailed, reasoned response.","exampleUseCases":null,"resultDescription":"Returns a structured response object containing a unique response ID, the model used, the generated text output, token usage counts (input, output, total), and a detailed cost breakdown in USD (input cost, output cost, tool call costs, total cost). May also include function call outputs if tools were used.","failureModes":["Missing required 'input' field returns a 400 validation error","Invalid model ID returns an error indicating unrecognized provider/model format","Insufficient x402 USDC payment returns a 402 Payment Required response","Rate limiting or quota exceeded returns a 429 error","Malformed function_call_output (missing call_id) causes a 400 error","Network timeout on long-running reasoning tasks"],"whenToPreferThis":"Choose this endpoint when you need a single-call AI generation with optional live web search and reasoning, billed per-call via x402 USDC micropayments — ideal for agents that want to pay only for what they use without API key management. Prefer over the async Sonar endpoint when you want a synchronous response. Prefer over the Search endpoint when you need a synthesized natural language answer rather than raw web content.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T00:39:20.602Z","isFirstParty":false,"canonicalSlug":"perplexity-agent-via-paysponge-x402-fe5963ee"}