Strait provides official SDKs for TypeScript, Python, Go, Ruby, and Rust — all with full feature parity. This guide covers how to use the SDKs to interact with the Strait API and integrate SDK endpoints into your job code.Documentation Index
Fetch the complete documentation index at: https://docs.strait.dev/llms.txt
Use this file to discover all available pages before exploring further.
For detailed per-language documentation, see the SDK Reference.
Installing an SDK
Configuration
The recommended approach is astrait.json file at your project root plus the STRAIT_API_KEY environment variable:
strait.json, environment variable overrides, and alternative configuration methods.
SDK Run Endpoints
Strait provides specialized endpoints under/sdk/v1/runs/{runID}/ for job executors to communicate progress, logs, and state back to the system.
Authentication
SDK run endpoints require a JWT Run Token:- Header:
Authorization: Bearer <run_token> - Token Source: Provided in the response when a job is triggered
Available Endpoints
| Endpoint | Method | Description |
|---|---|---|
/log | POST | Send structured logs (message, level, type, data) |
/progress | POST | Report completion percentage (percent, message, step) |
/annotate | POST | Add metadata annotations (max 50 per run) |
/heartbeat | POST | Signal the job is alive (prevents timeout) |
/checkpoint | POST | Save resumable state (state JSON) |
/usage | POST | Report AI model usage (provider, model, tokens, cost_microusd) |
/tool-call | POST | Record external tool invocation |
/output | POST | Store structured results/artifacts |
/complete | POST | Mark run as successfully completed |
/fail | POST | Mark run as failed |
/wait-for-event | POST | Pause run until external event arrives |
/spawn | POST | Create a child job run |
/continue | POST | Create a continuation run |
Using SDK Run Endpoints
Wait for External Events
Pause a run and wait for an external event (approvals, webhooks, third-party callbacks):What’s Next?
SDK Reference
Full SDK documentation — feature parity table, architecture, and per-language guides.
Configuration
strait.json schema reference, environment variable overrides, and migration guide.