{"openapi":"3.1.0","info":{"title":"Maya AI Public API","version":"1.0.0","description":"Programmatic access to Maya — the AI Visibility Platform. Track how AI assistants (ChatGPT, Claude, Gemini, Perplexity and more) mention and recommend brands, and audit any domain for AI/agent readiness.\n\nMaya also exposes a Model Context Protocol (MCP) server for AI agents at `/api/mcp/v1/{transport}` (OAuth or `maya_live_` bearer token). See https://withmaya.ai/developers for the full developer guide.","contact":{"name":"Maya API Support","email":"team@withmaya.ai","url":"https://withmaya.ai/developers"},"license":{"name":"Proprietary","url":"https://withmaya.ai/terms"}},"servers":[{"url":"https://withmaya.ai","description":"Production"}],"externalDocs":{"description":"Maya developer resources","url":"https://withmaya.ai/developers"},"tags":[{"name":"Discovery","description":"Unauthenticated service metadata."},{"name":"Agent Readiness","description":"Audit a domain's AI/agent readiness."},{"name":"Audit","description":"AEO / product-page auditing."}],"paths":{"/api/v1":{"get":{"tags":["Discovery"],"operationId":"getApiIndex","summary":"API discovery index","description":"Returns the list of available endpoints, links to this OpenAPI spec, the MCP server, and developer docs. No authentication.","security":[],"responses":{"200":{"description":"Service metadata.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"documentation":{"type":"string","format":"uri"},"openapi":{"type":"string","format":"uri"},"mcp":{"type":"string","format":"uri"},"endpoints":{"type":"array","items":{"type":"object"}}}}}}}}}},"/api/v1/health":{"get":{"tags":["Discovery"],"operationId":"getHealth","summary":"Health check","description":"Liveness probe. No authentication.","security":[],"responses":{"200":{"description":"Service is healthy.","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","examples":["ok"]},"service":{"type":"string"},"time":{"type":"string","format":"date-time"}}}}}}}}},"/api/v1/agent-readiness":{"post":{"tags":["Agent Readiness"],"operationId":"scanAgentReadiness","summary":"Run an agent-readiness scan for a domain","description":"HTTP-only scan (no LLM, no browser) returning an agent-readiness score, tier, 21 checks and a 27-agent access matrix. Results are cached per domain for 24h.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string","description":"Bare registrable host, e.g. \"example.com\".","examples":["example.com"]}}}}}},"responses":{"200":{"description":"Scan result.","content":{"application/json":{"schema":{"type":"object","properties":{"cached":{"type":"boolean"},"domain":{"type":"string"},"score":{"type":"number"},"tier":{"type":"string"}}}}}},"400":{"description":"Invalid or disallowed domain.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or daily cap exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream scan failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/public/audit":{"post":{"tags":["Audit"],"operationId":"createPublicAudit","summary":"Audit a product/landing page for AI visibility","description":"Scores a single URL for AI/answer-engine visibility. No authentication (usage is tracked for abuse control).","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"}}}}}},"responses":{"201":{"description":"Audit result.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"gpt_visibility_score":{"type":"number"},"status":{"type":"string"}}}}}},"400":{"description":"Invalid request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code.","examples":["UNAUTHORIZED","INVALID_REQUEST","RATE_LIMITED"]},"message":{"type":"string","description":"Human-readable explanation."},"hint":{"type":"string","description":"Actionable resolution hint for the caller."},"details":{"description":"Optional field-level validation detail."}}}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"maya_live_… (API key) or maya_oat_… (OAuth token)","description":"Send `Authorization: Bearer <token>`. Get an API key from your Maya account settings, or connect via OAuth for MCP clients."}}},"security":[{"bearerAuth":[]}]}