API Authentication
All requests to the Swiss System Control Plane must be authenticated via the X-API-Key header. Unauthorized requests will return a 401 Static Failure.
File Upload
Upload files directly via multipart/form-data. The system creates ingestion jobs automatically and returns job IDs for tracking.
Request Body (multipart/form-data)
| Field | Type | Required | Description |
|---|---|---|---|
| files | File[] | Yes | Files to upload (can be multiple) |
| priority | string | No | low, normal (default), or high |
| pipeline_id | string | No | Pipeline configuration UUID |
| metadata | string (JSON) | No | Custom metadata as JSON string |
curl -X POST "http://localhost:8000/api/v1/upload" \
-H "X-API-Key: your-api-key" \
-F "files=@document.pdf" \
-F "files=@image.png" \
-F "priority=high" \
-F 'metadata={"department":"finance"}'Endpoint Mapping
Use the following mapping to connect your UI controllers to the appropriate Antigravity REST resources.
| UI Module / Component | Method | Resource Endpoint |
|---|---|---|
| List Jobs | GET | /api/v1/jobs |
| Create Job | POST | /api/v1/jobs |
| Upload Files | POST | /api/v1/upload |
| Ingest from URL | POST | /api/v1/upload/url |
| RAG Calibration | POST | /api/v1/search/hybrid |
| Vector Inspector | GET | /api/v1/jobs/{id}/chunks |
| Pipeline Config | POST | /api/v1/pipelines |
Real-time Updates
The System Live status indicator uses a hybrid polling mechanism. For high-frequency telemetry, establish a WebSocket connection to the stream endpoint.
Polling Interval
Recommended 5000ms jitter-controlled polling for heartbeat verification.
WebSocket Stream
wss://api.antigravity.sys/v1/telemetry/live
Code Snippet
async function performHybridSearch(query: string) {const response = await fetch('https://api.antigravity.sys/v1/search/hybrid', { method: 'POST', headers: {'Content-Type': 'application/json','X-API-Key': '550e8400-e29b-41d4-a716-446655440000'}, body: JSON.stringify({ query: query, alpha: 0.5, limit: 10, filters: { status: 'active'} }) });if (!response.ok) {throw new Error('ANTIGRAVITY_SYNC_ERR'); }return await response.json(); }
Technical Flow Diagram
Rate Limiting Alert
Production keys are restricted to 500 requests/sec. Contact Swiss System OPS for high-throughput clearance or to request a dedicated pipeline instance.