{"openapi":"3.1.0","info":{"title":"AIDataParser API","version":"0.1.0","description":"Turn messy documents into clean, structured JSON. Built for AI agents."},"servers":[{"url":"https://aidataparser.com"}],"paths":{"/v1/keys":{"post":{"summary":"Create an account and issue an API key (50 free credits, no card).","operationId":"createApiKey","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"}}}}}},"responses":{"201":{"description":"API key issued."},"400":{"description":"Invalid email."}}}},"/v1/parse/document":{"post":{"summary":"Extract structured JSON from a PDF or image.","operationId":"parseDocument","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"http(s) URL to a PDF or image."},"base64":{"type":"string","description":"Base64-encoded file bytes."},"media_type":{"type":"string","description":"MIME type for base64 input (application/pdf, image/png, image/jpeg, image/gif, image/webp)."},"schema":{"type":"object","description":"Optional JSON Schema describing the desired output shape. When provided, output is guaranteed to match it."},"instructions":{"type":"string","description":"Optional natural-language extraction guidance."}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"schema":{"type":"string","description":"JSON Schema as a string."},"instructions":{"type":"string"}}}}}},"responses":{"200":{"description":"Structured extraction result.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string"},"data":{"type":"object"},"confidence":{"type":"string","enum":["high","medium","low"]},"review_needed":{"type":"boolean"},"notes":{"type":["string","null"]},"model":{"type":"string"},"credits_charged":{"type":"integer"},"credits_remaining":{"type":"integer"}}}}}},"401":{"description":"Missing or invalid API key."},"402":{"description":"Insufficient credits."},"415":{"description":"Unsupported media type."},"422":{"description":"Scanned/image-only PDF with no embedded text."}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}}