Skip to content
EleforkDocs
Internal preview. Elefork is not publicly available yet; APIs and hostnames may change.

Operations, retries and errors

Asynchronous calls, idempotency keys, errors and quotas.

Calls that change a branch (create, checkpoint, reset, pause, wake, delete) return 202 Accepted with an operation:

{"operation": {"id": "op_...", "kind": "reset", "state": "pending", ...}}

Poll GET /v1/operations/{id}?wait=10s. The server holds the request up to wait (max 30 s) and returns as soon as state is succeeded or failed. On success, result has details such as the new generation. On failure, error says why. The SDK and CLI wait for you by default.

Send an Idempotency-Key header with any mutating call. If the network fails, retry with the same key and body:

Retry Response
Same key, same body, first request finished The first response again, with Idempotent-Replayed: true
Same key, first request still running 409 request_in_progress
Same key, different body 422 idempotency_mismatch

Keys are kept for 24 hours. The Python SDK adds a key to every mutating call and retries automatically.

Every error has the same shape:

{"error": {"code": "not_found", "message": "not found"}}
Status Codes
400 invalid_request, invalid_json
401 unauthorized
404 not_found (also for resources in another organization)
409 conflict, not_running, request_in_progress
422 idempotency_mismatch
429 quota_exceeded, rate_limited
501 not_implemented (L1/L2), not_configured
503 wake_failed

Defaults per organization:

Quota Default
Branches (excluding deleted) 100,000
Running or creating branches 1,000
Branch creations per minute 600
Branches per create call (count) 100