{"openapi":"3.1.0","info":{"title":"OrganiKPI AI Search API","version":"1.0.0","description":"Pay-per-call API for AI search visibility. Payment is x402 in USDC on Base: call the endpoint, receive HTTP 402 with payment requirements, pay, retry with the payment header. No account or API key. Refund policy: https://api.organikpi.com/refunds","termsOfService":"https://api.organikpi.com/refunds"},"servers":[{"url":"https://api.organikpi.com"}],"externalDocs":{"url":"https://api.organikpi.com/docs"},"paths":{"/v1/audit":{"get":{"operationId":"auditPage","summary":"AI-readiness audit of one page ($0.03)","x-payment-info":{"protocol":"x402","price":"$0.03","asset":"USDC","network":"eip155:8453"},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","minLength":4,"maxLength":2048}}],"responses":{"200":{"description":"Audit result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Audit"}}}},"400":{"description":"Problem details (RFC 9457)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required (x402)"},"502":{"description":"Problem details (RFC 9457)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/citations":{"post":{"operationId":"checkCitations","summary":"Start a citation check for one prompt ($0.10)","x-payment-info":{"protocol":"x402","price":"$0.10","asset":"USDC","network":"eip155:8453"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CitationsRequest"}}}},"responses":{"202":{"description":"Job started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStarted"}}}},"400":{"description":"Problem details (RFC 9457)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required (x402)"},"413":{"description":"Problem details (RFC 9457)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Problem details (RFC 9457)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/citations/{id}":{"get":{"operationId":"getCitationResults","summary":"Read a citation job (free, 60 requests per minute)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Job status and results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResult"}}}},"404":{"description":"Problem details (RFC 9457)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details (RFC 9457)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/citations/{id}/retry":{"post":{"operationId":"retryCitationEngines","summary":"Re-run failed engines once each (free, 10 requests per minute)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Retry started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStarted"}}}},"404":{"description":"Problem details (RFC 9457)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Problem details (RFC 9457)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Problem details (RFC 9457)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"components":{"schemas":{"Problem":{"type":"object","description":"RFC 9457 problem details. Branch on code; retry only when retryable is true.","required":["type","title","status","code","detail","retryable"],"properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"enum":["invalid_request","url_not_allowed","not_found","method_not_allowed","payload_too_large","payment_required","rate_limited","job_not_found","no_retry_available","target_unreachable","upstream_failed","payment_service_unavailable","internal_error"]},"detail":{"type":"string"},"retryable":{"type":"boolean"},"retry_after_seconds":{"type":"integer"},"charged":{"type":"boolean","description":"false when no payment settled for this request"},"fix":{"type":"string","description":"What to change before sending again"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}}},"allowed_methods":{"type":"array","items":{"type":"string"}},"endpoints":{"type":"array","items":{"type":"string"}},"accepts":{"type":"array","items":{"type":"object"},"description":"x402 payment terms (402 only)"},"docs":{"type":"string","format":"uri"},"error":{"type":"string","description":"Same as detail"}}},"Audit":{"type":"object","properties":{"url":{"type":"string"},"score":{"type":"integer","minimum":0,"maximum":100},"checks":{"type":"object","properties":{"page_reachable":{"type":"boolean"},"indexable":{"type":"boolean"},"ai_search_crawlers_allowed":{"type":"boolean"},"not_blocked_by_user_agent":{"type":"boolean"},"server_rendered_text":{"type":"boolean"},"structured_data":{"type":"boolean"},"question_headings":{"type":"boolean"},"meta_description":{"type":"boolean"},"llms_txt":{"type":"boolean"}}},"details":{"type":"object"},"checked_at":{"type":"string","format":"date-time"}}},"CitationsRequest":{"type":"object","additionalProperties":false,"required":["prompt"],"properties":{"prompt":{"type":"string","minLength":3,"maxLength":500},"country":{"type":"string","pattern":"^[A-Za-z]{2}$","default":"US"},"engines":{"type":"array","minItems":1,"maxItems":3,"items":{"type":"string","enum":["chatgpt","google_ai_mode","gemini"]}},"brand":{"type":"string","minLength":2,"maxLength":80},"domain":{"type":"string","description":"Bare domain, e.g. example.com"}}},"JobStarted":{"type":"object","properties":{"id":{"type":"string"},"status":{"const":"running"},"poll":{"type":"string"},"typical_wait_seconds":{"type":"integer"}}},"JobResult":{"type":"object","properties":{"status":{"enum":["running","complete"]},"prompt":{"type":"string"},"country":{"type":"string"},"brand":{"type":"string"},"domain":{"type":"string"},"started_at":{"type":"string","format":"date-time"},"top_cited_domains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"count":{"type":"integer"}}}},"engines":{"type":"array","items":{"type":"object","properties":{"engine":{"enum":["chatgpt","google_ai_mode","gemini"]},"status":{"enum":["running","ready","failed","timed_out"]},"answer":{"type":"string"},"citations":{"type":"array","items":{"type":"object"}},"brand_mentioned":{"type":"boolean"},"domain_cited":{"type":"boolean"}}}}}}}}}