Enterprise Only — BitScale APIs is an Enterprise feature. Your workspace plan must be upgraded before any of these endpoints will respond successfully.
Table of Contents
- Overview
- Authentication
- Rate Limits
- Error Format
- Endpoints
- 5.1 GET /workspace — Get Workspace Details
- 5.2 GET /grids — List Grids in Workspace
- 5.3 GET /grids/:gridId — Get Grid Details
- 5.4 GET /grids/:gridId/curl — Get Grid Curl Command
- 5.5 POST /grids/:gridId/run — Run a Grid
- 5.6 GET /run/status/:requestId — Get Run Status
- 5.7 POST /api-key/rotate — Rotate API Key
- Sync vs Async Modes
- Error Code Reference
1. Overview
The BitScale External API lets you programmatically query workspace and grid metadata, trigger grid runs, poll for results, and manage your workspace API key. It is designed for use with MCP integrations, CI/CD pipelines, and any external system that needs to interact with BitScale grids automatically.Endpoints at a Glance
2. Authentication
All requests must include a workspace-level API key in theX-API-KEY header. The key uniquely identifies your workspace — no separate workspace ID header is required.
Request Header
Example
Obtaining Your API Key
- Log into your BitScale workspace.
- Navigate to Settings → Accounts → API Keys.
- Copy the displayed workspace API key.
- To generate a new key, use
POST /api/v1/api-key/rotateor rotate it from the dashboard.
⚠ Important — Your API key identifies your entire workspace. Keep it secret and never expose it in client-side code or public repositories. If compromised, rotate it immediately.
Authentication Errors
3. Rate Limits
The BitScale External API enforces a default rate limit of 5 requests per second per workspace. Rate limiting is applied globally across all endpoints — including read-only endpoints likeGET /workspace and GET /grids.
Exceeding this limit will result in a
429 Too Many Requests response. If your integration requires a higher (or lower) limit, reach out to your account manager or contact support at team@bitscale.ai to have it adjusted.
ℹ Note — Rate limits apply across all endpoints within a workspace. Polling GET /run/status/:requestId counts toward your limit, so poll at a reasonable interval (every 2–5 seconds) rather than as fast as possible.
Rate Limit Response Headers
Every API response includes the following headers so you can track your usage:Example — Rate Limit Exceeded
4. Error Format
When a request fails, the API returns a JSON object with a top-levelerror key containing a machine-readable code and a human-readable message.
Example — Missing API Key
5. Endpoints
5.1 Get Workspace Details
X-API-KEY, including plan information, credit balances, and member counts.
Request
No request body or path parameters required. The workspace is identified from theX-API-KEY header.
Response — 200 OK
Response Fields
Response Status Codes
5.2 List Grids in Workspace
X-API-KEY, along with their column definitions (runnable columns only). Supports filtering by name.
Query Parameters
Example Request
Response — 200 OK
Response Fields
Grid Object Fields
Column Object Fields (columns array)
Response Status Codes
5.3 Get Grid Details
Path Parameters
Example Request
Response — 200 OK
Response Fields
Settings Object
Column Object
Source Object
Schedule Object (when is_scheduled: true)
Response Status Codes
5.4 Get Grid Curl Command
💡 Tip for AI agents — Call this endpoint first to discover the exact input fields needed for a grid, then usePOST /grids/:gridId/runwith the returnedrequest_body.inputsshape.
Path Parameters
Query Parameters
Example Request — All Columns
Example Request — Specific Output Columns
Response — 200 OK
Response Fields
request_body Object
output_columns Array Item
Response Status Codes
5.5 Run a Grid
sync(default) — waits up to 120 seconds for completion and returns outputs directly. If still processing at the deadline, returns arequest_idto poll.async— returns arequest_idimmediately. PollGET /run/status/:requestIdfor results.
💡 Get your curl instantly — Use GET /grids/:gridId/curl to retrieve a pre-built curl command and the exact input fields required for any grid. You can also open any grid in app.bitscale.ai, click on the Data source column, select the BitScale API source, and find a ready-to-use curl command pre-filled with your grid ID, API key, and input fields. Use the output column toggles to include or exclude specific columns — the curl updates live to reflect your selection.
Path Parameters
Request Headers
Request Body
Example — Sync Mode
Example — Async Mode
Responses
200 OK — Sync Completed (run finished within 120 seconds)request_id for results)
Output Object Shape
Each key inoutputs is a column UUID. The value is an object with:
Response Status Codes
5.6 Get Run Status
request_id. Call this after receiving a request_id from POST /grids/:gridId/run — either in async mode or when sync mode times out.
ℹ Note — Poll every 2–5 seconds untilstatusis"completed"or"failed". Avoid polling more frequently as requests count toward your rate limit.
Path Parameters
Example Request
Responses
200 OK — Still RunningResponse Fields
Response Status Codes
5.7 Rotate API Key
⚠ Important — This action is irreversible. The moment this endpoint responds successfully, the key used to call it stops working. Update all integrations with the new key immediately.
Request
No request body is required. The workspace is identified from theX-API-KEY header.
Response — 200 OK
Response Fields
Response Status Codes
6. Sync vs Async Modes
When callingPOST /grids/:gridId/run, you choose how to handle the response using the mode field.
Sync Mode (default)
Setmode: "sync" or omit the field entirely.
- Server waits up to 120 seconds for the run to complete.
- On success: outputs are returned inline in the response.
- On timeout: a
request_idis returned; pollGET /run/status/:requestId. - Best for: fast grids, interactive use cases, MCP tool integrations.
Async Mode
Setmode: "async".
- Server returns a
request_idimmediately (no waiting). - Poll
GET /run/status/:requestIdevery 2–5 seconds for results. - Suitable for long-running grids (> 120 seconds).
- Best for: pipelines, batch jobs, background processing.
Sync Flow
Async Flow
7. Error Code Reference
© BitScale · api.bitscale.ai