Programmatic access for developers.
Everything in the workspace is available via API. Run apps, execute flows, and interact with agents from your own code.
Quick Start
1. Get an API Key
- Go to Settings → API Keys
- Click Create API Key
- Copy your key (starts with
inf_)
2. Install an SDK
1pip install inferencesh2 3# With async support4pip install inferencesh[async]3. Run Your First App
1from inferencesh import inference2 3client = inference(api_key="inf_your_key")4 5result = client.run({6 "app": "infsh/echo",7 "input": {"message": "Hello from the API!"}8})9 10print(result["output"])What's Available?
SDK Reference
Full SDK documentation with tabbed Python/JavaScript examples.
- SDK Overview — Installation, quick start
- Running Apps — Execute apps programmatically
- Streaming — Real-time progress updates
- Files — Upload and download files
Agent SDK
Build headless AI agents with tools and multi-turn conversations.
- Agent Overview — Agent SDK introduction
- Template Agents — Use existing agents
- Ad-hoc Agents — Create agents programmatically
- Building Tools — Define custom tools
REST API
Use any language with the REST API.
- REST Overview — API endpoints
- Tasks — Task management
- Streaming — SSE streaming
Authentication
All API calls require an API key in the header:
1from inferencesh import inference2 3client = inference(api_key="inf_your_key")4# Or use environment variable:5# client = inference(api_key=os.environ["INFERENCE_API_KEY"])Task Status Codes
| Status | Code | Meaning |
|---|---|---|
| Queued | 2 | Waiting for worker |
| Running | 7 | Executing |
| Completed | 10 | Done! |
| Failed | 11 | Error occurred |
| Cancelled | 12 | Cancelled by user |
Rate Limits
| Endpoint | Limit |
|---|---|
| Run task | 100/minute |
| Get task | 1000/minute |
| Upload file | 50/minute |