API Reference¶
The AIVA API provides programmatic access to the platform's core features. Use it to automate file uploads, run variant calling pipelines, interact with the AI assistant, manage databases, classify variants, export annotations, and integrate with MCP-compatible clients.
Base URL¶
All API endpoints are relative to:
Authentication¶
All API requests require authentication using an API key. Include your API key in the Authorization header:
See API Keys for instructions on creating and managing API keys.
Endpoint Summary¶
| Endpoint | Method | Path | Description |
|---|---|---|---|
| Health Check | GET | /health | Test API connection and verify key validity |
| FASTQ Upload | POST | /jobs/upload/parabricks | Upload FASTQ files for variant calling |
| FASTQ Cloud Upload | POST | /jobs/upload/parabricks | Upload FASTQ from cloud URLs |
| VCF Direct Upload | POST | /jobs/upload | Upload VCF/CSV/TSV files directly |
| VCF Cloud Upload | POST | /jobs/upload/from-cloud-url | Import VCF from cloud URL |
| VCF Annotated Upload | POST | /jobs/upload | Upload VCF with Small Variant Annotation |
| VCF Annotated Cloud Upload | POST | /jobs/upload/from-cloud-url | Import VCF from cloud with Small Variant Annotation |
| VCF SV Annotation Upload | POST | /jobs/upload | Upload VCF with Structural Variant Annotation |
| VCF SV Annotation Cloud Upload | POST | /jobs/upload/from-cloud-url | Import VCF from cloud with Structural Variant Annotation |
| Job Events (SSE) | GET | /jobs/events?token=<API_KEY> | Real-time job status via SSE |
| Job Status | GET | /jobs/{job_id}/status | Poll individual job status |
| List Jobs | GET | /jobs | List all jobs |
| Cancel Job | POST | /jobs/{job_id}/cancel | Cancel a running job |
| Delete Job | DELETE | /jobs/{job_id} | Delete a job |
| AI Chat | POST | /agents/chat/stream | Stream AI chat responses |
| Classify Variant | POST | /api/analyze/classify-variant | ACMG/AMP variant classification |
| List Tables | GET | /tables | List uploaded data tables |
| Get Table Data | GET | /tables/{table_name}/data/all | Retrieve table data |
| Delete Table | DELETE | /tables/{table_name} | Delete a table |
| Export Flags | GET | /api/variant-flags/export | Export variant flags |
| Export Comments | GET | /api/variant-comments/export | Export variant comments |
| MCP SSE | GET | /mcp/sse | MCP integration endpoint |
In This Section¶
API Keys¶
Create, manage, and revoke API keys. Verify connectivity with the health check endpoint.
Upload Endpoints¶
Upload FASTQ, VCF, CSV, and TSV files directly or via cloud URLs, with optional Small Variant Annotation or Structural Variant Annotation.
Job Monitoring¶
Monitor upload and processing jobs via SSE real-time events or polling.
Chat API¶
Interact with the AIVA AI assistant programmatically with streaming SSE responses.
Classification API¶
Classify variants using ACMG or AMP guidelines with AI-powered analysis.
Error Handling¶
The API uses standard HTTP status codes:
| Code | Meaning |
|---|---|
200 | Success |
201 | Resource created |
400 | Bad request: check your parameters |
401 | Unauthorized: invalid or missing API key |
403 | Forbidden: insufficient permissions or subscription tier |
404 | Resource not found |
429 | Rate limit exceeded |
500 | Internal server error |
Error responses include a JSON body:
Content Types¶
- File upload requests use
multipart/form-data. - JSON body requests use
application/json. - Responses are
application/jsonunless otherwise noted. - Streaming endpoints use
text/event-stream(Server-Sent Events).