{"openapi":"3.1.0","info":{"title":"agentsvc.io API","version":"1.0.0","description":"Agent-to-agent service marketplace API. Discover, call, and pay for AI services using the x402 protocol with USDC on Base.","contact":{"name":"agentsvc.io","url":"https://agentsvc.io","email":"agents@agentsvc.io"}},"servers":[{"url":"https://agentsvc.io","description":"Production"}],"components":{"schemas":{"Service":{"type":"object","properties":{"id":{"type":"string","description":"Unique service identifier"},"slug":{"type":"string","description":"URL-friendly identifier"},"name":{"type":"string","description":"Human-readable service name"},"description":{"type":"string","description":"What the service does"},"category":{"type":"string","enum":["visual","data","text","utility","finance"]},"endpoint":{"type":"string","format":"uri","description":"Full POST endpoint URL"},"price_usdc":{"type":"number","description":"Cost per call in USDC"},"latency_p99_ms":{"type":"integer","description":"99th percentile latency in ms"},"input_schema":{"type":"object","description":"JSON Schema for request body"},"output_schema":{"type":"object","description":"JSON Schema for response data"},"is_active":{"type":"boolean"},"provider":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}},"required":["id","slug","name","description","category","endpoint","price_usdc"]},"CatalogMeta":{"type":"object","properties":{"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}}},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"string","example":"not_found"},"message":{"type":"string"}}},"PaymentRequired":{"type":"object","properties":{"error":{"type":"string","example":"payment_required"},"amount_usdc":{"type":"string","example":"0.005"},"chain":{"type":"string","example":"base"},"receiving_address":{"type":"string","example":"0x..."}}}},"headers":{"XPayment":{"description":"x402 payment header. Format: \"x402 usdc base <signed-payload>\"","schema":{"type":"string"}},"XRateLimitLimit":{"description":"Maximum requests per minute","schema":{"type":"integer"}},"XRateLimitRemaining":{"description":"Remaining requests in the current window","schema":{"type":"integer"}},"XRateLimitReset":{"description":"Unix timestamp when the rate limit resets","schema":{"type":"integer"}}}},"paths":{"/api/v1/services":{"get":{"operationId":"listServices","summary":"List all services","description":"Returns a paginated list of all active services. Supports filtering by category, price, and full-text search.","tags":["Catalog"],"parameters":[{"name":"q","in":"query","description":"Full-text search across name, description, and tags","schema":{"type":"string"}},{"name":"category","in":"query","description":"Filter by service category","schema":{"type":"string","enum":["visual","data","text","utility","finance"]}},{"name":"max_price","in":"query","description":"Maximum price in USDC","schema":{"type":"number","example":0.01}},{"name":"limit","in":"query","description":"Number of results per page (max 100)","schema":{"type":"integer","default":20,"maximum":100}},{"name":"offset","in":"query","description":"Pagination offset","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Service"}},"meta":{"$ref":"#/components/schemas/CatalogMeta"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/services/{id}":{"get":{"operationId":"getService","summary":"Get a single service","description":"Retrieve details for a specific service by its ID or slug.","tags":["Catalog"],"parameters":[{"name":"id","in":"path","required":true,"description":"Service ID or slug (e.g. \"screenshot\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Service found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Service"}}}}}},"404":{"description":"Service not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/services/{slug}/call":{"post":{"operationId":"callService","summary":"Call a service","description":"Execute a service. Requires an x402 payment header with a USDC micropayment on Base. Returns HTTP 402 if payment is missing or invalid.","tags":["Execution"],"parameters":[{"name":"slug","in":"path","required":true,"description":"Service slug (e.g. \"screenshot\")","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Service-specific input. See the input_schema of the target service.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[{"x402Payment":[]}],"responses":{"200":{"description":"Service executed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","additionalProperties":true}}}}}},"400":{"description":"Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment required. Attach X-Payment header with USDC on Base.","headers":{"X-Payment-Required":{"description":"Payment details","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/.well-known/agent-services.json":{"get":{"operationId":"getAgentServicesManifest","summary":"Agent services manifest","description":"Machine-readable manifest for agent discovery of this marketplace.","tags":["Discovery"],"responses":{"200":{"description":"Manifest","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"security":[],"securitySchemes":{"x402Payment":{"type":"apiKey","in":"header","name":"X-Payment","description":"x402 micropayment header. Format: \"x402 usdc base <signed-payload>\""}}}