Complete REST API reference with authentication, endpoints, rate limits, and response formats.
The TaskForceAI API is accessible through our web dashboard. Follow these steps:
Navigate to Settings → API Keys
Make requests to the API
All API requests require an x-api-key header:
Build and test your integration without an API key using mock mode:
Both SDKs support a mock mode that simulates API responses locally:
Run a local mock server using the TaskForceAI CLI:
This starts a local server at http://localhost:4321/api/developer that mirrors the production API. Point your SDK at this URL:
Include these headers in all requests:
/api/developer/runSubmit a task for multi-agent orchestration.
Options:
• modelId: (String) ID of the AI model to use (e.g., xai/grok-4.1). See /api/v1/models for available IDs.
• silent: (Boolean) If true, suppresses detailed logging.
• mock: (Boolean) If true, returns a simulated response for testing.
/api/v1/modelsGet a list of available AI models and their capabilities.
/api/developer/status/[taskId]Check the status of a submitted task.
/api/developer/results/[taskId]Get the final result of a completed task.
Manage persistent conversations using Threads. This allows for multi-turn interactions and state management directly on the TaskForceAI platform.
/api/v1/developer/threadsInitialize a new conversation thread.
/api/v1/developer/threads/[threadId]/runsTrigger an orchestration run within an existing thread.
Watch the multi-agent orchestrator think in real-time using Server-Sent Events.
/api/v1/stream/[taskId]Subscribe to real-time events from the orchestrator.
Upload documents (PDF, CSV, TXT) that agents can analyze during a run.
/api/v1/filesUpload a file via multipart/form-data.
Rate limits vary by plan tier:
| Tier | Requests/Month | Rate Limit | Price |
|---|---|---|---|
| Free | 8 | 2/week | $0 |
| Pro | ~1,500 | 2/hour | $28/mo |
| Super | ~15,000 | 20/hour | $280/mo |
Rate limit information is included in response headers: x-ratelimit-remaining and x-ratelimit-reset.
request-idUnique identifier for debugging and support
x-ratelimit-remainingNumber of requests remaining in current window
x-ratelimit-resetUnix timestamp when the rate limit resets
| Code | Description |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 404 | Not Found - Task ID does not exist |
| 413 | Request Too Large - Exceeds size limit |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error - Contact support |