-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparseflow-openapi.json
More file actions
1 lines (1 loc) · 21.1 KB
/
parseflow-openapi.json
File metadata and controls
1 lines (1 loc) · 21.1 KB
1
{"openapi":"3.1.0","info":{"title":"parseflow","description":"Document parsing, extraction, and search API","version":"0.2.0"},"paths":{"/v2/billing/stripe/webhook":{"post":{"summary":"Stripe Webhook V2","description":"Stripe webhook endpoint.\n\nMinimal flow:\n- Verify Stripe signature (if DOCFLOW_STRIPE_WEBHOOK_SECRET is set)\n- On checkout.session.completed, issue a Parseflow API key\n- Return 200 quickly\n\nThis is intentionally minimal for fastest launch.","operationId":"stripe_webhook_v2_v2_billing_stripe_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v2/webhooks/whop":{"post":{"summary":"Whop Webhook V2","operationId":"whop_webhook_v2_v2_webhooks_whop_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v2/admin/test-email":{"post":{"summary":"Admin Test Email","description":"Admin-only endpoint to test SMTP delivery without a real purchase.","operationId":"admin_test_email_v2_admin_test_email_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v2/health":{"get":{"summary":"Health V2","operationId":"health_v2_v2_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/process":{"post":{"summary":"Process","operationId":"process_process_post","parameters":[{"name":"X-Docflow-Gateway-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Docflow-Gateway-Secret"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_process_process_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pack":{"post":{"summary":"Pack","operationId":"pack_pack_post","parameters":[{"name":"X-Docflow-Gateway-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Docflow-Gateway-Secret"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_pack_pack_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/process":{"post":{"summary":"Process V2","operationId":"process_v2_v2_process_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"X-Client-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Client-Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-BYOK-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Byok-Key"}},{"name":"X-RapidAPI-Paid-Entitlement","in":"header","required":false,"schema":{"type":"boolean","default":false,"title":"X-Rapidapi-Paid-Entitlement"}},{"name":"X-Docflow-Gateway-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Docflow-Gateway-Secret"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_process_v2_v2_process_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/analyze":{"post":{"summary":"Analyze V2","operationId":"analyze_v2_v2_analyze_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-BYOK-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Byok-Key"}},{"name":"X-RapidAPI-Paid-Entitlement","in":"header","required":false,"schema":{"type":"boolean","default":false,"title":"X-Rapidapi-Paid-Entitlement"}},{"name":"X-Docflow-Gateway-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Docflow-Gateway-Secret"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_analyze_v2_v2_analyze_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/stats":{"get":{"summary":"Stats V2","operationId":"stats_v2_v2_stats_get","parameters":[{"name":"X-Client-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Client-Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/admin/api-keys":{"post":{"summary":"Issue Api Key V2","operationId":"issue_api_key_v2_v2_admin_api_keys_post","parameters":[{"name":"X-Docflow-Admin-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Docflow-Admin-Secret"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_issue_api_key_v2_v2_admin_api_keys_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/me":{"get":{"summary":"Get Key Info V2","description":"Get information about the current API key.","operationId":"get_key_info_v2_v2_me_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/usage":{"get":{"summary":"Get Usage V2","description":"Get usage and quota information for the current API key.","operationId":"get_usage_v2_v2_usage_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/jobs":{"post":{"summary":"Create Job V2","operationId":"create_job_v2_v2_jobs_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-BYOK-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Byok-Key"}},{"name":"X-RapidAPI-Paid-Entitlement","in":"header","required":false,"schema":{"type":"boolean","default":false,"title":"X-Rapidapi-Paid-Entitlement"}},{"name":"X-Docflow-Gateway-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Docflow-Gateway-Secret"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_job_v2_v2_jobs_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/jobs/{job_id}":{"get":{"summary":"Get Job V2","operationId":"get_job_v2_v2_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/jobs/{job_id}/deliver":{"post":{"summary":"Deliver Job V2","description":"Simulate webhook delivery for a job (useful in local testing).\n\nIf callback_url is omitted, the job's deliverables are recorded and a simulated attempt is stored.","operationId":"deliver_job_v2_v2_jobs__job_id__deliver_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_deliver_job_v2_v2_jobs__job_id__deliver_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/batch":{"post":{"summary":"Batch V2","operationId":"batch_v2_v2_batch_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Docflow-Gateway-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Docflow-Gateway-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/index":{"post":{"summary":"Index Document V2","description":"Index a document for future search.\n\nThe document is processed (parsed, analyzed, extracted) and added to the search index.\nReturns the document ID that can be used for retrieval.","operationId":"index_document_v2_v2_index_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Docflow-Gateway-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Docflow-Gateway-Secret"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_index_document_v2_v2_index_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/search":{"get":{"summary":"Search V2","description":"Search indexed documents by keyword.","operationId":"search_v2_v2_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Docflow-Gateway-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Docflow-Gateway-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/search/documents":{"get":{"summary":"List Indexed Documents V2","description":"List all indexed documents with pagination.","operationId":"list_indexed_documents_v2_v2_search_documents_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Docflow-Gateway-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Docflow-Gateway-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/search/documents/{document_id}":{"get":{"summary":"Get Indexed Document V2","description":"Retrieve a specific indexed document.","operationId":"get_indexed_document_v2_v2_search_documents__document_id__get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Docflow-Gateway-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Docflow-Gateway-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Indexed Document V2","description":"Delete an indexed document.","operationId":"delete_indexed_document_v2_v2_search_documents__document_id__delete","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Docflow-Gateway-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Docflow-Gateway-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health Check","description":"Health check endpoint for deployment monitoring.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"BatchDocumentInput":{"properties":{"text":{"type":"string","title":"Text"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Id"},"chunk_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Size"},"overlap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Overlap"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"},"schema_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schema Json"}},"type":"object","required":["text"],"title":"BatchDocumentInput"},"BatchRequest":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/BatchDocumentInput"},"type":"array","title":"Documents"},"preset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preset"},"schema_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schema Json"},"enforce_schema":{"type":"boolean","title":"Enforce Schema","default":false},"chunk_size":{"type":"integer","title":"Chunk Size","default":2000},"overlap":{"type":"integer","title":"Overlap","default":200},"mode":{"type":"string","title":"Mode","default":"basic"}},"type":"object","title":"BatchRequest"},"Body_analyze_v2_v2_analyze_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"chunk_size":{"type":"integer","title":"Chunk Size","default":2000},"overlap":{"type":"integer","title":"Overlap","default":200},"mode":{"type":"string","title":"Mode","default":"deterministic"},"preset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preset"},"byok_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Byok Provider"},"byok_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Byok Model"}},"type":"object","title":"Body_analyze_v2_v2_analyze_post"},"Body_create_job_v2_v2_jobs_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"chunk_size":{"type":"integer","title":"Chunk Size","default":2000},"overlap":{"type":"integer","title":"Overlap","default":200},"mode":{"type":"string","title":"Mode","default":"deterministic"},"preset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preset"},"callback_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callback Url"},"byok_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Byok Provider"},"byok_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Byok Model"}},"type":"object","title":"Body_create_job_v2_v2_jobs_post"},"Body_deliver_job_v2_v2_jobs__job_id__deliver_post":{"properties":{"callback_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callback Url"}},"type":"object","title":"Body_deliver_job_v2_v2_jobs__job_id__deliver_post"},"Body_index_document_v2_v2_index_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Id"},"chunk_size":{"type":"integer","title":"Chunk Size","default":2000},"overlap":{"type":"integer","title":"Overlap","default":200},"mode":{"type":"string","title":"Mode","default":"basic"},"schema_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schema Json"}},"type":"object","title":"Body_index_document_v2_v2_index_post"},"Body_issue_api_key_v2_v2_admin_api_keys_post":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","title":"Body_issue_api_key_v2_v2_admin_api_keys_post"},"Body_pack_pack_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"chunk_size":{"type":"integer","title":"Chunk Size","default":2000},"overlap":{"type":"integer","title":"Overlap","default":200},"mode":{"type":"string","title":"Mode","default":"deterministic"},"zip_name":{"type":"string","title":"Zip Name","default":"pack.zip"}},"type":"object","title":"Body_pack_pack_post"},"Body_process_process_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"chunk_size":{"type":"integer","title":"Chunk Size","default":2000},"overlap":{"type":"integer","title":"Overlap","default":200},"mode":{"type":"string","title":"Mode","default":"deterministic"}},"type":"object","title":"Body_process_process_post"},"Body_process_v2_v2_process_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"chunk_size":{"type":"integer","title":"Chunk Size","default":2000},"overlap":{"type":"integer","title":"Overlap","default":200},"mode":{"type":"string","title":"Mode","default":"deterministic"},"output_format":{"type":"string","title":"Output Format","default":"json"},"include_markdown":{"type":"boolean","title":"Include Markdown","default":false},"preset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preset"},"schema_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schema Json"},"enforce_schema":{"type":"boolean","title":"Enforce Schema","default":false},"byok_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Byok Provider"},"byok_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Byok Model"}},"type":"object","title":"Body_process_v2_v2_process_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"}}},"security":[{"ApiKeyAuth":[]}]}