Base URL
All API requests are made to:
https://platform.aifano.com
Authentication
Every request requires a Bearer token in the Authorization header:
Authorization: Bearer ak_live_your_api_key_here
API keys are created in the Aifano Studio under Settings → API Keys. See Authentication for details.
All endpoints accept JSON request bodies with Content-Type: application/json:
curl -X POST "https://platform.aifano.com/parse" \
-H "Authorization: Bearer $AIFANO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input": "https://example.com/document.pdf"}'
Responses are JSON with a consistent structure. Successful responses include:
{
"job_id": "job_abc123",
"duration": 2.34,
"usage": {
"num_pages": 5,
"credits": 5
},
"result": { ... }
}
Error responses include an error field:
{
"error": "Description of what went wrong"
}
See Response Format and Error Codes for details.
Endpoints Overview
Document Processing
| Method | Endpoint | Description |
|---|
POST | /parse | Parse a document into structured JSON |
POST | /parse_async | Parse a document asynchronously |
POST | /extract | Extract structured data using a JSON schema |
POST | /extract_async | Extract data asynchronously |
POST | /split | Split a document into logical sections |
POST | /split_async | Split a document asynchronously |
POST | /edit | Edit or fill forms in a document |
POST | /edit_async | Edit a document asynchronously |
Pipelines
| Method | Endpoint | Description |
|---|
POST | /pipeline | Run a pipeline on a document |
POST | /pipeline_async | Run a pipeline asynchronously |
Files & Jobs
| Method | Endpoint | Description |
|---|
POST | /upload | Upload a document to Aifano storage |
GET | /job/{job_id} | Get the status and result of an async job |
GET | /jobs | List all jobs for your organization |
POST | /cancel/{job_id} | Cancel a running or pending job |
All processing endpoints accept a document reference via the input field:
| Input Type | Format | Example |
|---|
| Public URL | https://... | https://example.com/doc.pdf |
| Presigned URL | https://...?signature=... | S3, GCS, Azure presigned URLs |
| Aifano reference | aifano://... | aifano://abc123.pdf |
| Job reference | jobid://... | jobid://job_abc123 |
SDKs & Libraries
SDKs are coming soon. In the meantime, use the REST API directly with any HTTP client.
Need Help?