Programmatic access for developers.
Everything in the web app is available via API. Run apps, execute flows, and interact with agents from your own code.
For direct HTTP access, see REST API overview — including the response envelope, RFC 9457 errors, and the OpenAPI route catalog at GET /openapi.json.
Quick Start
1. Get an API Key
- Go to settings → workspace → api keys
- Click Create API Key
- Copy your key (starts with
inf_)
2. Install an SDK
1pip install inferencesh23# With async support4pip install inferencesh[async]3. Run Your First App
1from inferencesh import inference23client = inference(api_key="inf_your_key")45result = client.run({6 "app": "infsh/echo",7 "input": {"message": "Hello from the API!"}8})910print(result["output"])What's Available?
Building Apps
→ Extend overview — CLI setup, app code, deploy, and related guides
SDK Reference
Full SDK documentation with tabbed Python/JavaScript examples (Swift where supported).
- SDK Overview — Installation, quick start
- JavaScript SDK — TypeScript/JavaScript reference
- Python SDK — Python reference
- Swift SDK — Swift reference (iOS, macOS, Linux)
- 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 — Base URL, response format, errors, OpenAPI catalog
- Entitlements — Plan limits, usage (
GET /entitlements/usage), and feature flags - Tasks — Run apps, status, webhooks, cancellation
- Flow runs — Execute saved flows programmatically
- Remotes — Register outbound daemons and opt in to command execution
- Exec runs — Dispatch commands to remotes and stream output
- Apps — App metadata, versions, set active version
- Agents — Chat sessions and structured
output - Search — Discover apps, skills, and knowledge
- Instance types — Public GPU catalog, hourly pricing, and daily price history
- Skills · Knowledge — Registry and knowledge entries
- Streaming — SSE for tasks and agent chats
- Billing · Subscription — Balance top-ups and plan management
Response format
Every JSON response is { "data": ..., "messages": [...] } and errors are RFC 9457 problem details. The SDKs unwrap data. See REST overview — response format.
Authentication
All API calls require an API key in the header:
1from inferencesh import inference23client = inference(api_key="inf_your_key")4# Or read INFERENCE_API_KEY from the environment:5# client = inference()Task Status Codes
Numeric status codes are returned on task objects and webhook payloads. Common values:
| Status | Code | Meaning |
|---|---|---|
| Queued | 2 | Waiting for worker |
| Running | 7 | Executing |
| Completed | 10 | Done |
| Failed | 11 | Error occurred |
| Cancelled | 12 | Cancelled |
| Rejected | 13 | Refused before running: the workspace has no balance or no payment method. The input is kept; the run can be retried. |
Rate Limits
| Endpoint | Limit |
|---|---|
| Run task | 100/minute |
| Get task | 1000/minute |
| Upload file | 50/minute |