This document covers all public endpoints exposed by the FastAPI backend.
Base URL (default): http://127.0.0.1:8642
- REST prefix:
/api - Progress WebSocket:
/api/jobs/{job_id}/progress
Authentication is optional and controlled by server startup config.
- If API key authentication is enabled (
--api-keyorAF3_API_KEY), send:Authorization: Bearer <token>for HTTP requests, or?token=<token>query parameter for WebSocket.
- If API key authentication is disabled, no token is required.
- Validation failures in request schemas return FastAPI
422responses. - Domain-level validation in
/api/validateis returned in the response body (valid=false) instead of raising an HTTP error. - Common status codes:
400,403,404,409,422,429,500,502,504.
Submit a new prediction job.
- Request body:
JobSubmission- Includes job metadata, sequences/entities, seeds, optional restraints, and runtime overrides.
- Response:
JobCreated- Includes job ID and initial status.
- Errors:
429when queue capacity is exceeded.
List jobs with filters and pagination.
- Query parameters:
status(optional)search(optional)page(>= 1)page_size(1-100)
- Response:
PaginatedJobs- Includes list of
JobSummaryitems and pagination metadata.
- Includes list of
Get full details for one job.
- Response:
JobDetail - Errors:
404when job is not found.
Cancel a pending or running job.
- Response:
{ "status": "cancelled" } - Errors:
404if job does not exist.400if job is already terminal.409if cancellation races with terminal completion.
Delete a terminal job (completed, failed, cancelled).
- Response:
{ "status": "deleted" } - Errors:
404if job does not exist.400if job is still pending/running.
Return aggregate confidence output for a completed job.
- Response:
ConfidenceResult- Top-level metrics, sample list, best sample index, complex flag.
- Errors:
404missing job or confidence file.400job not completed.500confidence file cannot be parsed.
Return per-sample confidence details.
- Response:
SampleConfidence- Includes per-sample pLDDT/PAE arrays and optional restraint satisfaction details.
- Errors:
404missing job or sample.
Download raw confidence JSON file.
- Response:
application/jsonfile response. - Errors:
404missing job or confidence file.400job not completed.
Download ZIP archive of job outputs.
- Response: ZIP stream (
application/zip) - Errors:
404missing job or output directory.400job not completed.
Open output directory in Finder.
- Response:
{ "status": "opened" } - Security limits:
- Localhost only request origin.
- macOS only.
- Errors:
400when unsupported platform.403when not local request.404missing job or directory.
Download one ranked structure as mmCIF.
- Response:
chemical/x-mmciffile response. - Errors:
404missing job or structure file.400job not completed.
Run input validation without starting a job.
- Request body:
ValidationRequest - Response:
ValidationResultvalidboolean- error list
- estimated memory and sequence stats
Check if MSA/template data is already cached for input sequences.
- Request body:
CacheCheckRequest - Response:
CacheCheckResponsecachedboolean- optional cache key, timestamp, and size
Return backend readiness and runtime environment info.
- Response:
SystemStatus- Model loaded state
- Hardware summary
- Queue size
- Version/build metadata
- Pipeline mode flag
Parse an uploaded structure file (.pdb, .cif, .mmcif) into supported input JSON.
- Request: multipart/form-data with file field
- Response:
StructureParseResult - Errors:
422on unsupported extension or parse failure.
Fetch a structure by PDB ID from RCSB and convert to input JSON.
- Response:
StructureParseResult - Errors:
422malformed PDB ID or value errors.404PDB ID not found upstream.504upstream timeout.502upstream service or network failure.
Real-time job progress stream used by the web UI.
- Message payload: serialized progress objects (
type, stage/progress fields, terminal events). - Idle keepalive: periodic ping payloads.
- Authentication:
- If API key is enabled,
tokenquery parameter is required.
- If API key is enabled,
- Origin policy:
- Origin must match host, localhost, or configured CORS origins.
- Close/error codes:
4001invalid or missing token.4003origin rejected.4004unknown job.
# System status
curl http://127.0.0.1:8642/api/system/status
# Submit job
curl -X POST http://127.0.0.1:8642/api/jobs \
-H 'Content-Type: application/json' \
-d @examples/desi1_monomer.json
# Validate without enqueueing
curl -X POST http://127.0.0.1:8642/api/validate \
-H 'Content-Type: application/json' \
-d @examples/desi1_monomer.json