Skip to main content
Everything Fibre does is available through one HTTP API. The SDKs are built on top of it, and you can also call it directly from any programming language. This page explains the rules that apply to every request. After it, each endpoint has its own page in this section, listing its parameters, its request body, every possible response with its status code, and a playground where you can send a real request with your own key.

Base URL

Send every request to this address. Every path starts with /v1.

Authentication

Every request must include your API key, sent as a bearer token in the Authorization header:
curl
response
Keys start with fb_live_. You can create keys that are limited to certain actions, to one sandbox, or to a set lifetime: see API keys. The only request that works without a key is GET /v1/pricing.

Requests and responses

The API follows a few consistent conventions:

Status codes

The HTTP status code tells you at a glance whether a request worked and, if not, what kind of problem occurred:

Errors

When a request fails, the answer always has the same JSON shape:
error
In your code, check code, which never changes, rather than error, which is a sentence meant for people and may be reworded. If you ask us about a failure, include the request_id: it lets us find your exact request. Every code is listed in the error list, and errors, retries and limits explains how to handle them.

Safe retries

If a request to create a sandbox times out, you cannot tell whether the sandbox was created. To retry safely, send an Idempotency-Key header with POST /v1/sandboxes. If you send the same key again within 24 hours, Fibre returns the first sandbox instead of creating another one. Use a new key for each sandbox you mean to create.

Pagination

Lists can be long, so they are returned one page at a time. GET /v1/sandboxes returns up to limit items (50 by default, at most 200). When there are more, the answer includes a next_cursor. Send it back as cursor to get the next page. The last page has no next_cursor.

Streaming

Some answers arrive gradually rather than all at once. When you read a command’s output with follow=1, the connection stays open and Fibre sends one JSON object per line as the command writes output, ending with an end line. Read the answer line by line, for example with curl -N or a streaming fetch.

Waking

Sandboxes go to sleep when they are idle. Calls that need a sleeping sandbox (exec, commands, files, browser, desktop) wake it first and then answer, so they take a moment longer than usual. Simply reading a sandbox’s details (GET /v1/sandboxes/{id}) does not wake it.