{"openapi":"3.1.0","info":{"title":"AiScale Agent Services","version":"1.1.0","description":"Pay-per-call AI APIs secured by x402 micropayments in USDC on Base. See https://agents.aiscale.pro for details.","contact":{"url":"https://agents.aiscale.pro"},"license":{"name":"MIT"}},"servers":[{"url":"https://agents.aiscale.pro"}],"paths":{"/api/v1/sentiment/{ticker}":{"get":{"operationId":"sentiment_ticker","summary":"Real-time sentiment score for a stock ticker aggregated from news + social. Returns score (-1 to 1), volume, and sources.","tags":["data-api"],"parameters":[{"in":"path","name":"ticker","required":true,"schema":{"type":"string"},"description":"Stock ticker symbol (e.g. AAPL, TSLA, BTC)"}],"responses":{"200":{"description":"Successful response. Price: $0.002 USDC settled on-chain via x402.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"ticker":"string","score":"number (-1 to 1)","label":"string (bearish|neutral|bullish)","volume":"number","sources":"number","cachedAt":"string (ISO 8601)"}}}}},"400":{"description":"Invalid request body (POST endpoints) — rejected before payment settlement."},"402":{"description":"Payment Required. The response body is empty; the x402 PaymentRequired payload is base64-encoded in the `payment-required` response header. Clients using @x402/fetch or any x402-aware client will sign and retry automatically."},"502":{"description":"Upstream failure (Anthropic or external data provider). Payment is cancelled, no settlement."}}}},"/api/v1/company/{domain}":{"get":{"operationId":"company_domain","summary":"Company profile: name, industry, employee count, funding, tech stack, and social links.","tags":["data-api"],"parameters":[{"in":"path","name":"domain","required":true,"schema":{"type":"string"},"description":"Company domain name (e.g. stripe.com)"}],"responses":{"200":{"description":"Successful response. Price: $0.005 USDC settled on-chain via x402.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"domain":"string","name":"string","description":"string","industry":"string","employeeCount":"string","founded":"string","location":"string","socialLinks":"object","techStack":"string[]"}}}}},"400":{"description":"Invalid request body (POST endpoints) — rejected before payment settlement."},"402":{"description":"Payment Required. The response body is empty; the x402 PaymentRequired payload is base64-encoded in the `payment-required` response header. Clients using @x402/fetch or any x402-aware client will sign and retry automatically."},"502":{"description":"Upstream failure (Anthropic or external data provider). Payment is cancelled, no settlement."}}}},"/api/v1/enrich/email/{email}":{"get":{"operationId":"enrich_email_email","summary":"Email enrichment: full name, company, role, LinkedIn URL, and social profiles.","tags":["data-api"],"parameters":[{"in":"path","name":"email","required":true,"schema":{"type":"string"},"description":"Email address to enrich"}],"responses":{"200":{"description":"Successful response. Price: $0.008 USDC settled on-chain via x402.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"email":"string","firstName":"string","lastName":"string","fullName":"string","company":"string","role":"string","linkedinUrl":"string","confidence":"number (0-100)"}}}}},"400":{"description":"Invalid request body (POST endpoints) — rejected before payment settlement."},"402":{"description":"Payment Required. The response body is empty; the x402 PaymentRequired payload is base64-encoded in the `payment-required` response header. Clients using @x402/fetch or any x402-aware client will sign and retry automatically."},"502":{"description":"Upstream failure (Anthropic or external data provider). Payment is cancelled, no settlement."}}}},"/api/v1/news/summary":{"get":{"operationId":"news_summary","summary":"Summarized recent news for a topic. Returns structured summaries with sources, dates, and relevance scores.","tags":["data-api"],"parameters":[{"in":"path","name":"q","required":true,"schema":{"type":"string"},"description":"Search query / topic"}],"responses":{"200":{"description":"Successful response. Price: $0.003 USDC settled on-chain via x402.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"query":"string","summaries":"Array<{ title, summary, source, url, publishedAt, relevance }>","totalResults":"number","generatedAt":"string (ISO 8601)"}}}}},"400":{"description":"Invalid request body (POST endpoints) — rejected before payment settlement."},"402":{"description":"Payment Required. The response body is empty; the x402 PaymentRequired payload is base64-encoded in the `payment-required` response header. Clients using @x402/fetch or any x402-aware client will sign and retry automatically."},"502":{"description":"Upstream failure (Anthropic or external data provider). Payment is cancelled, no settlement."}}}},"/api/v1/extract":{"post":{"operationId":"extract","summary":"Extract structured data from a URL or HTML payload. Returns clean JSON of entities, facts, and tables.","tags":["data-api"],"parameters":[],"responses":{"200":{"description":"Successful response. Price: $0.004 USDC settled on-chain via x402.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"url":"string","title":"string","entities":"Array<{ name, type, value }>","facts":"string[]","tables":"Array<object[]>","wordCount":"number"}}}}},"400":{"description":"Invalid request body (POST endpoints) — rejected before payment settlement."},"402":{"description":"Payment Required. The response body is empty; the x402 PaymentRequired payload is base64-encoded in the `payment-required` response header. Clients using @x402/fetch or any x402-aware client will sign and retry automatically."},"502":{"description":"Upstream failure (Anthropic or external data provider). Payment is cancelled, no settlement."}}}},"/api/v1/analyze/contract":{"post":{"operationId":"analyze_contract","summary":"Contract analyzer: accepts PDF URL or raw text, returns structured risk analysis, key terms, red flags, and plain-English summary.","tags":["sub-agent"],"parameters":[],"responses":{"200":{"description":"Successful response. Price: $0.10 USDC settled on-chain via x402.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"summary":"string","keyTerms":"Array<{ term, value, page }>","risks":"Array<{ severity, description, clause }>","redFlags":"string[]","overallRiskScore":"number (0-10)"}}}}},"400":{"description":"Invalid request body (POST endpoints) — rejected before payment settlement."},"402":{"description":"Payment Required. The response body is empty; the x402 PaymentRequired payload is base64-encoded in the `payment-required` response header. Clients using @x402/fetch or any x402-aware client will sign and retry automatically."},"502":{"description":"Upstream failure (Anthropic or external data provider). Payment is cancelled, no settlement."}}}},"/api/v1/review/code":{"post":{"operationId":"review_code","summary":"Code reviewer: accepts code diff or file content, returns security vulnerabilities, code smells, and optimization suggestions.","tags":["sub-agent"],"parameters":[],"responses":{"200":{"description":"Successful response. Price: $0.05 USDC settled on-chain via x402.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"summary":"string","vulnerabilities":"Array<{ severity, type, description, line }>","codeSmells":"Array<{ type, description, suggestion }>","suggestions":"string[]","overallScore":"number (0-10)"}}}}},"400":{"description":"Invalid request body (POST endpoints) — rejected before payment settlement."},"402":{"description":"Payment Required. The response body is empty; the x402 PaymentRequired payload is base64-encoded in the `payment-required` response header. Clients using @x402/fetch or any x402-aware client will sign and retry automatically."},"502":{"description":"Upstream failure (Anthropic or external data provider). Payment is cancelled, no settlement."}}}},"/api/v1/research":{"post":{"operationId":"research","summary":"Research synthesizer: accepts a question, searches multiple sources, returns a structured brief with citations.","tags":["sub-agent"],"parameters":[],"responses":{"200":{"description":"Successful response. Price: $0.15 USDC settled on-chain via x402.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"question":"string","summary":"string","keyFindings":"string[]","sections":"Array<{ title, content }>","citations":"Array<{ title, url, relevance }>","confidence":"number (0-1)"}}}}},"400":{"description":"Invalid request body (POST endpoints) — rejected before payment settlement."},"402":{"description":"Payment Required. The response body is empty; the x402 PaymentRequired payload is base64-encoded in the `payment-required` response header. Clients using @x402/fetch or any x402-aware client will sign and retry automatically."},"502":{"description":"Upstream failure (Anthropic or external data provider). Payment is cancelled, no settlement."}}}}},"components":{"securitySchemes":{"x402":{"type":"http","scheme":"x402","description":"All paid endpoints require an X-PAYMENT header carrying a signed EIP-3009 USDC authorization. See https://www.x402.org and the resource registry at /.well-known/x402."}}},"security":[{"x402":[]}]}