# Authenticate requests to the Darkbloom API Source: https://docs.darkbloom.dev/api/authentication Create and manage API keys for the Darkbloom API. Keys start with sk-db- and are passed as Authorization: Bearer tokens on every request. Every request to the Darkbloom API requires a credential in the `Authorization` header. API keys use `Bearer sk-db-...`. The coordinator reads credentials only from that header: it ignores `x-api-key`, so clients that send only that header (the Anthropic SDK's default `api_key` option) must be configured to send a bearer token instead. ## Getting an API key **1. Sign in to the console** Create an account at [console.darkbloom.dev](https://console.darkbloom.dev). Email is the only console login method. **2. Open the API console** Open the API console page (`/api-console`) and choose **Create key**. **3. Create a key** Copy the secret when it is shown. It is returned only by create and rotate and cannot be retrieved later. A new key looks like: ``` sk-db-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ``` **4. Add credits** API calls are metered. Add credits from **Billing** before sending inference requests. A request whose worst-case reservation cannot be covered returns `402`. > [!WARNING] > > Store your API key in an environment variable or secrets manager. Never commit it to source control or expose it in client-side code. ## Sending the key ``` Authorization: Bearer sk-db-your-key-here ``` ```bash curl theme={null} curl https://api.darkbloom.dev/v1/models \ -H "Authorization: Bearer sk-db-your-key-here" ``` ```python Python theme={null} from openai import OpenAI client = OpenAI( base_url="https://api.darkbloom.dev/v1", api_key="sk-db-your-key-here", ) ``` ```javascript Node.js theme={null} import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.darkbloom.dev/v1", apiKey: "sk-db-your-key-here", }); ``` > [!NOTE] > > Keys minted before the rename start with `eigeninference-` and remain valid, because lookups are by hash rather than by prefix. New keys start with `sk-db-`. ## Key settings A key can carry a spend budget, request and token limits, an allowed-model list, an expiry, or `self_route_only` (for a key that may use only the account's own machines). The settings are enforced in the request prelude: * `rpm_limit` → `429` before the account limiter. * `allowed_models` → `403 model_not_allowed`. * An exhausted `limit_usd` → `402`. * `expires_at` and `disabled` → `401`. ## Manage keys Key management requires a Privy session JWT. Calling these routes with an API key returns `403 forbidden`. ```bash theme={null} POST /v1/keys # create; response {key, data} GET /v1/keys # list GET /v1/keys/{id} # inspect one PATCH /v1/keys/{id} # change limits, name, models, expiry POST /v1/keys/{id}/rotate # new secret, same settings DELETE /v1/keys/{id} # revoke GET /v1/key # inspect the calling key (accepts the API key) ``` `POST /v1/auth/keys` and `DELETE /v1/auth/keys` are the older one-key-per-account endpoints. They still work, but the `/v1/keys` family is the managed surface. A revocation or limit change can take up to the coordinator's API-key cache TTL to apply everywhere. Create a key with limits: ```bash theme={null} curl -X POST https://api.darkbloom.dev/v1/keys \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"name": "ci", "limit_usd": 25, "limit_reset": "monthly", "rpm_limit": 60}' ``` `limit_usd` accepts at most six decimal places. `limit_reset` is `none`, `daily`, `weekly` or `monthly`, aligned to UTC midnight, Monday and the 1st. `GET /v1/keys` shows `usage_usd`, `limit_usd` and `remaining_usd` per key. The older mint returns `{api_key, account_id}`; the managed create returns `{key, data}`. A key's `label` masks the secret to its prefix, first four and last four characters. ## Authentication errors **401 authentication_error** `error` The `Authorization` header is missing or the key is unknown, disabled, expired or revoked. Check that you pass the full `sk-db-...` value as a bearer token. **402 insufficient_funds / insufficient_quota** `error` The balance cannot cover the request's reservation, or the key's spend cap is exhausted. Add credits in the console under **Billing**, or raise the key's `limit_usd`. **403 forbidden** `error` An API key was used on a route that requires a Privy session, such as key management or payout setup. **403 model_not_allowed** `error` The requested model is outside the key's `allowed_models` list. **429 rate_limit_exceeded** `error` A key, account or token limit was hit, or serving capacity is unavailable. Wait for `Retry-After`. # Send chat completions with the Darkbloom API Source: https://docs.darkbloom.dev/api/chat-completions Use POST /v1/chat/completions to run multi-turn conversations on Darkbloom. Fully OpenAI-compatible, with streaming, system prompts, and trust headers. `POST /v1/chat/completions` is the primary inference endpoint. It is fully compatible with the OpenAI Chat Completions API, so you can point any OpenAI SDK at Darkbloom by changing the base URL — no other code changes required. The endpoint supports both streaming (server-sent events) and non-streaming responses. ## Request parameters **model** `string` *required* The model ID to use for this request. See [Models](/api/models) for the full list of available IDs. **messages** `object[]` *required* The conversation history as an array of message objects. Each message has a `role` (`system`, `user`, or `assistant`) and a `content` string. **stream** `boolean` (default: false) When `true`, the response is delivered as a stream of server-sent events. Each event contains a delta chunk in the standard OpenAI SSE format, ending with `data: [DONE]`. **max_tokens** `number` Maximum number of tokens to generate. If you omit it, the coordinator uses the model's `max_output_length` from `GET /v1/models`, cut to what the prompt leaves of the model's context. The worst-case cost of this bound is reserved before dispatch. **temperature** `number` Sampling temperature between 0 and 2. Lower values produce more deterministic output. ## Examples ### Basic request ```bash curl theme={null} curl https://api.darkbloom.dev/v1/chat/completions \ -H "Authorization: Bearer sk-db-your-key-here" \ -H "Content-Type: application/json" \ -d '{ "model": "gemma-4-26b", "messages": [ {"role": "user", "content": "Explain gradient descent in one paragraph."} ] }' ``` ```python Python theme={null} from openai import OpenAI client = OpenAI( base_url="https://api.darkbloom.dev/v1", api_key="sk-db-your-key-here", ) response = client.chat.completions.create( model="gemma-4-26b", messages=[ {"role": "user", "content": "Explain gradient descent in one paragraph."} ], ) print(response.choices[0].message.content) ``` ```javascript Node.js theme={null} import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.darkbloom.dev/v1", apiKey: "sk-db-your-key-here", }); const response = await client.chat.completions.create({ model: "gemma-4-26b", messages: [ { role: "user", content: "Explain gradient descent in one paragraph." }, ], }); console.log(response.choices[0].message.content); ``` ### Streaming ```bash curl theme={null} curl https://api.darkbloom.dev/v1/chat/completions \ -H "Authorization: Bearer sk-db-your-key-here" \ -H "Content-Type: application/json" \ -d '{ "model": "gemma-4-26b", "messages": [ {"role": "user", "content": "Write a haiku about distributed systems."} ], "stream": true }' ``` ```python Python theme={null} from openai import OpenAI client = OpenAI( base_url="https://api.darkbloom.dev/v1", api_key="sk-db-your-key-here", ) stream = client.chat.completions.create( model="gemma-4-26b", messages=[ {"role": "user", "content": "Write a haiku about distributed systems."} ], stream=True, ) for chunk in stream: delta = chunk.choices[0].delta.content or "" print(delta, end="", flush=True) ``` ```javascript Node.js theme={null} import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.darkbloom.dev/v1", apiKey: "sk-db-your-key-here", }); const stream = await client.chat.completions.create({ model: "gemma-4-26b", messages: [ { role: "user", content: "Write a haiku about distributed systems." }, ], stream: true, }); for await (const chunk of stream) { process.stdout.write(chunk.choices[0]?.delta?.content ?? ""); } ``` ### With a system prompt ```bash curl theme={null} curl https://api.darkbloom.dev/v1/chat/completions \ -H "Authorization: Bearer sk-db-your-key-here" \ -H "Content-Type: application/json" \ -d '{ "model": "gemma-4-26b", "messages": [ {"role": "system", "content": "You are a concise technical assistant. Answer in bullet points only."}, {"role": "user", "content": "What are the trade-offs of using SSE vs WebSockets?"} ], "max_tokens": 512, "temperature": 0.3 }' ``` ```python Python theme={null} from openai import OpenAI client = OpenAI( base_url="https://api.darkbloom.dev/v1", api_key="sk-db-your-key-here", ) response = client.chat.completions.create( model="gemma-4-26b", messages=[ { "role": "system", "content": "You are a concise technical assistant. Answer in bullet points only.", }, { "role": "user", "content": "What are the trade-offs of using SSE vs WebSockets?", }, ], max_tokens=512, temperature=0.3, ) print(response.choices[0].message.content) ``` ## Response headers Every response from the inference endpoint includes trust metadata headers that let you verify which provider handled the request and inspect their attestation status. | Header | Description | | - | - | | `X-Provider-Id` | Connection ID; join with `GET /v1/providers/attestation` | | `X-Provider-Authorization-Method` | `app_attest`, `legacy`, `dual` or `none` | | `X-Provider-Verification` | Compact JSON with the frozen verification snapshot | | `X-Provider-Trust-Level` | `none`, `self_signed` or `hardware` (legacy evidence; `hardware` is historical) — see [Trust levels](/security/trust-levels) | | `X-Provider-Attested` | `true` or `false` | | `X-Provider-Encrypted` | `true` when the provider has a registered X25519 key | | `X-Provider-Secure-Enclave` | `true` or `false` | | `X-Provider-Mda-Verified` | Historical: present only for a legacy connection that still carries Managed Device Attestation evidence. It grants nothing, and no current provider has it | | `X-Provider-Chip` | Apple Silicon chip name | | `X-Provider-Model` | Mac hardware model identifier | | `X-Attestation-Se-Public-Key` | The provider's Secure Enclave P-256 public key (base64) | | `X-Inference-Job-ID` | Job ID for this request | The coordinator writes these headers over TLS; they are its assertion, not a provider-signed receipt. Optional provider-generated `se_signature` and `response_hash` fields in a successful body are separate. ## Related endpoints **`POST /v1/responses`** — OpenAI Responses API alias. The coordinator auto-detects the `input` vs `messages` field shape and routes to the same underlying handler. **`POST /v1/completions`** — Legacy text completions endpoint. Accepts a `prompt` string instead of a `messages` array. This is the older OpenAI `/v1/completions` format, not recommended for new integrations. **`POST /v1/messages`** — Anthropic Messages API compatible endpoint. Use this if you are working with the Anthropic Python or TypeScript SDK. See the note below. > [!NOTE] > > To use the Anthropic SDK, set `base_url="https://api.darkbloom.dev"` (without `/v1`) and pass your Darkbloom API key as `auth_token`. The SDK appends `/v1/messages` automatically. Do not use its `api_key` option: that sends `x-api-key`, which the coordinator ignores. ## Thinking tags Some models emit extended thinking wrapped in `...` tags. These tags are stripped from responses by default before the content reaches you. The final `content` field contains only the model's visible output. # Browse and select Darkbloom models Source: https://docs.darkbloom.dev/api/models Use GET /v1/models to see which models are listed, compare capabilities and prices, and choose a model for your workload. `GET /v1/models` returns the models currently listed on the Darkbloom network. The response follows the OpenAI models list format and adds Darkbloom metadata: pricing, context limits, modalities, capability flags and live provider counts. The catalog is database-driven. Public aliases are maintained by the coordinator, so this page does not reproduce a fixed list: call the endpoint and use the `id` values it returns. ## Request ```bash curl theme={null} curl https://api.darkbloom.dev/v1/models \ -H "Authorization: Bearer sk-db-your-key-here" ``` ## Response format **object** `string` Always `"list"`. **data** `object[]` Array of model objects. **model object fields** **id** `string` The model ID to pass in inference requests: an alias ID, or a build ID for an un-aliased build. **object** `string` Always `"model"`. **created** `number` Registry entry creation time in Unix seconds; 0 when there is no registry record. **owned_by** `string` Always `"eigeninference"`. **name** `string` Display name. **hugging_face_id** `string` Upstream weights identifier, when known. **description** `string` Registry description. **input_modalities** `string[]` `["text"]` plus `image`, `audio` or `video` when the build supports them. Embedding models report `["text"]` and `["embedding"]` output. **output_modalities** `string[]` `["text"]`, or `["embedding"]`. **quantization** `string` Quantization of a concrete build. Omitted on alias entries, which can span quantizations. **context_length** `number` Maximum prompt plus completion context of the primary build. **max_output_length** `number` The `max_tokens` a request gets when it names none. A public request is cut to what the prompt leaves of `context_length`. **pricing** `object` USD per unit as decimal strings: `prompt`, `completion`, `image`, `request` and `input_cache_read`. `input_cache_read` is the rate for prompt tokens served from a provider's prefix cache. **supported_sampling_parameters** `string[]` Sampling fields the model accepts. **supported_features** `string[]` Capability vocabulary: `tools`, `json_mode`, `structured_outputs`, `logprobs`, `web_search`, `reasoning`. Omitted when none. **metadata** `object` Darkbloom metadata: `model_type`, `quantization`, `provider_count`, `attested_providers`, `trust_level`, `attestation`, `display_name`, `routable_providers`, `warm_providers`, `can_accept`. ## Live availability The `metadata` block separates catalog membership from current capacity: * `provider_count` — providers currently advertising the build. * `attested_providers` — how many of them passed attestation. * `trust_level` — aggregate trust level: `none`, `self_signed` or `hardware`. * `routable_providers` — providers eligible to receive this model now. A two-Mac pair that serves the public counts once. * `warm_providers` — providers with the model loaded. * `can_accept` — whether at least one provider can accept a request now. `GET /v1/models/capacity` exposes the same live counts without authentication. Zero `routable_providers` is a capacity shortfall, not a missing model: a request queues or ends in `429 rate_limit_exceeded` with `Retry-After`, rather than `503 model_unavailable`. ## Choosing a model Use the capability fields rather than a model name: * `input_modalities` includes `image`, `audio` or `video` for models that accept that media. * `supported_features` includes `tools` for tool calling, `structured_outputs` or `json_mode` for structured output, and `reasoning` for reasoning controls. * `context_length` and `max_output_length` bound the request. * `pricing` tells you what a token costs. A request for an ID that `GET /v1/models` does not return fails with `404 model_not_found`. A key created with `allowed_models` can use only those IDs and otherwise fails with `403 model_not_allowed`. # Add credits and pay for Darkbloom usage Source: https://docs.darkbloom.dev/billing/add-credits Load a prepaid balance with Stripe, confirm the deposit, and grant consent for Darkbloom Sandbox CI jobs. Darkbloom uses a prepaid balance: you add funds before making inference requests or running sandbox jobs, and usage is deducted as it settles. Deposits go through Stripe Checkout. ## Add credits in the console **1. Sign in to the console** Go to [console.darkbloom.dev](https://console.darkbloom.dev) and sign in with your email address. **2. Open billing** Navigate to **Billing** and choose **Buy Credits**. **3. Enter an amount** Enter the amount you want to add. The minimum deposit is **\$0.50**. **4. Complete Stripe checkout** You are redirected to a Stripe-hosted checkout page. Enter your card details and confirm the payment. **5. Wait for the webhook** The coordinator credits your balance when Stripe delivers `checkout.session.completed`, usually within seconds. The redirect back to the console does not itself apply the credit. ## Add credits with the API Create a Checkout session with your API key: ```bash theme={null} curl -X POST https://api.darkbloom.dev/v1/billing/stripe/create-session \ -H "Authorization: Bearer $DARKBLOOM_API_KEY" \ -H "Content-Type: application/json" \ -d '{"amount_usd": "10.00"}' ``` `amount_usd` is a string and must be at least `0.50`. The response includes the Stripe URL to open and the coordinator's session ID: ```json theme={null} { "session_id": "3f0e...", "stripe_session": "cs_live_...", "url": "https://checkout.stripe.com/c/pay/cs_live_...", "amount_usd": "10.00", "amount_micro_usd": 10000000 } ``` Poll the session to confirm the credit: ```bash theme={null} curl "https://api.darkbloom.dev/v1/billing/stripe/session?id=3f0e..." \ -H "Authorization: Bearer $DARKBLOOM_API_KEY" ``` `status` moves from `pending` to `completed` after the webhook is processed. A session owned by another account returns `404`. > [!NOTE] > > A deposit is spendable but not withdrawable. Only earnings (provider payouts and referral rewards) count toward the withdrawable balance. ## Check your balance after deposit ```bash theme={null} curl https://api.darkbloom.dev/v1/payments/balance \ -H "Authorization: Bearer $DARKBLOOM_API_KEY" ``` ## Pay for Darkbloom Sandbox jobs Darkbloom Sandbox bills the account that consents to pay for a GitHub App installation. Grant consent with the installation ID the sandbox service shows you: ```bash theme={null} curl -X PUT https://api.darkbloom.dev/v1/sandbox/consents/12345678 \ -H "Authorization: Bearer " ``` Each job holds the price of 60 minutes of its runner class from your balance when it starts, then charges per second with a one-minute minimum and returns the rest. Infrastructure failures are released and cost nothing; jobs on your own provider Mac are free. Read the current rates and platform fee with: ```bash theme={null} curl https://api.darkbloom.dev/v1/sandbox/rates \ -H "Authorization: Bearer " ``` Before Darkbloom publishes prices this route returns `503 sandbox_billing_unavailable`, and no job can start. List your charges or revoke consent with `GET /v1/sandbox/charges` and `DELETE /v1/sandbox/consents/{installation_id}`. > [!WARNING] > > Do not close the Stripe checkout tab before the payment completes. If you do and the payment goes through, the credit still applies once the webhook arrives, but it may take a few seconds. See [Pricing](/billing/pricing) for how credits are consumed and how sandbox jobs are metered. # Pricing: inference tokens and sandbox jobs Source: https://docs.darkbloom.dev/billing/pricing How Darkbloom charges for inference and Darkbloom Sandbox jobs, how the prepaid balance works, and how to fetch current rates and usage. Darkbloom has two paid products with separate pricing. Inference is charged per token from a prepaid credit balance. Darkbloom Sandbox CI jobs are charged per second of runner time, with a one-minute minimum. There are no subscription or seat fees. ## Inference pricing Inference rates are per token and vary by model. The catalog and its prices are maintained by the coordinator, so fetch the current values instead of relying on a fixed table: ```bash theme={null} curl https://api.darkbloom.dev/v1/pricing ``` `GET /v1/models` repeats the same prices in each model's `pricing` block (`prompt`, `completion`, `input_cache_read`, `image`, `request`). The request path is described in [Billing](/billing/add-credits). Prices are µUSD per 1,000,000 tokens; the `*_usd` fields are the same rates as USD per 1M tokens. This snapshot was read from the live endpoint on 2026-11-16: | Model | Input | Output | Cache read | | - | -: | -: | -: | | `EigenLabs/Qwen3.8-27B-4bit-mtp` | \$0.0350 | \$1.5000 | \$0.0175 | | `EigenLabs/Ternary-Bonsai-2-9B-MLX-2bit` | \$0.0800 | \$0.1300 | \$0.0400 | | `gemma-4-26b` | \$0.0400 | \$0.1500 | \$0.0100 | | `gemma-4-26b-8bit` | \$0.0400 | \$0.1500 | \$0.0100 | | `gemma-4-26b-qat-4bit` | \$0.0400 | \$0.1500 | \$0.0100 | | `glm-5.3-flash` | \$0.0650 | \$0.1800 | \$0.0120 | | `gpt-oss-20b` | \$0.0180 | \$0.0900 | \$0.0090 | | `mimo-v2.6-flash-mopd` | \$0.1000 | \$0.2800 | \$0.0028 | | `nvidia-nemotron-3.5-lightning` | \$0.0250 | \$0.1200 | \$0.0125 | | `nvidia-nemotron-3.5-super` | \$0.0600 | \$0.3500 | \$0.0100 | | `qwen3.5-35b-a3b` | \$0.0650 | \$0.7500 | \$0.0325 | | `Qwen3.5-9B` | \$0.0800 | \$0.1300 | \$0.0400 | | `qwen3.6-35b-a3b-vl-mtp-mxfp8` | \$0.0500 | \$0.7000 | \$0.0250 | | `qwen3.8-flash-next` | \$0.1300 | \$0.4000 | \$0.0650 | | `qwen3-vl-30b-a3b-instruct` | \$0.0900 | \$0.4000 | \$0.0450 | | `RecursiveSI/flint-int4` | \$0.0500 | \$0.4000 | \$0.0250 | | `ternary-bonsai-2-27b` | \$0.0750 | \$0.5000 | \$0.0375 | If a model has no price row, the fallback rates are $0.0500 input, $0.2000 output and \$0.0250 cache read per 1M tokens. During the public alpha the platform fee is 0%, so providers keep 100% of the per-token revenue. A provider may set its own price only at or below the platform price, so a request never bills a token above the rate `GET /v1/pricing` shows. ### How inference billing works 1. Before dispatch, the coordinator reserves the worst-case cost: the estimated prompt plus the full output bound (your `max_tokens`, or the model's default when you omit it). 2. When the request settles, the coordinator charges the actual token counts and refunds the unused part of the reservation. 3. If the balance cannot cover the reservation, the request is refused with `402` (`insufficient_funds`), not `403`. A per-key spend cap has its own `402` (`insufficient_quota`). Prompt tokens served from a provider's prefix cache bill at the model's cache-read rate and are reported as `usage.prompt_tokens_details.cached_tokens`. ## Darkbloom Sandbox pricing Sandbox CI jobs are priced per runner class and minute, then billed per second: * A job holds the price of 60 minutes of its runner class when it starts. * It settles on the seconds it actually ran, with a **one-minute minimum** and a **60-minute maximum**. * The current price sheet keeps a **10% fee**; the provider receives **90%** of the job's time charge. * Jobs that fail for infrastructure reasons are released and cost nothing. * Jobs that run on the payer's own provider Mac are free. * A job keeps the price in effect when it started, even if prices change while it runs. Signed-in accounts read the current runner-class rates and fee from `GET /v1/sandbox/rates`. Before Darkbloom publishes a price sheet, that route returns `503 sandbox_billing_unavailable` and no job can start. The formulas and constants are in the coordinator's pricing reference; the customer-facing consent and charge routes are in [Add credits](/billing/add-credits#pay-for-darkbloom-sandbox-jobs). ## Check your balance ```bash theme={null} curl https://api.darkbloom.dev/v1/payments/balance \ -H "Authorization: Bearer $DARKBLOOM_API_KEY" ``` The response includes your spendable balance and the withdrawable amount (provider earnings and referral rewards): ```json theme={null} { "balance_micro_usd": 5000000, "balance_usd": "5.000000", "withdrawable_micro_usd": 0, "withdrawable_usd": "0.000000" } ``` `balance_micro_usd` is the canonical integer value. `withdrawable_micro_usd` is the part you earned and can withdraw; deposits and invite credits are spendable but not withdrawable. ## Check usage history ```bash theme={null} curl https://api.darkbloom.dev/v1/payments/usage \ -H "Authorization: Bearer $DARKBLOOM_API_KEY" ``` Each entry in `usage` is a settled request: ```json theme={null} { "usage": [ { "job_id": "a3f1c2e7-84bb-4d9a-91f3-2b7e6d4a0c18", "model": "", "prompt_tokens": 412, "cached_tokens": 0, "completion_tokens": 187, "cost_micro_usd": 187400, "timestamp": "2026-11-16T14:22:01Z" } ] } ``` `cached_tokens` is the part of `prompt_tokens` billed at the cache-read rate and is omitted when zero. `cost_micro_usd` is the cost in millionths of a dollar. Usage is a recent-history view, not a complete billing export. # Caching and network Source: https://docs.darkbloom.dev/ci/caching-and-network How actions/cache behaves on Darkbloom runners, where caches live, and which hosts a job can reach through the gateway. ## Caching `actions/cache` and the tools built on it (`setup-node`, `setup-python`, `rust-cache`, ...) work unchanged, with GitHub's scoping: a push saves to its branch; a pull request saves to itself and reads its own caches, then its base branch's, then the default branch's. Caches never cross repositories. * **By default** they are GitHub's Actions caches of your repository, as on any runner. * **With Darkbloom's build cache** (enabled per repository by Darkbloom), they are stored encrypted on the Mac that saved them instead, and restore at disk speed. A job placed on another Mac misses, and pull requests from forks get none. Either way, a Mac that runs a job can write that job's cache scope: keep cache-saving push jobs that releases depend on off Darkbloom, or have only pull requests approved. A cache saved by a job with zstd is not restored by a runner without it, and the compression is part of a cache's version. Both Darkbloom images carry zstd, so routed jobs use the same compression GitHub's runners use. ## Network A job reaches the network over outbound HTTPS only, through Darkbloom's gateway, and only to hosts on the repository's list: * GitHub's published Actions hosts (checkout, actions, caches, artifacts, releases); * the hosts Darkbloom reviewed for your repository (package registries, model hubs). No other ports, no IP addresses and no wildcards. A connection to an unlisted host is refused and logged, and the step fails. Tell your Darkbloom contact which hosts beyond GitHub your jobs download from. Darkbloom updates the list and your approval together. The route job itself runs on a GitHub-hosted runner, so it needs none of these hosts. # Limits and billing Source: https://docs.darkbloom.dev/ci/limits-and-billing Concurrent jobs, monthly caps, approval windows, and how a job's charge is held and settled. ## Limits | Limit | Value | What happens | | - | - | - | | Concurrent jobs per installation | 1 to 100, default 2 | More jobs wait for a free slot | | Monthly cap per installation | Optional, in US dollars per calendar month (UTC) | Settled charges plus open holds count against it; lanes that would not fit fall back to your runners (`monthly_spend_cap`) | | Approval window | At most 90 days | Lanes fall back after it expires, until it is renewed | | Lanes per workflow | At most 32 | A malformed line fails the route job | | Jobs per lane | 0 to 16, default 1 | Darkbloom reserves one slot per job; extra jobs run on Darkbloom only if capacity is free when queued | | Watchdog wait | 15 to 1440 minutes, default 30 | The watchdog cancels and re-runs a run whose routed jobs never got a runner | A concurrency limit counts jobs of one installation. The monthly cap counts settled charges and open holds this UTC month; the console's card shows spend this month against the cap. ## Pricing Rates are per minute of each runner class and billed per second. See [CI pricing](/ci/pricing) for the runner classes, their rates and worked examples; the live rates are in the sandbox console under **Billing → Rates**. The Mac's owner earns 90% of each charge. A job holds funds when it starts and settles to its billable time at the rate in effect when it started; the rest of the hold is released. The **Runs** page shows each job's charge (held, settled or released, with the reason), and **Billing** shows the rate, hold, billable seconds and cost. ## Failed and lost jobs A job that runs to its own end is billed for its time, whether it passes or fails: a failing test is the job's own outcome. A job lost on Darkbloom's side is not charged. If its Mac drops off the network or its VM is lost, the whole hold is released. Two cases are billed anyway: * A job that had already finished by itself, and that GitHub had concluded, before the loss is billed for the time it used. * A job that reports success only after its Mac is lost is billed only if GitHub concluded it a success. If GitHub failed it instead, the charge is released and the job runs again, so you pay for it once. When a Darkbloom Mac drops off the network while it runs a job, GitHub fails the job. If Darkbloom operates your approval's watchdog for that lane, it re-runs such a job once, after the run completes. A re-run is a new job with its own hold and charge. A job that cannot be paid for is not started. If a lane was already routed and Darkbloom then refuses its jobs (a balance too low to hold, a revoked link or consent, a cap reached meanwhile, or repeated infrastructure failures), the jobs stay queued on GitHub: cancel the run and re-run it, which routes again. With the watchdog workflow that happens by itself after the configured wait. ## Spend controls * **Concurrent jobs** and the **monthly cap** are set per installation with **Edit limits** in the console. Limits apply to every repository in the installation; new jobs are not admitted past a limit, and running jobs finish. * **Disconnect** stops new jobs and revokes your billing consent. Jobs already running finish and are charged. * To stop routing without disconnecting, set `DARKBLOOM_ROUTING` to anything but `on`, or remove the route job. # CI on Darkbloom runners Source: https://docs.darkbloom.dev/ci/overview Run a public repository's GitHub Actions jobs on Darkbloom's Linux and macOS runners, with fallback to your own runners and billing from your Darkbloom balance. Darkbloom Sandboxes runs your public repository's GitHub Actions jobs in Linux and macOS virtual machines on Apple silicon Macs, paid from your Darkbloom balance. A routing workflow sends each group of jobs (a *lane*) to Darkbloom when it has room for them and to your usual runners otherwise, so a run never waits on Darkbloom. > [!NOTE] > > Access is by invitation. Ask your Darkbloom contact about onboarding, > approved repositories and the hosts your jobs need to reach. ## Who it is for Use Darkbloom runners for CI checks that fit the routing rules: builds and tests on Linux and macOS, including Xcode and Metal work. Release, publishing and deployment jobs stay on your own runners. The route workflow asks Darkbloom whether it can take each lane of a run. If Darkbloom is off, unreachable, slow or says no, every lane keeps its fallback label and the run continues on your usual runners. A lane that Darkbloom accepts runs on a Darkbloom runner; if Darkbloom then cannot start its jobs, they wait on GitHub until you cancel and re-run it (see [troubleshooting](/ci/troubleshooting)). ## Public repositories only Darkbloom runs public repositories only. Private repositories show *Private* in the console and cannot be requested. Your jobs run on Macs that other people own. Darkbloom checks at every job that the repository is public and refuses private ones, so nothing a Mac sees is secret: the code is public, the job's token is read-only, and routed jobs cannot hold secrets. See [security](/ci/security) for what the Mac's owner can see and what Darkbloom keeps. ## Linux and macOS | Profile | `runs-on` on Darkbloom | Runner classes | | - | - | - | | `linux_arm64` | `[self-hosted, linux, ARM64, darkbloom-linux-arm64]` | `linux-arm64-4cpu-16gb` (default), `linux-arm64-8cpu-32gb` | | `macos_arm64` | `[self-hosted, macOS, ARM64, darkbloom-macos-arm64]` | `macos-arm64-8cpu-16gb`, `macos-arm64-12cpu-32gb` | Your approval sets each profile's size, and so its runner class. See [runner images](/ci/runner-images) for the operating systems and tools each class provides. ## How a run is routed 1. A `route` job at the start of the run asks Darkbloom which lanes it can take and reserves capacity for their jobs. 2. Each routed job takes its `runs-on` from the route job's answer: Darkbloom's runner labels, or the lane's fallback label. 3. A lane that was routed can only run on a Darkbloom runner. The optional watchdog workflow rescues a run whose routed jobs never get one. Lanes, labels and the caller workflow are in [route workflows](/ci/route-workflows). ## Billing Jobs are paid from your Darkbloom balance, the same balance Darkbloom inference uses. A job holds funds when it starts and settles to its billable time at the rate in effect when it started; the rest of the hold is released. Rates are per minute of each runner class and billed per second, as of November 2026; the [CI pricing page](/ci/pricing) lists them, and the live rates are in the sandbox console under **Billing → Rates**. A monthly cap and a concurrency limit apply per installation. Lanes that would not fit the monthly cap fall back to your runners. See [limits and billing](/ci/limits-and-billing). ## Next steps > [card] [Quickstart](/ci/quickstart) > > Sign in, install the GitHub App, route a workflow, and watch the job run. > [card] [Route workflows](/ci/route-workflows) > > Copy the route workflow, declare lanes, and keep jobs on their fallback. > [card] [Runner images](/ci/runner-images) > > What is installed on Linux and macOS runners, and how to add tools. > [card] [Limits and billing](/ci/limits-and-billing) > > Concurrency, spend caps, holds, and what a finished job costs. # CI pricing Source: https://docs.darkbloom.dev/ci/pricing What a Darkbloom CI job costs: per-minute runner-class rates billed per second, the one-minute minimum and 60-minute cap, and worked examples. CI is priced per minute by runner class and billed per second, from when the job starts on its Darkbloom runner to when it finishes. | Runner class | Platform | vCPU / memory | Per minute | Per hour | | - | - | - | - | - | | `linux-arm64-4cpu-16gb` | Linux | 4 vCPU / 16 GB | \$0.0025 | \$0.15 | | `linux-arm64-8cpu-32gb` | Linux | 8 vCPU / 32 GB | \$0.005 | \$0.30 | | `macos-arm64-8cpu-16gb` | macOS | 8 vCPU / 16 GB | \$0.02 | \$1.20 | | `macos-arm64-12cpu-32gb` | macOS | 12 vCPU / 32 GB | \$0.04 | \$2.40 | Billed per second, one-minute minimum, at most 60 minutes per job. The rate is the class's, in effect when the job started. Your approval sets each profile's size, and so its runner class; see [route workflows](/ci/route-workflows). ## What you pay for * The seconds a job runs on its Darkbloom runner: from job start to job finish, intersected with GitHub's own job start and completion. * A one-minute minimum per job. * Job failures, cancellations and timeouts: the time they ran. * The runner class's rate at the moment the job started. ## What you don't pay for * Queue time, and the job's boot and teardown. * Time past 60 minutes: billable time is capped at 60 minutes per job. * A job lost on Darkbloom's side, such as its Mac dropping off the network or its VM being lost: the whole hold is released. Two exceptions are billed; [limits and billing](/ci/limits-and-billing#failed-and-lost-jobs) lists them. * A job that runs on a Mac you own: it costs nothing. ## Examples | Job | Billable time | Cost | | - | - | - | | Linux job on `linux-arm64-4cpu-16gb` | 5 minutes | \$0.0125 | | macOS build on `macos-arm64-8cpu-16gb` | 12 minutes | \$0.24 | | macOS job on `macos-arm64-12cpu-32gb` | 40 minutes | \$1.60 | | 20-second job on `linux-arm64-4cpu-16gb` | 1 minute (the minimum) | \$0.0025 | | 90-minute macOS job on `macos-arm64-12cpu-32gb` | 60 minutes (the maximum) | \$2.40 | ## How charges work A job holds funds when it starts and settles to its billable time at the rate in effect when it started; the rest of the hold is released. The hold covers 60 minutes, the billable maximum. A job that cannot be paid for is not started. If an already-routed job is refused for a balance too low to hold, the job stays queued on GitHub; cancel and re-run the run, which routes again. See [limits and billing](/ci/limits-and-billing). ## Paying Inference, CI and sandboxes all draw on one prepaid Darkbloom balance. Add funds at [console.darkbloom.dev](https://console.darkbloom.dev). * **Runs** shows each job's charge: held, settled or released, with the reason. * **Billing** shows the rate, hold, billable seconds and cost of each charge. ![Sandbox console Billing page showing balance, held funds, spend, earnings and the Charges, Earnings and Rates tabs](https://mintcdn.com/eigenlabs-f49d2e97/2TtlNanikOmTAJr5/images/console/billing-overview.png?fit=max\&auto=format\&n=2TtlNanikOmTAJr5\&q=85\&s=cbfc07955ed9625067ab7ba477906285) Billing in the sandbox console: charges, earnings and the live rates under Billing → Rates. Example data. ## Prices as of November 2026 These rates are as of November 2026. The live rates are in the sandbox console under **Billing → Rates**. # CI quickstart Source: https://docs.darkbloom.dev/ci/quickstart Connect a public GitHub repository to Darkbloom, route a workflow to Linux or macOS runners, and watch the first job run. This page takes you from a Darkbloom account to a GitHub Actions job running on a Darkbloom Linux or macOS runner. For the full lane and fallback reference, see [route workflows](/ci/route-workflows). ## Before you start * **A Darkbloom account with funds.** Jobs draw on the same balance as Darkbloom inference. * **A public repository.** Darkbloom runs public repositories only. Private repositories cannot be requested. * **Administration of the GitHub account or organization** that owns the repository, so you can install the App and pick its repositories. ## Sign in Open [https://api-sandbox.darkbloom.dev](https://api-sandbox.darkbloom.dev) and sign in with your Darkbloom account. ## Install the GitHub App and link it for billing 1. On **GitHub**, choose **Connect GitHub**. 2. GitHub asks you to install the **Darkbloom Sandbox** App on your account or on an organization you administer, to pick repositories (public ones: Darkbloom runs nothing else), and to authorize the App. 3. GitHub returns you to the console. The console checks that you control the installation, records your consent to pay for its jobs, and links it to your account. The page lists the installation with its repositories. If GitHub returns without linking (for example because the App was installed from GitHub directly), remove the installation on GitHub and connect again from the console. Each installation is billed to one Darkbloom account. **Disconnect** stops new jobs and revokes your consent; running jobs finish and are charged. ## Add funds Jobs are paid from your Darkbloom balance, the same one Darkbloom inference uses. Add funds in the Darkbloom console. A job that cannot be paid for is not started. ## Set spend limits Choose **Edit limits** on the installation: * **Concurrent jobs** (1 to 100, default 2): more jobs wait for a free slot. * **Monthly cap** (optional, in US dollars per calendar month, UTC): settled charges plus open holds. Lanes that would not fit fall back to your runners (`monthly_spend_cap`); the card shows spend this month against the cap. ![Sandbox console GitHub page showing a linked installation, spend against its monthly cap, concurrent jobs and repository access](https://mintcdn.com/eigenlabs-f49d2e97/2TtlNanikOmTAJr5/images/console/ci-github.png?fit=max\&auto=format\&n=2TtlNanikOmTAJr5\&q=85\&s=926c6a2ffd77a393ec0f605ee668293a) The GitHub page in the sandbox console: a linked installation with its repositories, spend this month, monthly cap and concurrent jobs. Example data. ## Request access for a repository Each public repository on the **GitHub** page has **Request access**. A Darkbloom operator reviews it and approves or denies it; the console shows the decision: | Status | Meaning | | - | - | | Access requested | Waiting for an operator. Lanes fall back as `repository_not_approved` | | Approved | Which profiles, events (pull requests, pushes to named branches) and lanes may run on Darkbloom, and until when (at most 90 days) | | Denied | The operator's reason. Fix it and **Request again** | | Approval expired | Lanes fall back until it is renewed: **Request renewal** | Private repositories show *Private* and cannot be requested. Tell your Darkbloom contact which hosts beyond GitHub your jobs download from (package registries, model hubs): only reviewed hosts are reachable. See [caching and network](/ci/caching-and-network). ## Add the route workflow 1. Copy `route.yml` from the Darkbloom actions repository at a commit into your repository as `.github/workflows/darkbloom-route.yml`, unchanged. Call it locally: Darkbloom refuses the jobs of a workflow that calls a reusable workflow from another repository. 2. Start the workflow with a `route` job and take each routed job's `runs-on` from it: ```yaml theme={null} permissions: contents: read jobs: route: uses: ./.github/workflows/darkbloom-route.yml permissions: {} with: lanes: | test linux_arm64 ubuntu-24.04-arm 2 macos macos_arm64 macos-15 test: needs: route runs-on: ${{ fromJSON(needs.route.outputs.routes)['test'] }} strategy: matrix: shard: [1, 2] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - run: make test SHARD=${{ matrix.shard }} ``` Each lane line is ` [count]`: `count` is how many jobs the lane runs (its matrix size, at most 16). Keep the `route` job's `permissions: {}`: the route workflow's job holds exactly what its calling job grants, so it then holds no token permission. 3. Set the repository variable `DARKBLOOM_ROUTING` to `on` (**Settings → Secrets and variables → Actions → Variables**). Any other value keeps every lane on its fallback. Jobs that may run on Darkbloom must: * declare read-only token permissions (`read` or `none`) on the job or the workflow; * use no secrets (none in the job, the workflow's `env` or the local actions and reusable workflows it uses), no `environment`, `services`, `container` or container actions; * not share a workflow with a call to another repository's reusable workflow. Keep release, publishing and deployment jobs on your own runners. Pull requests from forks keep their fallback runners. ### Add the watchdog workflow A lane routed to Darkbloom can only run on a Darkbloom runner. So that a run never waits for one for hours (Darkbloom down, its service unreachable), also copy `watchdog.yml` from the same commit into your repository as `.github/workflows/darkbloom-watchdog.yml`, unchanged. Every 10 minutes, with your repository's own `GITHUB_TOKEN` (`actions: write` and `checks: write`, which it declares), it cancels a run whose Darkbloom job has waited queued with no runner for 30 minutes since it was created while no Darkbloom job of the run got a runner, also when other Darkbloom jobs of the run ran, and re-runs its route job: the new attempt's lanes fall back. It rescues a run at most once, never re-runs a run someone else cancelled, and leaves a run alone while Darkbloom's own watchdog is rescuing it (a `Darkbloom watchdog` check on the commit). It cannot tell a job that waits at your concurrency or resource limit from a fault: raise `DARKBLOOM_WATCHDOG_MINUTES` above such waits. Repository variables: `DARKBLOOM_WATCHDOG` `off` turns it off; `DARKBLOOM_WATCHDOG_MINUTES` (15 to 1440) changes the wait; `DARKBLOOM_ROUTE_JOB` names your route job when it is not the workflow's `Select Runners`. Re-running repeats what your jobs do, so add it only where that is safe (CI checks, not deployments). ## See the job run * **The route job's summary** in each run lists every lane's runner and why. * **Runs** lists your Darkbloom jobs: state, outcome, runner class, charge (held, settled or released, with the reason) and integrity; each links to its GitHub job. The detail shows the timeline from queued to finished. * **Billing** shows your balance, each charge (rate, hold, billable seconds, cost) and the rates. * **Receipts**: the Mac that ran a job signs a receipt for it, which Darkbloom verifies. *Verified* means the Mac's attested add-on signed it; *Unverified* means it could not be checked (the run's result still stands). The commit also gets a **Darkbloom sandbox integrity** check. ![Sandbox console Runs page listing jobs with status, runner, host, duration, cost and integrity](https://mintcdn.com/eigenlabs-f49d2e97/2TtlNanikOmTAJr5/images/console/ci-runs.png?fit=max\&auto=format\&n=2TtlNanikOmTAJr5\&q=85\&s=8f7fbe5009ab53e83a1d4d7cad3b7929) The Runs page in the sandbox console: each job's state, runner, charge and integrity. Example data. If a lane stays on its fallback, the route job's summary says why; the reasons are in [troubleshooting](/ci/troubleshooting). ![Sandbox console run detail showing the timeline from queued to finished, the charge and the integrity check](https://mintcdn.com/eigenlabs-f49d2e97/2TtlNanikOmTAJr5/images/console/ci-run-detail.png?fit=max\&auto=format\&n=2TtlNanikOmTAJr5\&q=85\&s=e85bf3a1f9ce59b2e8cd1116fe39f797) A run's page in the sandbox console: its timeline from queued to finished, charge and integrity. Example data. # Route workflows Source: https://docs.darkbloom.dev/ci/route-workflows Copy the route workflow, declare lanes with their fallback labels, and keep every job runnable when Darkbloom has no capacity. A `route` job at the start of the run asks Darkbloom which lanes it can take and reserves capacity for their jobs. Each routed job then takes its `runs-on` from the answer: Darkbloom's runner labels, or the lane's fallback label. If Darkbloom is off, unreachable, slow or says no, every lane keeps its fallback, so the run never depends on Darkbloom. The route job runs on a GitHub-hosted `ubuntu-24.04` runner, with no secrets and with the token permissions its calling job grants. It sends Darkbloom the repository name, the run ID and attempt, and each requested lane's name, profile and count. ## Install the route workflow 1. Copy `.github/workflows/route.yml` from a commit of the Darkbloom actions repository into your repository as `.github/workflows/darkbloom-route.yml`, unchanged. 2. Call it locally with `uses: ./.github/workflows/darkbloom-route.yml`. Darkbloom checks each run's workflow at its exact commit, and it cannot verify a reusable workflow from another repository: a workflow that calls one has every routed job refused. 3. Keep the route job's `permissions: {}`. The route workflow declares no permissions of its own, so its job holds exactly what the calling job grants: with `{}`, no token permission at all. 4. Set the repository variable `DARKBLOOM_ROUTING` to exactly `on`. Any other value, or none, keeps every lane on its fallback without asking Darkbloom. It is the same file for every repository. Keep it unchanged and update it by copying a newer commit. ## Declare lanes One lane per line: ` [count] [placement] [shape]`. | Field | Rule | | - | - | | `lane` | Lowercase letters, digits and `-`, starting with a letter or digit, at most 63 characters, unique; the key in `routes` | | `profile` | `linux_arm64` or `macos_arm64` | | `fallback-label` | One runner label (`[A-Za-z0-9._-]`), used whenever the lane is not routed | | `count` | How many jobs the lane runs (its matrix size), 0 to 16, default 1. `0` keeps the fallback without asking, for jobs that will be skipped | | `placement` | `balanced` (default) or `cheapest`. Set `count` before this optional field. `cheapest` chooses the lowest compute price among eligible Macs, including provider discounts | | `shape` | Optional `x`, decimal without leading zeros: 1–256 vCPUs and 1–1024 GiB. Set `count` and `placement` before it. The size needs a published signed sibling and a priced runner class | At most 32 lanes. A malformed line fails the `route` job with a `Darkbloom route configuration` error. `count` must match the jobs the lane queues: Darkbloom reserves one slot per job, and jobs beyond the count run on Darkbloom only if capacity is free when they are queued. ## Runner labels A routed lane gets its profile's labels, exactly: | Profile | `runs-on` on Darkbloom | | - | - | | `linux_arm64` | `[self-hosted, linux, ARM64, darkbloom-linux-arm64]` | | `macos_arm64` | `[self-hosted, macOS, ARM64, darkbloom-macos-arm64]` | For the lowest compute price, use `test linux_arm64 ubuntu-24.04-arm 2 cheapest`. The requested profile label then ends in `-cheapest` (for example, `darkbloom-linux-arm64-cheapest`); the workflow accepts only those exact labels from Darkbloom. Omit `placement` to preserve normal scheduling. Storage and network charges are unchanged. For a lane needing more CPU, use `test linux_arm64 ubuntu-24.04-arm 1 balanced 8x32`. Only that lane asks for 8 vCPUs and 32 GiB; omitted sizes keep the approved default. Its profile label becomes `darkbloom-linux-arm64-8x32`, followed by `-cheapest` when requested and the run qualifier when Darkbloom supplies it. An unavailable or unpriced size keeps the lane's fallback. ## A caller workflow Every job that may run on Darkbloom declares read-only token permissions, no secrets, and no environment, services or container: ```yaml theme={null} permissions: contents: read jobs: route: name: Route uses: ./.github/workflows/darkbloom-route.yml permissions: {} with: lanes: | test linux_arm64 ubuntu-24.04-arm 2 lint linux_arm64 ubuntu-24.04-arm macos macos_arm64 macos-15 test: name: Test (shard ${{ matrix.shard }}) needs: route runs-on: ${{ fromJSON(needs.route.outputs.routes)['test'] }} timeout-minutes: 30 strategy: fail-fast: false matrix: shard: [1, 2] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Test run: make test SHARD=${{ matrix.shard }} SHARDS=2 lint: name: Lint needs: route runs-on: ${{ fromJSON(needs.route.outputs.routes)['lint'] }} timeout-minutes: 15 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Lint run: make lint macos: name: macOS build needs: route runs-on: ${{ fromJSON(needs.route.outputs.routes)['macos'] }} timeout-minutes: 45 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Build and test run: swift test ``` `persist-credentials: false` keeps the checkout token out of the workspace. Jobs that publish, release or save caches that releases restore belong on your own runners. ## What routed jobs may do Darkbloom admits a job only if its workflow passes these checks at the run's commit; otherwise the job is refused and stays queued: * Explicit token permissions of `read` or `none` on the job or the workflow (`read-all` and missing permissions are refused). * No secrets: none in the job, the workflow's `env`, the local actions it uses or the local reusable workflows it calls (`secrets: inherit` included). Keep secrets in environments; a routed job cannot name one. * No `environment`, `services`, `container` or container actions. * No remote reusable workflows anywhere in the workflow. * Only hosts Darkbloom approved for the repository are reachable over HTTPS (GitHub's Actions hosts always are). Pull requests from forks keep their fallback runners without asking Darkbloom. ## When a lane falls back The route job writes each lane's decision to its log and the run summary: | Decision | Why | | - | - | | `routing is off` | `DARKBLOOM_ROUTING` is not exactly `on` | | `pull request from a fork` | Forks keep their fallback runners; nothing is asked | | `not requested` | The lane's count is 0 | | `plane URL is not https` | `DARKBLOOM_SANDBOX_URL` does not start with `https://` | | `run identity is unavailable` | The run ID or attempt is not numeric | | `plane request failed (HTTP )` | Darkbloom did not answer 200 within 5 seconds; status `000` is a network error. A timeout, 408, 429 or 5xx is retried once | | `plane reply is malformed` | The answer is not one route | | `plane: ` | Darkbloom chose the fallback: for example `repository_not_approved`, `payer_not_authorized`, `monthly_spend_cap`, `no_capacity`, `paused` or `run_fallback_forced` (an earlier attempt of the run stranded on Darkbloom and was rescued) | | `plane decision is missing or invalid` | The answer did not repeat the requested profile and placement labels exactly | The per-reason answers are in [troubleshooting](/ci/troubleshooting). ## Configuration | Repository variable | Meaning | | - | - | | `DARKBLOOM_ROUTING` | `on` asks Darkbloom; anything else keeps every fallback | | `DARKBLOOM_SANDBOX_URL` | Optional; default `https://api-sandbox.darkbloom.dev`. Must be `https://` | ## The watchdog workflow A routed lane can no longer fall back once its jobs are queued: they can only run on a Darkbloom runner. Copy `watchdog.yml` as `.github/workflows/darkbloom-watchdog.yml` beside the route workflow (unchanged, like it). It rescues a run whose Darkbloom job has waited queued with no runner too long, using only GitHub and the repository's `GITHUB_TOKEN`, so it works while Darkbloom is down or unreachable. Every 10 minutes it lists the repository's queued and in-progress runs of the last day and their jobs. A run is stranded when its job carrying `self-hosted` and a `darkbloom-*` label has been `queued` with no runner for `DARKBLOOM_WATCHDOG_MINUTES`, timed from the job's own creation, and no Darkbloom job of the run was given a runner within that time. It cancels the run and re-runs its route job and the jobs that need it (or the whole run when it cannot tell which job is the route job), so the new attempt's lanes fall back. It rescues a run at most once. A job that waits by design at your concurrency or resource limit looks the same to it as a fault once no runner came for the whole wait. If your jobs can wait that long at a limit, set `DARKBLOOM_WATCHDOG_MINUTES` above that wait. | Repository variable | Meaning | | - | - | | `DARKBLOOM_WATCHDOG` | `off` turns it off; anything else (or unset) keeps it on | | `DARKBLOOM_WATCHDOG_MINUTES` | Optional; how long a Darkbloom job may wait for a runner, 15 to 1440 (default 30) | | `DARKBLOOM_ROUTE_JOB` | Optional; the route job's name (default `Select Runners`) | | `DARKBLOOM_APP_SLUG` | Optional; the Darkbloom App whose markers it honours (default `darkbloom-sandbox`) | Its token holds `actions: write` and `checks: write` and nothing else. A re-run repeats what the run's jobs do: add the watchdog only to repositories whose routed workflows are safe to re-run (CI checks, not releases or deployments). # Runner images Source: https://docs.darkbloom.dev/ci/runner-images The Linux and macOS operating systems, toolchains, and preinstalled tools on Darkbloom runners, and how a job adds what the image lacks. Each Darkbloom runner boots a fixed image with a fixed set of tools. A job takes its space from its own writable scratch disk; the image's root is read-only. Versions below are the ones the images pin. ## Linux | Component | Version or detail | | - | - | | Operating system | Ubuntu 24.04 | | Kernel | Linux 6.12.28 with dm-crypt | | GitHub Actions runner | 2.338.2 | | Python | 3.12.3, with `python3-venv` and `pip` 24.0 | | Git | 2.51.1 | | Make | 4.3 | | jq | 1.7.1 | | curl | 8.5.0 | | OpenSSL | 3.0.13 | | zstd | 1.5.5 | | awk | GNU Awk 5.2.1 (`gawk`, also `nawk`) | | keyctl | keyutils 1.6.3 | | Other base tools | GNU coreutils, procps, tar, gzip, xz, unzip | The image also carries the libraries Playwright's Chromium loads, and Liberation Sans, which fontconfig gives Chromium for Arial. It does not carry Chromium itself: a job downloads the browser its lockfile names. A Linux job runs as UID/GID 1000 with `HOME` set to `/home/runner`. Its root is read-only and the runner runs with `no_new_privs`, so a job has no `sudo` and no `apt`. Its writes go to a 30 GiB encrypted scratch disk: checkouts, build outputs, the tool cache, `RUNNER_TEMP`, home caches (npm, pip, cargo, ...), `/tmp` and `/var/tmp`. ## macOS | Component | Version or detail | | - | - | | Operating system | macOS 27.2 | | Xcode | 27.2 (27B52), macOS SDK 27.2, Swift 6.4.2 | | Homebrew | Installed | | Python | 3.12.10 in the runner tool cache | | CMake | 3.31.12, with `cmake`, `ctest` and `cpack` on `PATH` | | zstd | 1.5.7, with `unzstd`, `zstdmt` and `zstdcat` on `PATH` | | metal-cpp | Apple's metal-cpp 26 archive | | GitHub Actions runner | 2.338.2 | Homebrew comes first on the job's `PATH`, before the system's directories; `cmake` and `zstd` come after them. The zstd and metal-cpp files are there because jobs and their actions call them without installing them: `actions/cache` compresses with zstd when `zstd --quiet --version` answers, and MLX's CMake build can use the pinned metal-cpp archive instead of downloading it. A macOS job has a Metal GPU: the VM's paravirtualized device. MLX, MPS and simdgroup matrices run at the host GPU's speed, but the device reports its architecture as `air64_v27`, never the host's `applegpu_*` name. A check that compares the architecture a library picks with the host's name fails in every macOS VM, Blacksmith's included. ## Add tools a job needs * **Linux:** install into the scratch disk (the checkout, `HOME`, `RUNNER_TEMP` or a tool cache) or use an action such as `actions/setup-*` that does. There is no `apt` and no `sudo`. A tool the image should provide for every job is an image change: ask your Darkbloom contact. * **macOS:** `brew install` works for the job, and Homebrew comes first on `PATH`. A tool you install exists only for that job's VM. * **Both:** a tool you download needs a host Darkbloom approved for your repository ([caching and network](/ci/caching-and-network)). Pin the version you download; an image update can change a tool's version. * **Caches:** `actions/cache` and the tools built on it work unchanged. See [caching and network](/ci/caching-and-network) for where a cache is stored and when a job misses it. ## When a tool is missing A job that passes on a GitHub-hosted runner can still fail here if it relies on something the image does not carry. Check the tables above first, then the job's network access: a download from an unapproved host fails the step. # Security Source: https://docs.darkbloom.dev/ci/security What runs where, what the Mac's owner can see, what Darkbloom keeps, and why routed jobs carry no secrets. ## Public repositories only Your jobs run on Macs that other people own. Darkbloom checks at every job that the repository is public and refuses private ones, so nothing a Mac sees is secret: the code is public, the job's token is read-only, and routed jobs cannot hold secrets. ## What runs where Darkbloom admits only Macs enrolled to approved owners; in production they are attested with Apple App Attest. Each job runs in a fresh virtual machine that is removed when the job ends. On Linux the image's root is read-only and the job writes to its own scratch disk. ## What the Mac's owner can see Assume everything inside the job: the checked-out code, the job's environment, its commands and output, and the files it writes. While the job runs the Mac also holds its read-only `GITHUB_TOKEN` and the Actions runtime token, which can read what your public repository exposes and write Actions caches and artifacts of the run. A Mac can also alter a job's results. Therefore: * keep secrets in GitHub environments with protection rules (routed jobs cannot name an environment); * keep releases, publishing and anything that consumes artifacts on your own runners; * treat Darkbloom results like those of any third-party runner. ## Secrets A job that references secrets (`secrets.*`, `secrets: inherit`, secrets in the workflow's `env` or in local actions it uses), names an environment, or runs containers is refused. The route job itself runs on a GitHub-hosted runner and may hold secrets: it sends Darkbloom only the repository name, the run ID and attempt, and the lanes. ## What Darkbloom keeps Job metadata: repository, workflow run and job IDs, commits, event and branch, timing, outcome, runner class, the Mac that ran it and its signed receipt. Darkbloom keeps each job's charge. Your code and logs are not stored by Darkbloom: the job checks out your public code inside its virtual machine, and logs go to GitHub as usual. Access requests keep the repository, your account and the email your Darkbloom account reports. ## Receipts and integrity The Mac that ran a job signs a receipt for it, which Darkbloom verifies. *Verified* means the Mac's attested add-on signed it; *Unverified* means it could not be checked (the run's result still stands). The commit also gets a **Darkbloom sandbox integrity** check. ## GitHub App permissions | Permission | Why | | - | - | | Administration: write | GitHub requires it to register a one-time (just-in-time) runner for each job Darkbloom runs | | Actions: read | To see queued jobs and the workflow runs they belong to | | Contents: read | To check each run's workflow files at its exact commit | | Checks: write | To post the **Darkbloom sandbox integrity** check | | Metadata: read | To list the installation's repositories | It receives `workflow_job` and `repository` events. # Troubleshooting Source: https://docs.darkbloom.dev/ci/troubleshooting Fix a job that stays queued, a lane that fell back, and a job that fails on a Darkbloom runner. ## A job stays queued Check whether its lane was routed to Darkbloom. A lane that was routed cannot fall back any more: if Darkbloom then refuses its jobs (a balance too low to hold, a revoked link or consent, a cap reached meanwhile, or repeated infrastructure failures), they stay queued on GitHub. Cancel the run and re-run it, which routes again. With the watchdog workflow that happens by itself after the configured wait. A job can also wait queued because it is at your concurrency or resource limit. The watchdog cannot tell that wait from a fault: raise `DARKBLOOM_WATCHDOG_MINUTES` above it. ## A lane fell back The route job's summary gives the reason. The reasons and what to do: | Reason | What to do | | - | - | | `routing is off`, `pull request from a fork` | Nothing: expected | | `plane request failed (HTTP …)` | Darkbloom did not answer in time; it retries once | | `plane: repository_not_approved` | Request access, or renew an expired approval | | `plane: lane_not_enabled`, `profile_not_approved` | The approval does not cover this lane or profile yet | | `plane: event_not_admitted`, `branch_not_admitted` | The approval does not cover this event or branch | | `plane: payer_not_authorized` | Link the installation | | `plane: monthly_spend_cap` | Raise the cap, or wait for the next month (UTC) | | `plane: no_capacity`, `reservation_cap` | Darkbloom is full right now | | `plane: profile_degraded` | Recent Darkbloom jobs of this repository failed; it retries after a cool-down | | `plane: paused`, `routing_disabled`, `billing_unavailable`, `intake_degraded`, `unavailable`, `image_not_available` | A Darkbloom-side pause or problem; nothing to do | | `plane: run_fallback_forced` | An earlier attempt of this run waited too long for a Darkbloom runner, so the run was cancelled and re-run on its fallback runners (by Darkbloom's watchdog or yours); nothing to do | The route workflow itself can also keep every lane on its fallback: | Decision | What to do | | - | - | | `not requested` | The lane's count is 0 | | `plane URL is not https` | Set `DARKBLOOM_SANDBOX_URL` to an `https://` URL | | `run identity is unavailable` | Check that the run ID and attempt are numeric | | `plane reply is malformed` | Darkbloom's answer was not one route; nothing to do | | `plane decision is missing or invalid` | The answer did not repeat the requested labels; nothing to do | ## A job fails on a Darkbloom runner * **It uses a secret, an environment, services, a container or a container action.** Those jobs are refused and stay queued. Move secrets to environments and keep such jobs on your own runners. * **Its permissions are missing or `read-all`.** A routed job needs explicit `read` or `none` permissions on the job or the workflow. * **It calls a reusable workflow from another repository.** Darkbloom cannot verify it, so every routed job of that workflow is refused. Copy the route workflow locally and keep the job's workflow free of remote reusable workflows. * **It downloads from an unapproved host.** The step fails. Ask your Darkbloom contact to add the host; see [caching and network](/ci/caching-and-network). * **A tool is missing or a version differs.** Check [runner images](/ci/runner-images). Linux jobs cannot `apt install`; install into the scratch disk or use an action. * **A cache misses.** A job on another Mac misses Darkbloom's build cache, and pull requests from forks get none. GitHub's caches behave as usual. * **The Mac dropped off the network.** GitHub fails the job. If Darkbloom operates your approval's watchdog for that lane, it re-runs the job once, after the run completes. * **It publishes, releases or deploys.** Keep those jobs on your own runners, and keep the jobs that save caches releases restore there too. ## Pull requests from forks The route workflow keeps them on their fallback runners without asking Darkbloom. Nothing is wrong. ## Darkbloom is down Lanes fall back before any job is queued, so new runs use your runners. Jobs already routed wait for Darkbloom; if it refuses them they stay queued, and you cancel and re-run. The watchdog workflow does that after its wait. ## The approval expired Lanes fall back until it is renewed: choose **Request renewal** in the console. A denied request says the operator's reason; fix it and choose **Request again**. ## Stop using Darkbloom Set the repository variable `DARKBLOOM_ROUTING` to anything but `on`, or remove the route job. **Disconnect** the installation in the console to stop paying for it, and uninstall the App on GitHub to remove its access. # Accounts and consoles Source: https://docs.darkbloom.dev/get-started/accounts-and-consoles One Darkbloom account, two consoles, and where each product's keys, Account ID and funds live. Everything in Darkbloom hangs off one account and one balance. The two consoles show different parts of it, and each product uses its own credential. ## One account, two consoles Sign in with the same Darkbloom account on both consoles. The account is managed by Privy, and the sandbox console reads the same balance as the inference console. | Console | Address | Use it for | | - | - | - | | Inference console | [console.darkbloom.dev](https://console.darkbloom.dev) | Create and revoke inference API keys, see usage, and add funds under **Billing**. | | Sandbox console | [api-sandbox.darkbloom.dev](https://api-sandbox.darkbloom.dev) | Connect GitHub for CI and set its limits, watch runs, create sandbox API keys, approve CLI logins, and find your Account ID under **Settings**. | The split follows the products: inference keys and billing are in the inference console, while CI and sandboxes share the sandbox console. You do not need a second account for either console. ![Sandbox console Overview page showing balance, spend, active runs, recent runs and Macs online](https://mintcdn.com/eigenlabs-f49d2e97/2TtlNanikOmTAJr5/images/console/console-overview.png?fit=max\&auto=format\&n=2TtlNanikOmTAJr5\&q=85\&s=31fc5911eb2ef2fd2249fcbfbad5e584) The sandbox console Overview: balance shared with inference, active and recent runs, and Macs online. Example data. ## Keys by product Keys are not interchangeable: an inference key does not authenticate a sandbox, and a sandbox key does not call the inference API. | Product | Credential | Where it comes from | | - | - | - | | Inference | API key starting with `sk-db-` (keys from before the rename start with `eigeninference-` and still work) | Create it on the inference console's API console page with **Create key** ([authentication](/api/authentication)). Creation needs a browser sign-in, so an existing key cannot mint another. | | CI | No API key | Install the Darkbloom GitHub App from the sandbox console and link the installation to your account, which consents to pay for its jobs. | | Sandboxes | API key starting with `dbx_sk_…` | `darkbloom-sandbox-cli login` creates one per device, or you create one in the sandbox console under **Settings → API keys**. Keys last 90 days by default, are revocable, and the CLI stores them owner-only (mode 0600) in `~/.config/darkbloom-sandbox/`. | See [API key management](/reference/api-keys) for the inference endpoints, and [sandboxes quickstart](/sandboxes/quickstart) for the CLI login flow. ## Find your Account ID The sandbox console shows your Account ID at **Settings → Account ID**. Darkbloom uses it to grant access: * Agent sandboxes are **invite-only** and experimental. Send your Account ID, and the platforms you need (`linux_arm64`, `macos_arm64`, or both), to your Darkbloom contact. * A grant for one platform does not cover the other, and until you are granted the sandbox API answers as if it did not exist. ![Sandbox console Settings page showing the account's email, Account ID and API keys](https://mintcdn.com/eigenlabs-f49d2e97/2TtlNanikOmTAJr5/images/console/settings.png?fit=max\&auto=format\&n=2TtlNanikOmTAJr5\&q=85\&s=48d05c26623664a5baddcfc8a7c91afc) Settings in the sandbox console: your Account ID and API keys. Example data. CI access works differently: each repository is approved individually in the sandbox console, and each installation is billed to one account. See [CI overview](/ci/overview). ## How funds work Darkbloom uses a prepaid balance in US dollars. Add funds at [console.darkbloom.dev](https://console.darkbloom.dev) with a credit or debit card through Stripe; the minimum deposit is \$0.50. Credits are non-refundable, do not expire, and cover every product: * **Inference** deducts each request's cost after the response completes. * **CI** holds funds when a job starts and settles to the job's billable time at the rate in effect when it started. * **Sandboxes** hold an hour at the sandbox's size price before each boot and settle to the seconds it ran. You can check the balance from the inference console, from the sandbox console, or with the balance API. See [add credits](/billing/add-credits) for the deposit steps. > [!NOTE] > > If the balance cannot cover a charge, the product refuses the work instead of going negative: inference rejects the request, a CI job is not started, and a sandbox does not boot. ## Next steps * [Choose a product](/get-started/choose-a-product) * [Pricing overview](/get-started/pricing-overview) # Choose a product Source: https://docs.darkbloom.dev/get-started/choose-a-product A one-minute guide to picking inference, CI, sandboxes, or earning with your Mac on Darkbloom. | If you are thinking… | Start with | | - | - | | "I want to call a model from my code." | [Inference](/quickstart-consumer): an OpenAI-compatible API, billed per token. | | "My CI is slow, or I need macOS runners." | [CI](/ci/quickstart): GitHub Actions jobs on Darkbloom's Linux and macOS runners. | | "I want a machine for me or my agent." | [Sandboxes](/sandboxes/quickstart): Linux or macOS VMs you SSH into, with a workspace that survives a stop. | | "I have a Mac and want to earn with it." | [Providers](/quickstart-provider): serve inference, host CI jobs and sandboxes, or both. | You can use more than one product on the same account and balance. For the shared details, read [accounts and consoles](/get-started/accounts-and-consoles) and [pricing](/get-started/pricing-overview). # Pricing Source: https://docs.darkbloom.dev/get-started/pricing-overview What inference, CI and agent sandboxes cost: every rate at a glance, from one shared prepaid balance. Inference, CI and agent sandboxes draw on one prepaid Darkbloom balance. Add funds at [console.darkbloom.dev](https://console.darkbloom.dev). These prices are as of November 2026. ## CI | Runner class | Platform | vCPU / memory | Per minute | Per hour | | - | - | - | - | - | | `linux-arm64-4cpu-16gb` | Linux | 4 vCPU / 16 GB | \$0.0025 | \$0.15 | | `linux-arm64-8cpu-32gb` | Linux | 8 vCPU / 32 GB | \$0.005 | \$0.30 | | `macos-arm64-8cpu-16gb` | macOS | 8 vCPU / 16 GB | \$0.02 | \$1.20 | | `macos-arm64-12cpu-32gb` | macOS | 12 vCPU / 32 GB | \$0.04 | \$2.40 | Billed per second, one-minute minimum, at most 60 minutes per job. [CI pricing](/ci/pricing) has worked examples and the rules on what is and is not billed. ## Sandboxes ### Linux sizes | Size | vCPU | Memory | Workspace | Per hour | | - | - | - | - | - | | `c4-m8` | 4 | 8 GiB | 32 GiB | \$0.192 | | `c4-m16` | 4 | 16 GiB | 32 GiB | \$0.256 | | `c8-m16` | 8 | 16 GiB | 64 GiB | \$0.384 | | `c8-m32` | 8 | 32 GiB | 64 GiB | \$0.512 | | `c12-m32` | 12 | 32 GiB | 64 GiB | \$0.640 | | `c16-m32` | 16 | 32 GiB | 64 GiB | \$0.768 | | `c16-m64` | 16 | 64 GiB | 64 GiB | \$1.024 | | `c24-m48` | 24 | 48 GiB | 64 GiB | \$1.152 | | `c24-m96` | 24 | 96 GiB | 64 GiB | \$1.536 | | `c32-m64` | 32 | 64 GiB | 64 GiB | \$1.536 | | `c32-m128` | 32 | 128 GiB | 64 GiB | \$2.048 | Linux sizes follow this formula: $0.032 per vCPU-hour plus $0.008 per GiB-hour of memory. For `c8-m32`, that is 8 × $0.032 plus 32 × $0.008, or \$0.512 an hour. ### macOS sizes | Size | vCPU | Memory | Workspace | Per hour | | - | - | - | - | - | | `mac-c4-m8` | 4 | 8 GiB | 32 GiB | \$0.35 | | `mac-c4-m16` | 4 | 16 GiB | 32 GiB | \$0.45 | | `mac-c8-m16` | 8 | 16 GiB | 64 GiB | \$0.70 | | `mac-c8-m32` | 8 | 32 GiB | 64 GiB | \$0.90 | Billed per second from ready, one-minute minimum per charge; stopped sandboxes are free. [Sandbox pricing](/sandboxes/pricing) has worked examples and the rules on what is and is not billed. ## Inference Inference is charged per token, at per-model rates in [inference pricing](/billing/pricing); the live prices are at [api.darkbloom.dev/v1/pricing](https://api.darkbloom.dev/v1/pricing). ## Providers Providers earn 90% of each CI and sandbox charge; see [sandbox hosting](/provider/sandbox-hosting). # Run models on your own Mac Source: https://docs.darkbloom.dev/inference/run-on-your-own-mac Serve an OpenAI-compatible API to yourself with the darkbloom app, and pass a request your Mac can't take to your other Macs or the Darkbloom network. The `darkbloom` app can serve models on your own Mac, to you alone, through an OpenAI-compatible API. When your Mac can't take a request, it can pass the request to your other Macs for free, and then to the Darkbloom network, billed to your balance. This is the same app that providers install. You do not need to earn anything to use it: **Only me** never contacts Darkbloom and needs no account. ## Requirements * An Apple silicon Mac. The installer checks for `arm64` and refuses an Intel Mac. * macOS 27 or later for a new install. The binary targets macOS 14, and a Mac that already has the CLI or a provider config can reinstall or repair on an older system with an upgrade notice. * Enough unified memory for the model you choose. Serving starts at 8 GB, but every real model needs more: the catalog's smallest build (`gpt-oss-20b`) needs about 24 GB, the 8-bit Gemma 4 26B builds need 48 GB, `nvidia-nemotron-3.5-super` is registered for 128 GB, and `glm-5.3-flash` for 256 GB. * Disk for each model's weights. The catalog lists a size for every model, and `darkbloom models list` shows what is already on the Mac. Only me serving needs no account and no coordinator. Installing, downloading from the catalog and any network overflow use outbound HTTPS to `https://api.darkbloom.dev`. ## Install Follow [Install and set up the provider](/provider/install) for what the installer checks and writes. The install is one command: ```bash theme={null} curl -fsSL https://api.darkbloom.dev/install.sh | bash exec $SHELL -l ``` The same page covers requirements, account linking, model downloads and the rest of the provider setup. For this page, all you need is `darkbloom` on your `PATH` and at least one model. ## Serve only you `darkbloom local` is the shortest path. Where nothing is serving, it starts **Only me** in the background, exactly as `darkbloom start --local` does, then prints the local API's base URL and key. Where Darkbloom is already serving, it prints the address and key if a local API is up, and only in a terminal asks before switching this Mac to Only me; pressing Enter keeps Darkbloom serving. `darkbloom start --local` is the explicit form. It serves Only me in the background and saves the choice, so it starts at login, restarts after a crash and updates itself. `darkbloom start --local --here` serves it in the current Terminal until Ctrl-C and saves nothing. Only me means: * This Mac's models on this Mac's local API. * No coordinator connection and no earnings. * Requests this Mac answers never leave the Mac and are never billed. ### Choose models ```bash theme={null} darkbloom models catalog # the catalog darkbloom models list # what is downloaded on this Mac darkbloom models download # download one model ``` A first start also opens a model picker with the catalog and downloads the models you select. Name them up front with `darkbloom start --local --model `, repeatable, to skip the picker. ### Call the local API `darkbloom local` prints the address to use as the base URL, the key, the file that holds the key, and a `curl` example. The key is this Mac's own local key and is also in `~/.darkbloom/local_token`; it is not your account API key, which starts with `sk-db-`. On a Mac whose first free port was 8001, the address looks like `http://127.0.0.1:8001/v1`. Copy what the command prints rather than assuming the port. ```bash theme={null} export OPENAI_BASE_URL=$(darkbloom local --json | jq -r .base_url) export OPENAI_API_KEY=$(darkbloom local --json | jq -r .api_key) curl -s "$OPENAI_BASE_URL/chat/completions" \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "", "messages": [ {"role": "user", "content": "Say hello in one sentence."} ] }' ``` The same address and key work in any OpenAI SDK: ```python theme={null} import os from openai import OpenAI client = OpenAI( base_url=os.environ["OPENAI_BASE_URL"], api_key=os.environ["OPENAI_API_KEY"], ) response = client.chat.completions.create( model="", messages=[{"role": "user", "content": "Say hello in one sentence."}], ) print(response.choices[0].message.content) ``` `GET /v1/models` on the same base URL lists the models this Mac advertises. ## Where requests go when your Mac is busy The local API answers on this Mac first. When it doesn't serve the model, or has no room for the request, the saved route decides what happens next. | Command | A request this Mac can't take | Cost | | - | - | - | | `darkbloom route this-mac` | Gets this Mac's own answer; nothing is passed on. Needs no account key | Free | | `darkbloom route my-macs` | Goes to your other Macs, through Darkbloom, and never to the paid network. Needs a saved account key | Free | | `darkbloom route my-macs-first` | Goes to your other Macs first, then to the Darkbloom network. Needs a saved account key | Your Macs free; the network bills your balance at the model's prices on [Pricing](/billing/pricing) | Without a saved account key the default is `this-mac`; once a key is saved the default is `my-macs`. A route change applies to a running local API from its next request that needs it, with no restart and no model reload. To save the key: ```bash theme={null} darkbloom route key # hidden input darkbloom route key --stdin # from standard input darkbloom route key --remove # forget it; requests stay on this Mac ``` Create the key in the [API console](/api/authentication); it starts with `sk-db-`. `darkbloom route key` checks it once and keeps it in your Mac's Keychain. It is never printed, logged or written to `provider.toml`. **Requests from other machines never use the paid network.** The API listens on loopback by default. If you bind it beyond loopback (`--bind`), a request that arrives over your LAN or tailnet can use this Mac and your other Macs, but is treated as `my-macs` even when the saved route is `my-macs-first`, so it never reaches the network. Anyone on that network with the key can use the API. ## Serve Darkbloom and yourself On a Mac with no saved choice, `darkbloom start` serves **Both**: Darkbloom's requests, which earn, and a local API for you. It saves that choice. Add `--me-first` to pause Darkbloom while you use the Mac; `--local-endpoint` is the older flag for the same thing. From the moment one of your requests holds a model, Darkbloom sends no new requests here. Requests it already started finish, and it comes back once none of your requests has run for 2 minutes. `--me-first-idle ` changes that window (1 to 120), and `--no-me-first` keeps Darkbloom serving while you use the local API. `darkbloom status` says how this Mac serves. What serving the network earns, and how it is paid, is in [Provider overview](/provider/overview) and [Earnings](/provider/earnings). ## Two Macs Two Macs joined by a Thunderbolt 5 cable, with RDMA over Thunderbolt enabled on each and the same Darkbloom version installed, can serve one model together. `darkbloom cluster local` serves that pair for you alone: each Mac holds part of the model, no Mac contacts a coordinator, nothing registers or takes public traffic, and nothing is billed. It needs a terminal, pairs the Macs first if they are not paired yet, and ends with the pair's local API, for example `✓ Serving on both Macs, on your local API at http://localhost:8001`. `darkbloom local` on either Mac then prints that Mac's address and key. The pair's API listens on every network of the leading Mac by default; add `--bind 127.0.0.1` to keep it on that Mac. `darkbloom cluster` instead pairs the two to serve through Darkbloom with a local API beside it. ## Privacy A request this Mac answers stays on this Mac: it is not sent to Darkbloom and is not billed. A request the router passes on leaves the Mac as an API request. It goes through the Darkbloom coordinator, which decrypts it in memory to route and bill it, and the Mac that runs the model sees the prompt and completion in plaintext. That is the same path as a request to the public API, and it is **not** end-to-end encryption between you and the provider. See [Security and trust](/security/overview) for the full model. The local API has no TLS and no rate limiting. Keep the default loopback bind, or put a reverse proxy in front before exposing it. `--no-auth` removes the bearer-token check; the local router then keeps every request on this Mac and never uses your account key. > [!NOTE] > > Inference is an experimental research prototype. Expect rough edges and breaking changes. # Darkbloom: inference, CI and sandboxes on Apple silicon Macs Source: https://docs.darkbloom.dev/introduction One Darkbloom account for an OpenAI-compatible inference API, GitHub Actions runners, and Linux and macOS sandboxes on Macs in Darkbloom's network. Darkbloom runs AI inference, GitHub Actions jobs, and interactive Linux and macOS sandboxes on Apple silicon Macs owned by people in its network. You use one Darkbloom account and one prepaid balance for all of them, and every Mac that does the work proves with hardware-backed attestation which Darkbloom build and settings it is running. > [card] [Inference](/quickstart-consumer) > > For developers who want to call a model from their own code through an OpenAI-compatible API and pay per token. > [card] [CI](/ci/quickstart) > > For teams whose GitHub Actions jobs are slow, or that need macOS runners, and want each job to bill the same account. > [card] [Sandboxes](/sandboxes/quickstart) > > For you or your coding agent to SSH into a Linux or macOS VM that keeps its workspace between boots. > [card] [Earn with your Mac](/quickstart-provider) > > For people with an Apple silicon Mac who want to serve inference, host CI jobs and sandboxes, or both. Prefer your own hardware? [Run models on your own Mac](/inference/run-on-your-own-mac) with a local OpenAI-compatible API, and send only the overflow to the network. ## How the pieces fit * **One account.** Sign in once with your Darkbloom account, and use the same account on every console. * **One balance.** Add funds at [console.darkbloom.dev](https://console.darkbloom.dev), and inference, CI and sandboxes all draw from that balance. * **Attested Macs.** Each Mac proves what software it runs with hardware-backed attestation, and Darkbloom checks that proof before it sends the Mac a request, a job or a sandbox. See [security and trust](/security/overview) for what each product does and does not claim. New here? [Choose a product](/get-started/choose-a-product) in a minute, or read [accounts and consoles](/get-started/accounts-and-consoles) to see where keys and funds live. [Pricing](/get-started/pricing-overview) covers how each product is billed. ## Available models Inference serves the models that are online now, and the catalog changes as Macs join and leave. `GET /v1/models` lists the models you can call, and their prices are public at [`/v1/pricing`](https://api.darkbloom.dev/v1/pricing). See [models](/api/models) for how to choose one. > [!NOTE] > > Inference and agent sandboxes are experimental and under active development. Expect rough edges and breaking changes. # darkbloom CLI: complete command reference Source: https://docs.darkbloom.dev/provider/cli-reference Reference for the darkbloom provider CLI: start, stop, restart, status, doctor, models, login, logs, update, schedule, sandbox, waitlist and uninstall. `darkbloom` is the provider agent CLI. It manages the local provider, the coordinator connection, models, updates and the Darkbloom Sandbox add-on. Run `darkbloom --help` for the full command list. ```bash theme={null} darkbloom [--config ] [options] ``` ## Global options | Option | Effect | | - | - | | `-c`, `--config ` | Read `provider.toml` from this path instead of `~/.config/darkbloom/provider.toml` | | `--version` | Print the installed version | | `-h`, `--help` | Print help for the command or subcommand | ## start Serve on this Mac and install/start the provider LaunchAgent. ```bash theme={null} darkbloom start [options] ``` | Flag | Default | Effect | | - | - | - | | `--model ` | saved selection | Select these models and skip the picker. Repeatable | | `--all` | off | Serve every downloaded model that fits | | `--coordinator-url ` | `wss://api.darkbloom.dev/ws/provider` | Override the coordinator WebSocket URL | | `--idle-timeout ` | `[backend] idle_timeout_mins` (`60`) | Minutes without requests before models unload. `0` keeps them loaded | | `--local` | off | Only me: local API, no coordinator | | `--network` | off | Darkbloom network only: no local API | | `--me-first` | off | Both: local API beside Darkbloom, with network requests paused while you use it | | `--no-me-first` | off | Both, shared: Darkbloom keeps serving while you use the local API | | `--port ` | saved or first free from 8001 | Local API port | | `--bind ` | `127.0.0.1` | Local API bind address | | `--no-auth` | off | Disable the local API bearer-token check | | `--foreground` | off | Serve in this process instead of the LaunchAgent; launchd uses this internally | | `--schedule` | off | Open the availability wizard before starting | A first interactive `start` asks how the Mac serves (Only me, Darkbloom network, or Both, me first) and what to do with memory when idle. The answers are saved. ## stop and restart ```bash theme={null} darkbloom stop [--timeout ] [--force] darkbloom restart [--timeout ] [--startup-timeout ] [--force] ``` `stop` drains accepted requests, then stops the LaunchAgent. `restart` drains, starts again with the saved configuration, and confirms fresh authorization. `--force` permits interrupting unfinished work. ## status ```bash theme={null} darkbloom status darkbloom status --json ``` Prints the saved configuration, hardware, schedule, live daemon state and the coordinator's last `Trust: / ` message, plus per-slot KV/MTP posture. `--json` prints the answers in progress only. ## doctor and verify ```bash theme={null} darkbloom doctor [--strict] [--support] [--coordinator ] darkbloom verify [--coordinator ] ``` `doctor` checks hardware, the local API, account link, Secure Enclave, runtime, downloaded models and coordinator connectivity. On macOS 27 it also prints an `APP ATTEST` section. It reports an old Darkbloom MDM profile for information only: Darkbloom no longer uses MDM, and `darkbloom unenroll`, choice 2, opens System Settings to remove one. `--strict` exits 1 on warnings too. `verify` is `doctor --strict`. ## models ```bash theme={null} darkbloom models list [--json] [--all] [--hash ] darkbloom models catalog [--coordinator ] [--json] [--type text] darkbloom models download darkbloom models remove [--force] darkbloom models location [PATH] [--check|--from-env|--reset] ``` `list` shows downloaded models; `catalog` asks the coordinator for the current network catalog; `download` fetches weights; `remove` deletes them; `location` selects or inspects the model cache directory. ## login and logout ```bash theme={null} darkbloom login darkbloom logout [--timeout ] [--force] ``` `login` starts an RFC 8628 device-code flow and saves a provider token to `~/.darkbloom/auth_token`. `logout` drains and stops the provider, revokes that token with the coordinator, then deletes it locally. It does not remove models, App Attest keys or profiles. ## logs ```bash theme={null} darkbloom logs [--last 1h] [-f] darkbloom logs --file [--lines 50] ``` By default, streams unified logs for subsystem `dev.darkbloom.provider`. `--last ` reads history, `-f` follows, and `--file` tails `~/.darkbloom/provider.log` instead. ## update ```bash theme={null} darkbloom update [--check-only] [--rollback] [--yes] [--timeout ] [--force] ``` Checks for a signed release, downloads and verifies it, drains the running provider and atomically replaces the app. `--check-only` reports without installing. `--rollback` restores the retained predecessor and quarantines the current release. ## autoupdate ```bash theme={null} darkbloom autoupdate enable|disable|status ``` Toggles `provider.auto_update`. When enabled, the provider checks for releases on its schedule and installs them after verification. ## schedule ```bash theme={null} darkbloom schedule # interactive weekly availability editor darkbloom schedule --show # print saved windows and time zone darkbloom schedule --disable # disable scheduling, keep the windows ``` Scheduling never starts or stops the provider. Saved edits apply on the next `start` or `restart`. The wizard accepts `mon`…`sun`, ranges, `weekdays`, `weekends` and `daily`; an end earlier than the start crosses midnight. See [Scheduling](/provider/scheduling). ## sandbox ```bash theme={null} darkbloom sandbox setup [--linux-slots ] [--macos-slots ] [--disk ] [--plan] darkbloom sandbox status [--json] darkbloom sandbox pause darkbloom sandbox resume darkbloom sandbox logs [-f] darkbloom sandbox uninstall ``` Manages the Darkbloom Sandbox add-on that runs approved CI jobs and agent sandboxes in Linux and macOS VMs beside the inference provider. `setup` requires an account approved for Darkbloom Sandbox and shows the plan before installing. See [Set up sandbox hosting](/provider/sandbox-setup) and [Sandbox status](/provider/sandbox-status), and the add-on's own `status`, `pause`, `resume`, `schedule`, `provider-hold` and `uninstall` commands in `~/DarkbloomSandbox/darkbloom-sandbox`. ## waitlist ```bash theme={null} darkbloom waitlist # list waitlists and this account's place darkbloom waitlist sandbox # join or check the Darkbloom Sandbox waitlist ``` Waitlists are per account. Joining sends nothing about the Mac. ## uninstall ```bash theme={null} darkbloom uninstall darkbloom uninstall --keep-models --yes darkbloom uninstall --everything --yes ``` Removes the provider, LaunchAgents, settings and (optionally) models. `--keep-models` leaves downloaded weights for a later reinstall. `--dry-run` lists every path without changing anything. ## Other commands | Command | Purpose | | - | - | | `darkbloom local` | Start or show the local-only API and its key | | `darkbloom route` | Choose where local requests go when this Mac cannot take them | | `darkbloom cluster` | Set up two Macs to serve one model together | | `darkbloom switch` | Replace the hosted models without restarting | | `darkbloom cache` | Inspect or set encrypted cache storage and write limits | | `darkbloom beta` | List, enable or disable beta features | | `darkbloom idle` | Configure the saved idle-memory policy | | `darkbloom autopilot` | Experimental model residency and download controls | | `darkbloom report` | Upload recent unified logs to the coordinator | | `darkbloom enroll` / `unenroll` | App Attest setup guidance and exit | | `darkbloom benchmark` | Inference benchmarks and harnesses | | `darkbloom fan` | Experimental fan control | # Understanding and withdrawing your earnings Source: https://docs.darkbloom.dev/provider/earnings How inference and Darkbloom Sandbox earnings are calculated, where to read them, and how to withdraw via Stripe. A provider earns from two kinds of work: inference requests served by this Mac, and Darkbloom Sandbox CI jobs it hosts. Both credit the withdrawable balance of the Darkbloom account that owns the Mac. > [!NOTE] > > Sandbox work pays into the same balance: 90% of each CI job's and agent sandbox's charge. See [What you earn](/provider/sandbox-hosting#what-you-earn). ## Inference earnings During the public alpha the platform fee is 0%, so providers keep 100% of the per-token revenue. Rates are set per model and vary by model; fetch the current values from `GET /v1/pricing` or read the `pricing` block of `GET /v1/models`. A provider may set its own price only at or below the platform price. There is no `darkbloom earnings` CLI command. View completed inference earnings, Stripe status and usage in the console at [console.darkbloom.dev](https://console.darkbloom.dev). The coordinator credits the provider account when a request settles; reservations and refunds are described in [Pricing](/billing/pricing). An inference request served by the machine's own local API is never billed, and self-route traffic to your own machine is free. ## Darkbloom Sandbox earnings Sandbox jobs are priced per runner class and minute, then billed per second: * A job holds the price of 60 minutes of its runner class when it starts. * It settles on the seconds it actually ran, with a **one-minute minimum** and a **60-minute maximum**. * The current price sheet keeps a **10% fee**; you receive **90%** of the job's time charge. * Each job settles on its own after it finishes. Your share goes to the withdrawable balance as sandbox earnings. * A job lost to the Mac or the VM is neither charged nor paid. Jobs that fail for infrastructure reasons are released and pay nothing. * Jobs your own account pays for are free on your own Macs and settle at \$0: no charge and no payout. * A job keeps the price in effect when it started, even if prices change while it runs. Settled sandbox jobs appear in the console under **Billing → Earnings**, with each job's payout. The console and `GET /v1/provider/account-earnings` keep inference and sandbox totals apart, and list the paid sandbox jobs in `sandbox_payouts`. ## Checking your balance ```bash theme={null} curl https://api.darkbloom.dev/v1/payments/balance \ -H "Authorization: Bearer $DARKBLOOM_API_KEY" ``` `balance_micro_usd` is spendable balance; `withdrawable_micro_usd` is the part you earned and can withdraw. Deposits and invite credits are spendable but never withdrawable. The network also publishes a public leaderboard of provider earnings: ```bash theme={null} curl "https://api.darkbloom.dev/v1/leaderboard?metric=earnings&window=7d" ``` It returns up to the top 200 providers with pseudonymized identities and does not require authentication. ## Withdrawing Darkbloom uses Stripe for payouts. Open **Your earnings** in the console (`/providers/earnings`) and connect a bank account or debit card. The console shows the available rail, the destination's published minimum and maximum, and any fee before you confirm. **1. Connect a payout method** In **Your earnings**, choose **Set up payouts** and complete Stripe onboarding. Stripe collects the bank details and any required identification. **2. Request a withdrawal** Enter a USD amount from **$1** to **$1,000,000** and review the destination, fee and estimated arrival. Confirming debits the withdrawable balance and creates the withdrawal. **3. Track the transfer** **Sent to bank** means Stripe has sent the transfer; your bank may take additional time to credit it. **Queued** means payout funding is temporarily low; the amount stays reserved and retries automatically. **Returned to balance** means the transfer was returned and the earnings were restored. > [!NOTE] > > A withdrawal requires the Mac to be linked to your account. If you have not run `darkbloom login`, earnings from that Mac are not credited to your account. ## Maximising earnings * **Uptime** — the more hours the provider is running and connected, the more requests it can serve. Use [scheduling](/provider/scheduling) for hours when the Mac would otherwise be idle. * **Model choice** — larger, higher-value models can earn more per token, if the Mac has the memory headroom. * **Hardware** — more unified memory and higher memory bandwidth serve requests faster, which can increase tokens per hour. * **Sandbox slots** — a Mac with enough cores, memory and free disk can host more CI jobs at once. Slot sizing and disk rules are in the Darkbloom Sandbox provider documentation. # Installing and setting up the provider agent Source: https://docs.darkbloom.dev/provider/install Install the Darkbloom provider on an Apple Silicon Mac, choose how it serves, link your account, and start earning. The provider agent is the `darkbloom` command and the `Darkbloom.app` bundle it runs from. It serves models locally with MLX, can connect to the Darkbloom network, and can also host Darkbloom Sandbox jobs. You do not need to install Python, a virtual environment, or an inference engine first. ## Requirements * An Apple Silicon Mac. The installer checks `uname -m` = `arm64` and refuses an Intel Mac. * macOS 27 or later for a new network provider. The binary targets macOS 14, and a Mac that already has the CLI or a provider config can reinstall or repair on an older system with an upgrade notice, but current App Attest authorization requires macOS 27. * Enough unified memory for the model you choose. Model fit is listed in the provider's hardware requirements and in the model catalog; the small models fit smaller Macs, and the largest catalog builds need 128 GB or more. * Outbound HTTPS to `https://api.darkbloom.dev`. * No `sudo`. The installer writes to `~/.darkbloom`, appends one `PATH` line to your shell rc file, and tries to link `/usr/local/bin/darkbloom`. ## Install ```bash theme={null} curl -fsSL https://api.darkbloom.dev/install.sh | bash exec $SHELL -l ``` Open a new Terminal window instead of `exec $SHELL -l` if you prefer. The installer: 1. Verifies `Darwin` and `arm64`, then prints the chip, memory and macOS version. 2. Fetches the latest release metadata and refuses a new install below macOS 27. 3. Downloads the release tarball and verifies its bundle hash. 4. Installs `Darkbloom.app` atomically and verifies the binary hash, the Metal library hash, the code signature (`io.darkbloom.provider`) and a runtime smoke test. A tarball without `Darkbloom.app` is refused; the install directory is left unchanged on any failure. 5. Links `~/.darkbloom/bin/darkbloom` onto your `PATH`. 6. Creates the Secure Enclave identity if it is missing. Failure here is a warning and reduces trust, not a failed install. 7. Configures verification: App Attest on macOS 27 or later. Darkbloom no longer uses MDM, so the installer configures no MDM profile. > [!NOTE] > > Hosting sandboxes on the same Mac is a separate add-on. See [Set up sandbox hosting](/provider/sandbox-setup) for the plan, slots and disk rules. ## Choose how the Mac serves Run: ```bash theme={null} darkbloom start ``` A first start asks nothing: it serves **Both** (the Darkbloom network and a local OpenAI-compatible API on this Mac), with Darkbloom never paused, and saves that. To serve another way, name it: * **Only me** — `darkbloom start --local` or `darkbloom local`: a local API, no coordinator, no earnings. See [run models on your own Mac](/inference/run-on-your-own-mac). * **Darkbloom network** — `darkbloom start --network`: serve the public network; no local API. * **Both, me first** — `darkbloom start --me-first`: network requests pause while you use the local API; `--no-me-first` turns the pause off again. Each choice is saved. `darkbloom --opencode` (or `--hermes`) is a shortcut that starts the Mac and configures that tool against the local API. ## Link your account Earnings are credited to the Darkbloom account linked to the Mac: ```bash theme={null} darkbloom login darkbloom restart ``` `darkbloom login` runs an RFC 8628 device-code flow: it prints a URL and a one-time code, opens the browser, and polls until you approve. The provider token is saved to `~/.darkbloom/auth_token`. It is not a consumer API key. > [!WARNING] > > If you skip account linking, a network provider can still run, but earnings are not credited. `darkbloom logout` revokes the saved token and stops the provider. ## Pick a model ```bash theme={null} darkbloom models catalog darkbloom models list darkbloom models download ``` `catalog` asks the coordinator for the current network catalog; `list` shows what is already downloaded and whether it fits this Mac. Model weights go to your Hugging Face cache (`~/.cache/huggingface/hub/models----`) unless you choose another location with `darkbloom models location`. ## Start serving ```bash theme={null} darkbloom start ``` `start` installs and starts the provider LaunchAgent, which persists across reboots and restarts after a crash. It preloads the selected models at startup. Use `darkbloom start --foreground` to keep the process in the terminal for debugging. Check the result: ```bash theme={null} darkbloom status darkbloom doctor ``` `status` prints the saved configuration, hardware, schedule, live daemon state and the coordinator's last trust message. `doctor` runs the full diagnostic, including the local API, account link and App Attest checks on macOS 27. ## Host Darkbloom Sandbox jobs The same Mac can run approved GitHub Actions CI jobs in Linux and macOS VMs. The add-on is separate from the inference provider and is managed through the provider CLI: ```bash theme={null} darkbloom sandbox setup darkbloom sandbox status darkbloom sandbox pause darkbloom sandbox resume darkbloom sandbox logs -f darkbloom sandbox uninstall ``` `darkbloom sandbox setup` requires a Darkbloom account approved for Darkbloom Sandbox. It shows the plan for this Mac, asks before installing anything, and installs the add-on in `~/DarkbloomSandbox`. Inference pauses while a job runs. See the Darkbloom Sandbox provider documentation for disk, slot and work-disk rules. ## Update and uninstall ```bash theme={null} darkbloom update darkbloom uninstall ``` `darkbloom update` checks the coordinator for a signed release, verifies it and atomically replaces the app; `--check-only` reports without installing. `darkbloom uninstall` offers to remove everything or to keep downloaded models for a later reinstall. ## Configuration file The provider reads `~/.config/darkbloom/provider.toml`, or an explicit `--config `. Retired `~/.config/eigeninference` and `~/.dginf` installs are not migrated. Changes take effect on the next `darkbloom start` or `darkbloom restart`. See the [CLI reference](/provider/cli-reference) for commands and flags, and the [scheduling guide](/provider/scheduling) for availability windows. # Manage your provider with the Darkbloom desktop app Source: https://docs.darkbloom.dev/provider/macos-app The Darkbloom desktop app shows provider status, models and earnings from a menu bar interface and controls the same provider as the CLI. The Darkbloom desktop app is a menu bar app that wraps the `darkbloom` provider. Closing its window keeps it in the menu bar. Provider start, stop and restart go through the same CLI and backend, so the app and terminal show the same state. ## Features > [card] Start and stop serving > > Start serving, stop, or restart from the menu bar or the app window. > [card] Provider status > > See whether this Mac is serving, its trust state, the loaded model and recent activity. > [card] Models > > Inspect the models this Mac can serve and the model cache. > [card] Earnings > > View your balance and earnings history. Inference and sandbox earnings are shown separately. > [card] Leaderboard > > See the public provider rankings from the network stats endpoints. > [card] Launch at login > > Keep the menu bar app available after you log in. ## Accessing settings Click the Darkbloom icon in the menu bar to open the status panel. The app window gives you the full view: serving state, this Mac's configuration, models, earnings and updates. Settings you change there are written to the same `~/.config/darkbloom/provider.toml` and provider state that the CLI reads. ## Earnings display The app shows your balance and recent earnings. For a full breakdown with per-request detail and withdrawal options, use the web console at [console.darkbloom.dev](https://console.darkbloom.dev). There is no `darkbloom earnings` CLI command. ## Updates The app uses the same signed provider releases as the CLI. When a release is available, it can install it through the provider's updater; a desktop build that has no update feed reports that desktop app updates are not configured and leaves provider updates to `darkbloom update`. ## Setup When you launch the app for the first time, it detects the installed provider and its configuration. If the provider is not installed, install it from the terminal first: ```bash theme={null} curl -fsSL https://api.darkbloom.dev/install.sh | bash ``` The app connects to the existing `~/.darkbloom` installation and its LaunchAgent; you do not need to configure the provider twice. # Earn by sharing your Mac's compute on Darkbloom Source: https://docs.darkbloom.dev/provider/overview Run AI inference and Darkbloom Sandbox CI jobs on your Apple Silicon Mac. Keep 100% of inference revenue during the alpha and 90% of sandbox job charges. Darkbloom turns idle GPU cycles and spare capacity on an Apple Silicon Mac into income. The inference provider serves network requests from a hardened local process. The same Mac can also host Darkbloom Sandbox CI jobs in isolated Linux and macOS VMs. ## Host CI jobs and sandboxes Your Mac can also run Darkbloom CI jobs and agent sandboxes in Linux and macOS VMs beside the inference provider. The add-on uses its own slots and disk budget, and inference pauses while a VM runs. See [Host CI jobs and sandboxes](/provider/sandbox-hosting) for requirements, earnings and the waitlist. ## System requirements > [card] Chip > > Apple Silicon M1 or later > [card] macOS > > macOS 27 or later for a new network provider; a Mac with an existing install can repair on an older system > [card] Memory > > Enough unified memory for the model you choose; the catalog lists each model's fit > [card] Network > > Outbound internet access only — no port forwarding or firewall changes The provider binary targets macOS 14, but current App Attest authorization for new network providers requires macOS 27. A Mac below macOS 27 prints an upgrade warning and cannot start a new network install; existing legacy-authorized providers keep their current terms. Darkbloom Sandbox has its own requirements: macOS 27, Apple silicon, a desktop session that stays logged in, and enough free disk for the VMs. The add-on sizes slots from the Mac's cores, memory and free space. ## How earning works **Inference.** Consumers pay per token. During the public alpha the platform fee is 0%, so the provider keeps 100% of the per-token revenue. Rates vary by model; `GET /v1/pricing` and the `pricing` block in `GET /v1/models` are authoritative. **Darkbloom Sandbox.** CI jobs are priced per runner class and minute and billed per second, with a one-minute minimum and a 60-minute maximum. The current price sheet keeps a 10% fee and the provider receives 90% of the job's time charge. Each job settles after it finishes; a job lost to the Mac or VM is neither charged nor paid. Both kinds of earnings credit the withdrawable balance of the Darkbloom account that owns the Mac. Payouts use Stripe. See [Earnings](/provider/earnings). The network publishes a public earnings leaderboard at `GET /v1/leaderboard`. ## Privacy: what you can and cannot see Inference requests are encrypted between the coordinator and the provider process. The provider process decrypts the request because it runs the model, so it necessarily sees the prompt and completion in plaintext. The coordinator also opens the request in memory to route and bill it and writes no prompt content to logs or storage. Do not describe this as end-to-end encryption. Runtime protections keep that plaintext inside the hardened provider process as far as the platform can enforce: * Debugger attachment is refused at the kernel level (`PT_DENY_ATTACH`). * Memory-reading APIs and code injection are blocked by Hardened Runtime. * Core dumps are disabled before inference data enters the process. * SIP must stay enabled; the provider refuses to serve if SIP is off. With SIP off, an administrator can read a running process's memory. Attestation and routing gates reduce that risk but do not make the Mac owner cryptographically unable to read the provider process. For Darkbloom Sandbox, a CI job or agent sandbox runs in a VM with no shared folders and no network card. Its disk writes are encrypted, and its traffic leaves through Darkbloom's gateway. The VM boundary is Apple's hypervisor; a flaw in it or a Mac with SIP off changes the residual risk. Consumers receive the inference response and nothing from your Mac beyond it. ## Attestation A provider proves its identity and build to the coordinator before it receives work. Every new provider uses App Attest on macOS 27 or later, the only verification Darkbloom supports: Darkbloom no longer uses MDM. A provider verified before the migration may keep a frozen legacy Secure Enclave authorization, but no new machine can join it, and the `hardware` trust level that path used to earn is historical. The coordinator verifies a qualified signed build, checks the machine's security posture, and stops routing when authorization expires or is revoked. Attestation data for public providers is available at `GET /v1/providers/attestation`, and per-response headers name the provider and its verification method. See [Attestation](/security/attestation) and [Trust levels](/security/trust-levels). > [!NOTE] > > `darkbloom doctor` checks the local provider and, on macOS 27, prints the App Attest section. A local pass is a diagnostic, not a coordinator serving authorization. # Host CI jobs and sandboxes on your Mac Source: https://docs.darkbloom.dev/provider/sandbox-hosting Run other people's GitHub Actions jobs and agent sandboxes in virtual machines on your Apple silicon Mac, beside the Darkbloom inference provider, and earn for the time they run. The Darkbloom Sandbox add-on lets your Mac host two kinds of work for other people, each in its own virtual machine (VM): CI jobs from public GitHub repositories that Darkbloom approved, and interactive agent sandboxes for accounts on Darkbloom's alpha list. It runs beside the inference provider, on the same Mac and the same Darkbloom account. > [card] [Set up your Mac](/provider/sandbox-setup) > > Install the add-on, approve the Mac, choose work disks, and set the slots, cache and schedule. > [card] [Check your Mac's status](/provider/sandbox-status) > > Every status state, the free-disk floor, and what to do when a job waits or the Mac stops taking work. ## What your Mac runs **CI jobs.** These are GitHub Actions jobs from public repositories that Darkbloom reviewed and approved. Each job gets its own Linux or macOS VM, created for that job and deleted when it ends. A Linux VM has 4 or 8 cores and 16 or 32 GB of memory; a macOS VM has 8 or 12 cores and 16 or 32 GB. The repository's approval sets the size. Jobs are placed only on Macs with room for them, so a larger job needs more free cores, memory and disk. **Agent sandboxes.** These are interactive Linux and macOS VMs that accounts on Darkbloom's alpha list start, connect to with SSH or a screen (VNC), and use for coding agents such as Codex. Agent sandboxes are on by default from add-on 1.3.0, and you can turn them off. A sandbox has 4 to 12 cores and 8 to 32 GB, as its user chooses. A run stops after at most 24 hours, and earlier when nobody is connected and it moves no traffic for its idle limit (at most 2 hours). Its workspace stays on your Mac while the sandbox is stopped, so its user can resume it. macOS sandboxes run only on Macs that also run macOS jobs, in their macOS slots. Darkbloom deletes a sandbox that stays stopped for 30 days by default, and its workspace with it. ### What a VM can reach * A VM has no network card and no shared folders. It cannot see your files, your apps or your home network. * Its only connection to your Mac is a virtual socket to the worker process that runs it. The VM's traffic leaves through Darkbloom's gateway in an encrypted tunnel that your Mac relays but cannot read. * The gateway connects only to hosts on the VM's list, on port 443. For a CI job, that is GitHub's Actions hosts plus hosts Darkbloom reviewed for that repository. For an agent sandbox, it is Darkbloom's list for coding tools or the hosts its user named. * The traffic still uses your Internet connection, and the servers see the gateway's address, not yours. * A job or sandbox cannot open a port on your Mac or your router. Agent sandbox users connect through the gateway. Treat every CI job and every agent sandbox as untrusted code. The VM boundary is Apple's Virtualization framework, so keep macOS up to date and keep System Integrity Protection (SIP) on. A job's credentials are sealed, and the disk it writes is encrypted, except macOS writes outside the runner's home folder. The Mac holds only encrypted workspace data for a sandbox, with limits described in [agent sandbox security](/sandboxes/security). You can see that jobs run and which repository each one is from, but not their files or credentials. ## How it works with the inference provider Both run on the same Mac and take turns: * Before a VM starts, the agent asks the inference provider to pause. The provider stays connected, finishes the requests in flight, unloads its models and takes no new requests. This takes seconds to minutes. * Darkbloom counts the memory your models use as free for jobs, so a busy provider can still be paused for a job. You earn nothing from inference while it is paused. * Shortly after the last VM exits, the agent releases the provider and it serves again. * If the provider refuses to pause, or does not pause in time, the Mac turns the job down, and Darkbloom places it on another Mac. You choose whether jobs may pause inference: ```sh theme={null} ~/DarkbloomSandbox/darkbloom-sandbox provider-hold --policy preempt ~/DarkbloomSandbox/darkbloom-sandbox provider-hold --policy when_idle --idle-minutes 10 ~/DarkbloomSandbox/darkbloom-sandbox provider-hold --policy never ~/DarkbloomSandbox/darkbloom-sandbox provider-hold ``` | Policy | What happens | | - | - | | `preempt` (default) | A job pauses inference whenever it needs the Mac. | | `when_idle` | A job pauses inference only after the provider has served no request for the number of minutes you set (5 by default). While it serves, this Mac takes no job. With an older provider that does not report idle time, the Mac takes no job while inference runs. | | `never` | Jobs never pause inference. While the provider runs, this Mac takes no job; when it stops, jobs come again. | The change applies at once, without a restart. A job that already paused inference keeps it paused until it ends. With `never`, no new job joins it. Your choice stays on the Mac, in the same settings file as your schedule. ## What you need ### Recommended Macs The tiers fit Darkbloom's own CI jobs: Linux VMs of 4 cores and 16 GB, and macOS VMs of 12 cores and 32 GB. Slot sizing leaves you a quarter of the cores and of the memory, and the inference provider another quarter of the memory, so a macOS job of that size needs a Mac with at least 16 cores and 64 GB. | Tier | Cores | Memory | Free disk | For example | | - | - | - | - | - | | 1. macOS and Linux (most wanted) | 24 or more | 128 GB or more | 400 GB or more (2 TB SSD) | Mac Studio with an M2 Ultra or later | | 2. macOS (minimum) | 16 or more | 64 GB or more; 128 GB is better | 250 GB or more (1 TB SSD) | Mac Studio with the 16-core M4 Max | | 3. Linux only | 10 to 14 | 32 GB or more | 100 GB or more on a 512 GB SSD, 150 GB or more on a larger one | Mac mini with an M2 Pro or M4 Pro | * **Tier 1** runs a macOS job and Linux jobs at the same time. * **Tier 2** usually runs one job at a time, macOS or Linux. With 128 GB, a Linux job can run beside a macOS one. * **Tier 3** runs Linux jobs only; a macOS job does not fit. Free disk is the space before you install, as `df -H ~` shows it (Avail). Finder can show more, because it counts purgeable space. [Set up your Mac](/provider/sandbox-setup#disk-budget) explains the floor and what each job needs. ### Every Mac | | | | - | - | | Mac | Apple silicon, M2 or newer preferred. A desktop Mac that is always on. | | macOS | 27 or later. | | Account | A Darkbloom account that Darkbloom approved as a Mac owner. The Mac's earnings go to the account that approves it. | | Session | Stay logged in to the Mac's desktop. App Attest, which proves the add-on to Darkbloom, only works in your login session. After a restart, the agent starts when you log in. With FileVault, the Mac waits at the unlock screen until you do. | | Power | Keep the Mac plugged in and turn off automatic sleep. The add-on does not keep the Mac awake. A sleeping Mac gets no jobs, and a job lost to sleep is not paid. | | Security | Keep System Integrity Protection (SIP) on. With SIP off, an administrator can read a running VM's memory. | | Network | A wired connection, ideally 100 Mbps down and 20 Mbps up or more. Outbound connections only: HTTPS on port 443 to Darkbloom and, for downloads, Google Cloud Storage, and TLS on port 9443 to Darkbloom's gateway. You do not need to open any inbound ports. The VM images (about 3 GB for Linux and 45 GB for macOS) and each job's downloads use your connection. | | Other VMs | No macOS VMs of your own: macOS runs at most two at a time, yours included. Linux VMs are fine within the cores and memory left. | | Cores and memory | Slot sizing leaves you a quarter of the cores (at least 2) and a quarter of the memory (at least 8 GB). If the inference provider runs, it keeps another quarter of the memory. Each Linux slot needs 4 cores and 16 GB of what is left. Each macOS slot needs 8 cores and 16 GB. One Linux slot therefore needs 24 GB of memory, or 32 GB with the inference provider. | | Disk | Free space on the disk that holds your home folder, or on disks you add. See the tiers above and the [disk budget](/provider/sandbox-setup#disk-budget). | You can keep using the Mac. Darkbloom's VMs together never get more than three quarters of the memory: a quarter (at least 8 GB) stays yours, and a VM starts only when the Mac reports enough free memory for it. A VM larger than the Mac's memory less your quarter never starts: on a 36 GB Mac, no 32 GB VM. CI slots also leave you at least a quarter of the cores. To keep more cores, set **Cores you keep** on the Mac's page in the console; the default is 0, which leaves the slots to limit the cores. ## What you earn Darkbloom keeps a 10% platform fee, so you earn 90% of each CI job's charge and 90% of each agent sandbox's charge. The rates below are as of November 2026. A busy hour means the job or sandbox uses the Mac for the whole hour; earnings depend on demand, and no utilisation is promised. ### CI jobs | Runner class | Platform | vCPU / memory | Customer pays per hour | You earn per hour | | - | - | - | - | - | | `linux-arm64-4cpu-16gb` | Linux | 4 / 16 GB | \$0.15 | \$0.135 | | `linux-arm64-8cpu-32gb` | Linux | 8 / 32 GB | \$0.30 | \$0.27 | | `macos-arm64-8cpu-16gb` | macOS | 8 / 16 GB | \$1.20 | \$1.08 | | `macos-arm64-12cpu-32gb` | macOS | 12 / 32 GB | \$2.40 | \$2.16 | Rates are stored per minute and shown in the console under **Billing → Rates**. Billing is per second, from when the job starts on its runner to when it finishes, with a one-minute minimum and a 60-minute maximum. Queue, boot and teardown time are not billed. A slot sized for the smaller class earns the first row of its platform; a larger job runs only where the Mac has room for it. ### Agent sandboxes | Size | Platform | vCPU / memory | Customer pays per hour | You earn per hour | | - | - | - | - | - | | `c4-m8` | Linux | 4 / 8 GiB | \$0.192 | \$0.1728 | | `c4-m16` | Linux | 4 / 16 GiB | \$0.256 | \$0.2304 | | `c8-m16` | Linux | 8 / 16 GiB | \$0.384 | \$0.3456 | | `c8-m32` | Linux | 8 / 32 GiB | \$0.512 | \$0.4608 | | `c12-m32` | Linux | 12 / 32 GiB | \$0.640 | \$0.576 | | `mac-c4-m8` | macOS | 4 / 8 GiB | \$0.35 | \$0.315 | | `mac-c4-m16` | macOS | 4 / 16 GiB | \$0.45 | \$0.405 | | `mac-c8-m16` | macOS | 8 / 16 GiB | \$0.70 | \$0.63 | | `mac-c8-m32` | macOS | 8 / 32 GiB | \$0.90 | \$0.81 | These are the 4 to 12 vCPU sizes a provider Mac hosts, as its user chooses. `darkbloom-sandbox-cli sizes` lists them and which sizes your account may boot. A sandbox bills per second from the moment it is ready, with a one-minute minimum per charge (each boot, and each further hour a long boot runs), and a stopped sandbox costs nothing. It earns for the time it runs, whether or not its user is connected, within its idle and maximum limits. ### When you are paid * Each CI job settles on its own after it finishes. Your share goes to the withdrawable balance of the Darkbloom account that approved the Mac, as sandbox earnings. Agent sandbox charges earn the same 90% and are credited to that account. You withdraw the balance the same way as inference earnings. * A job lost to the Mac or the VM is neither charged nor paid. That covers a Mac that went offline, slept or crashed, and a VM that failed to start. * Jobs your own account pays for are free on your own Macs. They settle at \$0: no charge and no payout. Darkbloom prefers your Macs for those jobs. * **Billing → Earnings** in the console lists the settled jobs on your Macs. ## Waitlist and approval Your account must be approved to host Macs. Depending on how you install, you meet that approval in one of two places. * **The Darkbloom Sandbox waitlist.** With the Darkbloom provider CLI, `darkbloom waitlist sandbox` puts your account on the waitlist and shows your place in line. Run it again to see where you stand; it keeps your place. The waitlist is per account, not per Mac, and Darkbloom reviews accounts in the order they joined. `darkbloom sandbox setup` also offers to join when your account is not on the waitlist, then stops until Darkbloom approves it. * **The owner waitlist.** If you install with the add-on's installer, the approval page asks you to sign in. If your account is not approved as a Mac owner, your request joins the owner waitlist and the Mac waits up to 7 days for Darkbloom to decide. From add-on 1.2.0 you can close the setup window: the Mac keeps waiting, also across restarts and macOS updates, and enrolls by itself once approved. Running the installer again shows the same code. Setup shows a code for the Mac. Approve it within 15 minutes, or the code expires and you run setup again for a new one. Approve it with the Darkbloom account that should receive the earnings. A `darkbloom login` session cannot approve a Mac. If the Mac hosted before, its code replaces the old host, and the approval page asks you to confirm the replacement. ## Next steps * [Set up your Mac](/provider/sandbox-setup): install, approve, choose work disks, size the cache and schedule the Mac. * [Check your Mac's status](/provider/sandbox-status): read every state and fix the common problems. * [Inference provider earnings](/provider/earnings): withdraw the balance that sandbox jobs pay into. # Set up your Mac to host sandboxes Source: https://docs.darkbloom.dev/provider/sandbox-setup Install the Darkbloom Sandbox add-on, approve the Mac, choose work disks, size the build cache, and schedule, update or remove the add-on. This page takes a Mac that already meets the [hosting requirements](/provider/sandbox-hosting#what-you-need) and makes it a Darkbloom Sandbox host. Setup installs the add-on in `~/DarkbloomSandbox`, enrolls the Mac, and downloads the VM images in the background. **1. Install the add-on** With the Darkbloom provider CLI, update to 0.10.5 or later, then run setup: ```sh theme={null} darkbloom update darkbloom sandbox setup ``` Setup checks the Mac and asks before it changes anything. Without the CLI, run the add-on's installer directly: ```sh theme={null} curl -fsSL https://api-sandbox.darkbloom.dev/install.sh | sh ``` Setup refuses `sudo`. Run it as your own user, logged in at the desktop. Arguments go to the installer after `sh -s --`. For example: ```sh theme={null} curl -fsSL https://api-sandbox.darkbloom.dev/install.sh | sh -s -- --macos-slots 1 ``` **2. Read the plan** Setup prints the cores, memory and disk it counted, how many Linux and macOS jobs the Mac can run at a time, and what limited them. With `darkbloom sandbox setup`, nothing is installed until you answer `y`. To see the plan without installing anything: ```sh theme={null} curl -fsSL https://api-sandbox.darkbloom.dev/install.sh | sh -s -- --plan ``` If no job fits, setup says how much disk one Linux job and one macOS job would need, and stops. **3. Approve the Mac** The installer opens the console's device page with the Mac's code filled in, and prints the link and code as well. Sign in with the Darkbloom account that should receive the earnings, check that the Mac and code are yours, and press **Approve this Mac**. ![Sandbox console enrollment request page showing the code, the Mac's model and add-on version, and what approving does](https://mintcdn.com/eigenlabs-f49d2e97/2TtlNanikOmTAJr5/images/console/device-approve.png?fit=max\&auto=format\&n=2TtlNanikOmTAJr5\&q=85\&s=df6a18490d89564a991ba7a10b69b00e) The enrollment request page in the sandbox console: check the code and the Mac, then approve it. Example data. Approve within 15 minutes, or the code expires and you run setup again for a new one. In add-on releases after 1.3.3, the installer also shows the time the code expires. Add `--no-browser` to print the link without opening a browser. If the account is not approved yet, the request joins a waitlist and the Mac waits; see [waitlist and approval](/provider/sandbox-hosting#waitlist-and-approval). From add-on 1.2.0 you can close the setup window, and the Mac keeps waiting across restarts and macOS updates. If the Mac hosted before, its code replaces the old host. The installer says which, and the approval page asks you to confirm the replacement: tick **I am re-enrolling …**, then **Approve & replace**. **4. Let the images download** After enrollment the agent starts, and the Mac downloads its VM images in the background: about 3 GB for Linux and 45 GB for macOS. On a Mac that runs only Linux jobs, that is the 3 GB. At 100 Mbps the macOS image takes about an hour. The Mac takes jobs once an image is installed. Add `--wait-ready` to setup to keep it open until then, or follow the download with `darkbloom sandbox status`. Getting no job in the first hour is normal. ## What the plan counts The installer sizes the slots from the Mac's cores, memory and free disk. It prints the slots it chose and what limited them. * The owner keeps a quarter of the cores (at least 2) and a quarter of the memory (at least 8 GB). If the inference provider runs, it keeps another quarter of the memory. * A slot takes the smaller runner class of its platform: Linux 4 cores and 16 GB, macOS 8 cores and 16 GB. * Slots go out Linux, macOS, Linux, macOS, then Linux, while cores, memory and disk last. * macOS has at most 2 slots, the kernel's limit, which counts your own macOS VMs too. Linux has at most 16. * Disk gives each Linux slot its job's 30 GiB scratch disk, each macOS slot its job's 40 GiB write budget, and the first slot of a platform its images (4 GiB for Linux, 46 GiB for macOS) unless they are already installed. | Mac, with enough free disk | Linux slots | macOS slots | | - | - | - | | 8 cores, 16 GB | 0 (the installer refuses) | 0 | | 12 cores, 32 GB | 1 | 0 | | 16 cores, 48 GB | 1 | 1 (0 with the inference provider) | | 16 cores, 128 GB | 1 | 1 | | 24 cores, 192 GB | 2 | 1 | | 32 cores, 512 GB | 2 | 2 | Slots are counted at the smaller VM size. Darkbloom places each job by the cores, memory and disk the Mac reports free at that moment, so a larger job needs more room. The plan names what stopped the hand-out from giving a platform another slot: `free disk space`, `cores`, `memory`, `the 16-slot maximum`, `macOS's limit of 2 VMs, yours included`, or `your choice` when you set the count. ### Choose the number of slots Ask for fewer jobs with `--linux-slots` and `--macos-slots`. Linux takes 0 to 16 and macOS 0 to 2; both 0 is refused. ```sh theme={null} darkbloom sandbox setup --linux-slots 2 darkbloom sandbox setup --macos-slots 1 ``` * `--macos-slots 1` keeps one of macOS's two macOS VMs for your own use. * `--macos-slots 0` keeps both. * `--linux-slots 0` gives macOS the whole disk. Running setup again recomputes the slots, so give your options again each time. A rerun keeps the enrollment, rewrites `agent.json`, and restarts the agent only if something changed. Rerunning is always safe: if anything fails, the installer puts back what ran before, and it never moves a Mac to an older release. ## Disk budget The add-on keeps its images and jobs in `~/DarkbloomSandbox`, on the disk that holds your home folder, or on the work disks you give it. * **Floor.** Darkbloom keeps a floor of free space: a tenth of the disk, at least 50 GiB and at most 100 GiB (54 to 107 GB). No job starts, and no image downloads, if that could push free space below the floor. * **Images.** About 3 GB for Linux and 45 GB for macOS. A Mac downloads only the images of the jobs it runs. They download at setup and again when Darkbloom updates an image, and for a while both copies stay on the disk. Most macOS updates (the GitHub runner, Darkbloom's own guest software) replace only a 0.5 GB part of the macOS image; a new macOS or Xcode version replaces the 45 GB disk. * **Linux jobs.** Each Linux slot needs 30 GiB (32 GB) above the floor for its job's scratch disk, also while images download. * **macOS jobs.** Each macOS slot needs 40 GiB (43 GB) above the floor, the most a macOS job is expected to write, also while images download. That room is all a macOS job needs to start: its VM's disk is 150 GiB (161 GB), but takes only what the job writes. * **Guard.** If free space still falls below the floor while jobs run, the add-on stops the running jobs within about 10 seconds and deletes what they wrote. Darkbloom runs those jobs elsewhere. * **Agent sandbox images.** With agent sandboxes on, the Linux sandbox image takes 10 GiB, which the installer keeps room for. On Macs that run macOS jobs the macOS one takes about 46 GiB: that image downloads only into the space left beyond the floor, the slots' room and your CI images, and the Mac offers macOS sandboxes once it is in. When it sizes the slots, the installer counts for the first slot of each kind its images too, rounded up (4 GiB for Linux, 46 GiB for macOS), unless they are already on the Mac. A job uses only the space it writes and frees it when it ends. For example, a 2 TB disk keeps a floor of 100 GiB (107 GB). With 157 GiB (169 GB) free before you install, a Mac gets one Linux slot and a 23 GiB build cache. With 220 GiB (236 GB) free, it gets a Linux and a macOS slot if its cores and memory allow, and no build cache until about 8 GiB more is free. If free space falls after you install and an image no longer fits, that image waits and the others still download, so their slots take jobs. `status` names the image and how much space to free, or run the installer again to fit the slots to the space you have. ## Work disks If the internal disk is what limits the Mac, give the images and jobs one or more other disks. The add-on itself, its settings and logs stay in `~/DarkbloomSandbox`. 1. Use a fast drive: a **Thunderbolt or USB4 NVMe SSD**. Every job reads its VM image and writes its scratch disk there, and a macOS image is 45 GB, so a spinning disk, a USB-A flash drive or a network share makes every job slow (network shares are refused). Use a drive the Mac keeps powered and connected. A job running on a drive that goes away is stopped and run elsewhere, unpaid. 2. Format it as **APFS** in Disk Utility. ExFAT, FAT and Mac OS Extended (HFS+) drives are refused, and so is a disk image: its space is the disk that holds its file. 3. Turn on ownership, which macOS leaves off for external drives: ```sh theme={null} sudo diskutil enableOwnership /Volumes/FastSSD ``` 4. Give the drive to the installer. Repeat `--disk` for more drives, and add `--disk ~` to keep using the internal disk too: ```sh theme={null} darkbloom sandbox setup --disk /Volumes/FastSSD ``` Setup checks each drive before it installs anything. When ownership is off, it prints the command and offers to run it. Add `--plan` first to see what each disk would get. Each disk keeps its own floor of free space (a tenth of the disk, 50 to 100 GiB) and holds the images of the jobs it runs: Darkbloom downloads an image once and copies it to the other disks that need it. The add-on uses a folder named `DarkbloomSandbox` at the top of each drive and nothing else on it. If you unplug a drive, its slots stop taking jobs and nothing is written in its place. Plug it back in and they take jobs again once the add-on has checked the images on it. A drive that mounts after you log in is used as soon as it appears. `status` shows each disk, its free space and its slots. ### An ExFAT drive To keep an ExFAT drive's files, let the add-on make one encrypted disk image on it (a single file at its top; nothing is erased), and give that disk to the installer: ```sh theme={null} ~/DarkbloomSandbox/darkbloom-sandbox managed-disk create --on /Volumes/MyExFAT --size 1000 ``` It prints the `--disk` to give. Its key stays on this Mac, and `uninstall` needs `--delete-managed-disks` to delete it with the install. ## Build cache From add-on 1.2.1 your Mac keeps a build cache for the jobs it runs, on by default. A job restores its dependencies and build outputs from your disk instead of downloading them over your connection, and saves them there for the next job. * It takes up to 32 GiB on a 1 TB disk (16 GiB on 512 GB, 8 GiB on smaller ones), and only what the slots leave: never the floor, never a slot's room. * With less than 8 GiB left, it stays off, and `status` says how much to free. * It gives way to jobs and images at once, deleting its oldest entries. * What it holds is encrypted inside the VM before it reaches your disk. To size it or turn it off, run the installer with `--cache-size 16` (GiB) or `--no-cache`. Without either, an earlier install's size stays; a new install uses the default for its disk. ```sh theme={null} curl -fsSL https://api-sandbox.darkbloom.dev/install.sh | sh -s -- --cache-size 16 curl -fsSL https://api-sandbox.darkbloom.dev/install.sh | sh -s -- --no-cache ``` ## Scheduling and pause To stop taking new work for a while: ```sh theme={null} darkbloom sandbox pause darkbloom sandbox resume ``` No new job starts, and no agent sandbox starts or resumes on the Mac; jobs already running finish and are paid. The Mac stays paused after restarts and updates, and the console shows it as **Paused by owner**. You do not need to sign in. Without the CLI, use `~/DarkbloomSandbox/darkbloom-sandbox pause` and `resume`. To take jobs only in the hours you choose, set a weekly schedule in the Mac's local time: ```sh theme={null} ~/DarkbloomSandbox/darkbloom-sandbox schedule set 'mon-fri 22:00-07:00' 'weekends 00:00-24:00' ~/DarkbloomSandbox/darkbloom-sandbox schedule ~/DarkbloomSandbox/darkbloom-sandbox schedule off ``` Days are `mon` … `sun`, ranges such as `mon-fri`, or `daily`, `weekdays`, `weekends`; an end before the start runs past midnight. Outside every window no new job starts; a job still running when a window ends finishes. `status` and the console show **Paused by schedule** until the next window. ## Agent sandboxes Agent sandboxes are on by default from add-on 1.3.0. Their workspaces live in the same store as the build cache, with their own allowance: 96 GiB by default, set with the installer's `--workspace-size`. Each workspace takes its disk's room when it is created, and the room it may still grow into is kept beside CI jobs. To turn agent sandboxes off, run the installer again with `--no-agent-sessions`. Later installs and updates keep them off, and CI jobs do not change. ```sh theme={null} curl -fsSL https://api-sandbox.darkbloom.dev/install.sh | sh -s -- --no-agent-sessions ``` To stop new work only for a while, use `pause` or a schedule. They stop new CI jobs and new sandboxes alike. ## Updates Updates are automatic. When Darkbloom approves a new release, the agent hears about it over its connection and checks within about two minutes; otherwise it checks every five minutes. (Add-on 1.2.0 and earlier check every hour.) Darkbloom may approve a release for some Macs before others. The agent installs a release only if all of these hold: * The app is signed with Darkbloom's Apple Developer ID, and the release is signed with Darkbloom's release key, which the installed app pins. * The release is newer than the running version and supports your macOS version. * Darkbloom's servers already accept that build for your Mac. The agent then stops taking jobs and waits for the running ones to finish. After that it swaps the app and restarts. You do not need to enroll again. If the new version does not connect to Darkbloom within three starts, or Darkbloom refuses it, the agent goes back to the previous version and skips the new one from then on. `status` shows the last check. ## Uninstall Pause first and wait until `status` shows no job running: uninstalling stops the agent and any running job, and a stopped job is not paid. ```sh theme={null} darkbloom sandbox uninstall ``` The add-on's own command is `~/DarkbloomSandbox/darkbloom-sandbox uninstall`. It removes `~/DarkbloomSandbox` (the app, images and state, except the workspaces it keeps), each work disk's `DarkbloomSandbox` folder (only while that disk is mounted; it says which stays), and the LaunchAgent. Uninstalling keeps the agent sandbox workspaces the Mac stores (add-on releases after 1.3.8). A workspace holds the files of someone's sandbox, stopped or running. It exists on your Mac alone, so deleting it cannot be undone. `uninstall` prints how many it kept, how much disk they use and where they are: ```text theme={null} ==> Kept 2 agent sandbox workspaces of 2 sandboxes (64 GiB reserved, 12.4 GiB used) in ~/DarkbloomSandbox/agent/state/storage; to delete them: rm -rf /Users/you/DarkbloomSandbox/agent/state/storage ``` * The disk space printed as used is what they cost you. If you set the Mac up again the same way (the same disks), it finds them, and until you delete them they count against its workspace allowance, so it takes fewer new sandboxes. The room they may still grow into is also kept from its CI jobs, so it may take fewer CI jobs too. * Today no sandbox can resume from a kept workspace, not even on this Mac set up again: Darkbloom sees that Mac as a new one. Keeping the workspace is what will let it resume once Darkbloom supports that. Darkbloom ends a sandbox that stays stopped for 30 days; after that its workspace is of no use to anyone, and nothing deletes it for you yet. * To delete them as you uninstall, add `--delete-workspaces`. `--yes` alone never deletes them. ```sh theme={null} ~/DarkbloomSandbox/darkbloom-sandbox uninstall --delete-workspaces ``` After an uninstall, the Mac stays registered to your account but gets no work. To revoke it, remove it in the console: **Macs**, then the Mac, then **Remove Mac**. A removed Mac's sandboxes can never resume. The Mac's keychain keeps which host it was, so setting it up again replaces that host instead of adding a second one; you confirm the replacement when you approve the code. To make the Mac forget it, add `--forget`: ```sh theme={null} ~/DarkbloomSandbox/darkbloom-sandbox uninstall --forget ``` For a Mac that is no longer enrolled and fails to approve a replacement code, see [check your Mac's status](/provider/sandbox-status#app-attest-key-stopped-working). # Check your Mac's sandbox status Source: https://docs.darkbloom.dev/provider/sandbox-status Read every Darkbloom Sandbox status state, understand the free-disk floor and waiting images, and fix the common problems that stop a Mac from taking work. `status` is the first place to look when a Mac is not taking jobs, when an image will not download, or when you want to know what the Mac is doing. ```sh theme={null} darkbloom sandbox status ``` Without the provider CLI, run the add-on's own command: ```sh theme={null} ~/DarkbloomSandbox/darkbloom-sandbox status ``` The first line says what the Mac is doing and what to do, if anything. Below it are the host, the agent, the slots and how many are free, the images, the last update check, and the Mac's page in the console, plus each work disk, the build cache and the workspaces when the add-on has them. The console's **Macs** page shows the same. Scripts can read `darkbloom sandbox status --json`, which returns the add-on's own schema 1 document unchanged. ![Sandbox console Macs page listing Macs with status, jobs, slots, images and qualification](https://mintcdn.com/eigenlabs-f49d2e97/2TtlNanikOmTAJr5/images/console/provider-macs.png?fit=max\&auto=format\&n=2TtlNanikOmTAJr5\&q=85\&s=0d2c6f54cd6f22fe2ed66604ebab2e6a) The Macs page in the sandbox console: each Mac's state, slots, images and qualification. Example data. `darkbloom status` adds a `Sandboxes:` line while the add-on is installed. ## States The JSON `state` is one of these. The first line is the human `detail`; the examples below show its wording. | State | What it means | What to do | | - | - | - | | `not_installed` | The add-on is not installed in `~/DarkbloomSandbox`. | [Set up your Mac](/provider/sandbox-setup). | | `waiting_for_approval` | A code waits for approval. | Open the page and approve it with the account that should receive the earnings, before the code expires. | | `waitlisted` | The account is on the owner waitlist. | Wait; the console shows the request, and the Mac enrolls by itself once approved. | | `enrolling` | The Mac is requesting a code, or is approved and proving itself with App Attest. | Wait. This takes a moment. | | `downloading_images` | An image for a platform the Mac has slots for is not installed yet. | Wait for the download, or free the space `status` names if an image waits. | | `ready` | The Mac has its images and can take work. | Nothing. New jobs start when Darkbloom queues work for it. | | `running` | Jobs are running. | Nothing. `pause` stops new ones; running ones finish and are paid. | | `paused` | The owner or the schedule keeps new work away. | `resume`, or change the schedule. | | `updating` | An update is finishing the running jobs before it installs. | Wait. | | `stopped` | The agent is not running. | Log in at the desktop; the agent starts at login. If it stays stopped, run the installer again. | | `error` | Something needs you: enrollment, App Attest, the connection, or the inference provider. | Read the detail; the common causes are below. | ### Waiting for approval and the waitlist `Approve this Mac at https://api-sandbox.darkbloom.dev/device (code WDJB-MJHT, expires at 12:57): this Mac enrolls by itself once approved, also after a restart` Approve with the same Darkbloom account that should receive the Mac's earnings. A `darkbloom login` session cannot approve a Mac. The code lasts 15 minutes, and the line shows when it expires. Running setup again keeps the same code, so you do not need a new one. If nothing waits for the code any more, the line says to run the installer again, which keeps the code. With the owner waitlist, the line names the code, the page, and that the Mac enrolls by itself once Darkbloom approves it, also after a restart. The console shows your request, and the Mac waits up to 7 days for Darkbloom to decide. If the Mac hosted before, approving its code replaces the old host. The approval page asks you to confirm the replacement before it approves the code. ### Downloading images While the first image downloads: `Downloading its Linux image: 42%` A Mac with a Linux image installed and a macOS image still coming takes Linux jobs meanwhile: `Ready for Linux jobs only (free slots: Linux 1 of 1); downloading its macOS image: 42%` An image that does not fit above the free-space floor and the slots' room waits for space, and the other images come first: `its macOS image waits for disk space: free at least 9 GiB (10 GB) on this Mac's disk` If downloads keep failing, the line says they are retried and points at the agent log. If the plane serves no image, the line says no image is installed and the plane serves none to download. ### Ready `Ready for jobs (free slots: Linux 1 of 1, macOS 1 of 1)` The Mac is connected, not paused, and has an image. The plane still places each job by the cores, memory and disk the Mac reports free, so a larger job may need more room than a free slot suggests. ![Sandbox console Mac detail page showing the readiness checklist and Linux and macOS slot capacity](https://mintcdn.com/eigenlabs-f49d2e97/2TtlNanikOmTAJr5/images/console/provider-mac-detail.png?fit=max\&auto=format\&n=2TtlNanikOmTAJr5\&q=85\&s=fe2267684af3e2c73d45140ece7e088d) A Mac's page in the sandbox console: its readiness checklist and free capacity. Example data. Two other ready lines mean inference is involved: * `Ready; the inference provider is releasing memory for a job`: the provider is pausing for a job that is about to start. * `Ready; inference runs, and your choice (darkbloom-sandbox provider-hold) keeps new jobs away meanwhile`: your `never` or `when_idle` policy is holding jobs back while inference serves. ### Running `Running 1 job` Jobs are running and are paid for their time. `pause` stops new jobs; the running ones finish. ### Paused `Paused by you: no new jobs; resume with darkbloom-sandbox resume` `Paused by schedule until 07:00: no new jobs; change it with darkbloom-sandbox schedule` No new job starts, and no agent sandbox starts or resumes. Jobs already running finish and are paid. A pause by hand stays after restarts and updates. If a job is finishing, the line says how many. `darkbloom sandbox resume` takes work again; `darkbloom sandbox pause` stops it. For the schedule, use the add-on's `schedule` command as shown in [scheduling and pause](/provider/sandbox-setup#scheduling-and-pause). ### Updating `Installing an update once 1 job finishes` The agent stopped taking jobs and waits for the running ones to finish before it swaps the app. You do not need to enroll again. ### Stopped `The agent is not running: it starts at login, or run the installer again` The Mac is enrolled, but the agent is not running. Log in at the desktop. If the Mac is paused, the line says so. If the agent does not come back, run the installer again; it repairs the install without uninstalling. ### Error | What status says | What to do | | - | - | | `This Mac is not enrolled: run the installer again` or `This Mac has not proven itself with App Attest: run the installer again` | Run setup again. If the Mac hosted before, its code replaces the old host, and you confirm the replacement when you approve it. | | `This Mac's App Attest key stopped working (app_attest_key_unusable), so it gets no jobs` | Run the installer again, the same command as the first time. Do not uninstall: uninstalling downloads every image again. See [App Attest key stopped working](#app-attest-key-stopped-working). | | `Updating to the new version failed and the previous app could not be put back, so this Mac takes no jobs and installs nothing` | Follow the file moves the line gives, or run the installer again. The agent takes jobs again within 5 minutes, or after a restart if it restarted meanwhile. | | `The agent (pid …) reports no status; see …/agent/agent.log` | Read the log, or follow it with `darkbloom sandbox logs -f`. | | `The plane refused this Mac (…); see …/agent/agent.log` | Read the log. The plane no longer accepts this build or this host. Run setup again; if it stays refused, contact Darkbloom. | | `Not connected to the plane (…); it keeps trying` | Check the Mac's network and the outbound ports. If it stays that way, restart the agent: that ends the jobs and sandboxes it runs, and launchd starts it again. Logging out and back in does the same. | | `The inference provider at ~/.darkbloom/runtime/addon.sock cannot be held (…): this Mac takes no new jobs until it can, or until no provider runs there` | See [the inference provider cannot be held](#the-inference-provider-cannot-be-held). | | `Enrollment failed: …; run the installer again` | Run setup again for a new code. | ## App Attest key stopped working If `status` says this Mac's App Attest key stopped working, the Mac gets no jobs. This can happen after an unexpected restart. Run the installer again, the same command as the first time. Do not uninstall: uninstalling downloads every image again. The installer keeps the Mac's images, slots and storage and asks for a new code. That code replaces the Mac's old host, and the installer says which. Approve it with the same account as the first time, and confirm the replacement: on the approval page, tick **I am re-enrolling …**, then **Approve & replace**. Darkbloom refuses the code without that confirmation: `This enrollment code replaces an existing Mac and requires explicit confirmation`. When the new host connects, Darkbloom removes the old host, so the **Macs** page shows this Mac once. If the approval page refuses the code even so, stop the installer if it still waits, make the Mac forget its old host, then set it up again: ```sh theme={null} ~/DarkbloomSandbox/darkbloom-sandbox uninstall --forget ``` The new code then names no host, and the Mac enrolls as a new host. This downloads every image again. Remove the old host yourself with **Remove Mac** in the console. ## The inference provider cannot be held When an inference provider answers on its socket but the add-on cannot pause it, the Mac takes no new jobs until it can, or until no provider runs there. The line names the reason and the fix: | Reason | What to do | | - | - | | `identity rejected` | What answers there is not a Darkbloom provider this add-on trusts: update or reinstall the Darkbloom provider, update the add-on (it may not trust a newer provider yet), or stop what else listens there. | | `no hold capability` | The provider is too old to be held: update the Darkbloom provider. | | `unresponsive` | Restart the Darkbloom provider. | | `connection failed` | Check the file at that path (not a socket, or one this user may not open), or restart the Darkbloom provider. | | `protocol error` or `refused` | Update the Darkbloom provider. | Your own `provider-hold --policy never` is not an error. It keeps jobs away by itself, and `detail` says so. ## Free disk and waiting images Darkbloom keeps a floor of free space on every disk: a tenth of the disk, at least 50 GiB and at most 100 GiB (54 to 107 GB). No job starts, and no image downloads, if that could push free space below the floor. When an image does not fit above the floor and the slots' room, it waits while the other images come, so a Mac with a Linux image still takes Linux jobs. `status` names the image and the space to free. The JSON has `bytes_to_free` and the image's own `detail`. An image that waits counts the smaller images that wait before it too. If no image is installed at all, the line also offers to fit the slots to the space you have: running the installer again recomputes them. From add-on 1.3.7 the first line also says when a sandbox image waits: `low disk: free at least 12 GiB (13 GB) on this Mac's disk for macOS sandboxes` The Mac offers those sandboxes again once that much is free. Darkbloom sees the same number and may ask you to free it. `df -h ~` is what the plan counts as Avail. Finder can show more free space because it counts purgeable space, which macOS frees only when it needs to. Restart, or remove Time Machine local snapshots (`tmutil listlocalsnapshots /` lists them), to free it now. If free space falls below the floor while jobs run, the add-on stops the running jobs within about 10 seconds and deletes what they wrote. Darkbloom runs those jobs elsewhere. ## Work disks `status` shows each disk with its free space, its floor and its slots: `/Volumes/FastSSD: online, 1.6 TB free, 100 GiB stays free; Linux 2 (1 free), macOS 1 (1 free)` The internal disk's line says `this Mac's disk`. A disk that is not connected says so, and that its slots take no jobs until it is back. A disk that came back is checked before its slots take jobs again: * `/Volumes/FastSSD is not mounted: its 2 slots take no jobs until it is back` * `/Volumes/FastSSD is back: its slot takes jobs once its images are checked` Plug the disk back in, or run setup again with `--disk` if you want to change the disks. ## The build cache and workspaces `status` shows the build cache as a line such as `on, 3.2 GiB used of 32 GiB (~/DarkbloomSandbox/agent/state/storage)`. In `--json`, its `state` is `on`, `waiting_for_space` when less than 8 GiB is left for it, `unavailable` when its directory cannot be used, or `off` when it is turned off. Workspaces have their own allowance and line. If the cache is waiting, free the space the line names. If it is off, size it again with the installer, or turn it back on. Jobs and images always come first: the cache gives way at once, deleting its oldest entries. ## A Mac that never finished setup Setup finishes within a minute of your approval: the Mac proves itself with App Attest and connects. If it stops in between (the installer failed or was interrupted, the Mac went to sleep or restarted), the console's **Macs** page lists an entry that says **Setup didn't finish**, never seen, with a **Remove** button. Darkbloom issued it a credential, but it never proved itself or never connected, so it gets no jobs and earns nothing. For the first 15 minutes the entry says **Finishing setup** instead. * **Run setup again on that Mac**, the same command as the first time. It finishes the setup it started, or enrolls the Mac anew with a code to approve. In that case the code replaces the old entry when you confirm the replacement, and the new host replaces it once it connects (add-on releases after 1.3.8; earlier ones leave the old entry, which you remove). * **Remove the entry** with **Remove** on its row or its page. It leaves your Macs at once; nothing changes on the Mac. * **Or leave it.** Darkbloom may remove an entry whose Mac never proved itself once a week has passed since it enrolled and since the Mac last tried; its page then says when. A Mac that keeps trying, or that proved itself once, is never removed this way. ## Common messages | Message | What it means and what to do | | - | - | | `You're on the Darkbloom Sandbox waitlist: #N in line` | Setup stops because Darkbloom has not approved your account for Darkbloom Sandbox yet; nothing was installed. Run setup again once `darkbloom waitlist sandbox` says your account is approved. | | `Link this Mac to your Darkbloom account first` | The waitlist needs your account: run `darkbloom login`, then setup again. | | `Darkbloom revoked your account's access to Darkbloom Sandbox` | Joining again does not restore it; contact Darkbloom. | | `Could not reach the Darkbloom Sandbox waitlist at …` | Setup could not learn whether your account is approved, so it checked and installed nothing. Fix the reason it names, such as the Mac's connection, then run setup again. | | `Free up N GiB of disk for one Linux job` | No job fits in the free disk. Free the space it names, then run setup again. | | `no macOS jobs (limited by free disk space)`, while Finder shows more free | The plan counts what `df -h ~` shows as Avail. Restart, or remove Time Machine local snapshots, to free purgeable space now. The line `A macOS job needs about N GB more` says how much more a macOS job needs beside the planned Linux jobs. Then run setup again. | | `On the waitlist` | Darkbloom has not approved your account yet. From add-on 1.1.2 you can close the window: the Mac keeps waiting, also across restarts, and enrolls by itself once approved. `status` shows where it is. | | `[FAIL] Work disk: … ignores file ownership` | Ownership is off on the drive. Answer yes when setup offers to turn it on, or run `sudo diskutil enableOwnership /Volumes/…` yourself, then run setup again. | | `Work disk: … offline` | The drive is not connected, so its slots take no jobs. Connect it again; its slots take jobs once its images are checked. | | `[FAIL] Work disk: … is not APFS` or `is not a mounted drive` | Format the drive as APFS in Disk Utility, or connect it, then run setup again. | | `work disks need add-on 1.2.0 or later` | The add-on release on offer cannot use other drives yet. Run setup without `--disk`. | | `[WARN] Network`, `Power` or `Sleep` | These do not block setup, but a sleeping, unplugged or dropped Mac loses its running jobs, and lost jobs are not paid. Follow the `↳ fix:` line. | | `This Mac was not enrolled` | The code was denied or expired, or the waitlist request ended. Run setup again for a new code. | | `A job is running on this Mac` | The installer refuses to replace the add-on or change its slots while a job runs, and changes nothing. Run setup again when the job finishes; `pause` keeps new ones from starting. | | `This version of the add-on …` | The add-on predates the command. It updates itself, or `darkbloom sandbox setup` updates it now. | | `Sandboxes: installed; the add-on did not answer within 2s` | `darkbloom status` gave up waiting. `darkbloom sandbox status` waits longer, and `darkbloom sandbox logs` shows what the agent is doing. | ## Logs `darkbloom sandbox logs` shows the last 50 lines of the add-on's log; `-f` follows it, and `-n` sets how many lines. The log is `~/DarkbloomSandbox/agent/agent.log`. # Schedule when your Mac serves inference and sandbox jobs Source: https://docs.darkbloom.dev/provider/scheduling Set weekly availability windows for the inference provider, and pause or schedule Darkbloom Sandbox work. By default, the provider runs whenever it is started. Scheduling lets you define weekly windows when this Mac is available. Outside every window, a network provider stops taking requests and frees model memory; Darkbloom Sandbox stops starting new jobs and sandboxes. > [!NOTE] > > This schedule controls inference. A Mac hosting sandboxes has its own weekly schedule and pause; see [Scheduling and pause](/provider/sandbox-setup#scheduling-and-pause). ## Inference availability ### Configure with the CLI ```bash theme={null} darkbloom schedule # interactive weekly editor darkbloom schedule --show # print saved windows and time zone darkbloom schedule --disable # disable scheduling, keep the windows ``` The wizard offers the saved windows, "always available", an overnight preset (Monday to Friday, `22:00` to `08:00`), a full-weekend preset, or custom weekly windows. Days accept names, ranges such as `fri-mon`, and `weekdays`, `weekends` or `daily`. A window's day list identifies the day it **starts**. `darkbloom start --schedule` opens the same editor before starting. Saved edits do not change a running provider; use `darkbloom restart` for that. ### Configure in provider.toml Add a `[schedule]` section and one or more `[[schedule.windows]]` entries in `~/.config/darkbloom/provider.toml`: ```toml theme={null} [schedule] enabled = true [[schedule.windows]] days = ["mon", "tue", "wed", "thu", "fri"] start = "22:00" end = "08:00" ``` ```toml theme={null} [schedule] enabled = true [[schedule.windows]] days = ["mon", "tue", "wed", "thu", "fri"] start = "22:00" end = "08:00" [[schedule.windows]] days = ["sat", "sun"] start = "00:00" end = "00:00" ``` > [!NOTE] > > `start` is inclusive and `end` is exclusive, both in the Mac's local timezone. An `end` earlier than `start` crosses midnight. Equal `start` and `end` spans a full local-calendar day. Disable scheduling without deleting the windows: ```toml theme={null} [schedule] enabled = false ``` The provider reads the system clock and timezone, so a timezone change shifts when windows activate. DST transitions are handled against the saved local wall-clock times. ## Darkbloom Sandbox availability The Sandbox add-on has its own owner settings in `~/DarkbloomSandbox/agent/owner-settings.json`. Use the add-on CLI: ```bash theme={null} ~/DarkbloomSandbox/darkbloom-sandbox pause ~/DarkbloomSandbox/darkbloom-sandbox resume ``` `pause` stops new CI jobs and stops new or resumed agent sandboxes. Work already running finishes. The pause persists across restarts and updates, and the console shows the Mac as **Paused by owner**. For weekly hours: ```bash theme={null} ~/DarkbloomSandbox/darkbloom-sandbox schedule set 'mon-fri 22:00-07:00' 'weekends 00:00-24:00' ~/DarkbloomSandbox/darkbloom-sandbox schedule ~/DarkbloomSandbox/darkbloom-sandbox schedule off ``` An end before the start runs past midnight. Outside every window, no new job starts; a job still running when a window ends finishes. `status` and the console show **Paused by schedule until** the next window. `darkbloom sandbox pause` and `darkbloom sandbox resume` are the provider CLI equivalents of the add-on's `pause` and `resume`. ## macOS app The Darkbloom macOS app edits the same saved availability settings as the CLI. Changes made there apply to the configuration file and take effect on the next provider restart, like the CLI editor. # Quickstart: call the Darkbloom API in 5 minutes Source: https://docs.darkbloom.dev/quickstart-consumer Get an API key, send your first chat completion, and list available models using any OpenAI-compatible SDK. Works with Python, Node.js, and curl. Darkbloom exposes an OpenAI-compatible API at `https://api.darkbloom.dev/v1`. If you have used the OpenAI SDK before, the main changes are the base URL and your API key. This guide gets you a key, makes your first request, and shows how to discover the current model catalog. Have an Apple silicon Mac? You can also [run models on your own Mac](/inference/run-on-your-own-mac) with a local OpenAI-compatible API, and pass only the requests it can't take to the network. **1. Get an API key** Sign in at [console.darkbloom.dev](https://console.darkbloom.dev) with your email address, open the API console page (`/api-console`), and create a key. The secret starts with `sk-db-` and is shown only once. ```bash theme={null} export DARKBLOOM_API_KEY="sk-db-..." ``` > [!WARNING] > > Store your API key somewhere safe. You cannot view it again after closing the creation dialog; rotate it if you lose it. **2. Find a model** `GET /v1/models` is the authoritative catalog. It lists each model's ID, context limits, modalities and prices. ```bash theme={null} curl -s https://api.darkbloom.dev/v1/models \ -H "Authorization: Bearer $DARKBLOOM_API_KEY" | jq '.data[] | {id, context_length, input_modalities}' ``` Pick one ID and export it: ```bash theme={null} export MODEL="" ``` A model that is listed but has no `routable_providers` is temporarily at capacity. Requests queue or return `429` with `Retry-After`; it is not a missing model. **3. Send your first chat completion** ```python Python theme={null} import os from openai import OpenAI client = OpenAI( base_url="https://api.darkbloom.dev/v1", api_key=os.environ["DARKBLOOM_API_KEY"], ) response = client.chat.completions.create( model=os.environ["MODEL"], messages=[ {"role": "user", "content": "Explain the difference between a mutex and a semaphore."} ], ) print(response.choices[0].message.content) ``` ```javascript Node.js theme={null} import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.darkbloom.dev/v1", apiKey: process.env.DARKBLOOM_API_KEY, }); const response = await client.chat.completions.create({ model: process.env.MODEL, messages: [ { role: "user", content: "Explain the difference between a mutex and a semaphore." } ], }); console.log(response.choices[0].message.content); ``` ```bash curl theme={null} curl https://api.darkbloom.dev/v1/chat/completions \ -H "Authorization: Bearer $DARKBLOOM_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "'"$MODEL"'", "messages": [ {"role": "user", "content": "Explain the difference between a mutex and a semaphore."} ] }' ``` **4. Stream a response** Add `stream=True` (Python) or `stream: true` (Node.js) to receive tokens as they are generated instead of waiting for the full response. ```python Python theme={null} stream = client.chat.completions.create( model=os.environ["MODEL"], messages=[ {"role": "user", "content": "Write a haiku about distributed systems."} ], stream=True, ) for chunk in stream: delta = chunk.choices[0].delta.content if delta: print(delta, end="", flush=True) ``` ```javascript Node.js theme={null} const stream = await client.chat.completions.create({ model: process.env.MODEL, messages: [ { role: "user", content: "Write a haiku about distributed systems." } ], stream: true, }); for await (const chunk of stream) { const delta = chunk.choices[0]?.delta?.content; if (delta) process.stdout.write(delta); } ``` ```bash curl theme={null} curl -N https://api.darkbloom.dev/v1/chat/completions \ -H "Authorization: Bearer $DARKBLOOM_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "'"$MODEL"'", "messages": [ {"role": "user", "content": "Write a haiku about distributed systems."} ], "stream": true }' ``` The streaming response uses server-sent events. Each event is a `data:` field carrying a JSON chunk, and the stream ends with `data: [DONE]`. There may be no output until a provider has produced the first content; a real error status can still arrive in that window. ## Use the Responses API `POST /v1/responses` is registered on the same handler as chat completions. Send an `input` field instead of `messages`: ```bash theme={null} curl https://api.darkbloom.dev/v1/responses \ -H "Authorization: Bearer $DARKBLOOM_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "'"$MODEL"'", "input": "Say hello in one sentence." }' ``` ## Use the Anthropic Messages API Darkbloom also serves `POST /v1/messages`. The coordinator reads credentials only from `Authorization: Bearer`, and the Anthropic SDK's `api_key` option sends `x-api-key` instead, so pass the key as `auth_token`: ```python theme={null} import os import anthropic client = anthropic.Anthropic( base_url="https://api.darkbloom.dev", auth_token=os.environ["DARKBLOOM_API_KEY"], ) message = client.messages.create( model=os.environ["MODEL"], max_tokens=512, messages=[ {"role": "user", "content": "What is the capital of France?"} ], ) print(message.content[0].text) ``` ## Handle errors * `401 authentication_error` — missing or invalid bearer token. * `402` — the balance cannot cover the request's worst-case reservation, or a key spend cap is exhausted. * `403 model_not_allowed` — the key's `allowed_models` list excludes the model. * `404 model_not_found` — the ID is not in `GET /v1/models`. * `429 rate_limit_exceeded` — wait for `Retry-After`. * `503 model_unavailable` — no provider can serve the model right now. > [!NOTE] > > Darkbloom is an experimental research prototype. Do not use it in production applications. # Quickstart: become a Darkbloom provider Source: https://docs.darkbloom.dev/quickstart-provider Turn idle capacity on an Apple Silicon Mac into inference and Darkbloom Sandbox income. Install the agent, choose how it serves, link your account, and start in about 10 minutes. If you have an Apple Silicon Mac sitting idle for part of the day, Darkbloom can route inference requests to it and run approved CI jobs in isolated VMs. This guide covers installation, account linking, model selection and the commands you use to check the provider. **1. Check your hardware** > [card] Chip > > Apple Silicon M1 or later > [card] macOS > > macOS 27 or later for a new network provider > [card] Memory > > Enough unified memory for the model you choose > [card] Network > > Outbound HTTPS only Confirm the chip and memory: ```bash theme={null} system_profiler SPHardwareDataType | grep "Chip\|Memory:" ``` Darkbloom Sandbox has additional disk and slot requirements; the add-on's `--plan` shows what this Mac would get before installing anything. **2. Install the provider** ```bash theme={null} curl -fsSL https://api.darkbloom.dev/install.sh | bash exec $SHELL -l ``` The installer verifies the release hashes and code signature, installs `Darkbloom.app`, creates the Secure Enclave identity and links the CLI onto your `PATH`. No `sudo` is needed. > [!TIP] > > The same Mac can host Darkbloom CI jobs and agent sandboxes. See [Host CI jobs and sandboxes](/provider/sandbox-hosting). **3. Choose how the Mac serves** ```bash theme={null} darkbloom start ``` A first start asks whether this Mac should serve **Only me**, the **Darkbloom network**, or **Both, me first**. The choice is saved. `--local`, `--network` and `--me-first` set it non-interactively. `darkbloom --opencode` (or `--hermes`) is a shortcut that also configures that tool against the local API. **4. Link your account** ```bash theme={null} darkbloom login darkbloom restart ``` `darkbloom login` runs a device-code flow: open the printed URL, sign in, and approve the code. Earnings are credited to that account. If you do not link, a network provider can still run but cannot be paid. **5. Pick a model** ```bash theme={null} darkbloom models catalog darkbloom models list darkbloom models download ``` `catalog` lists the current network models and their requirements; `list` shows what is downloaded and whether it fits. The first download can take several minutes. **6. Check the provider** ```bash theme={null} darkbloom status darkbloom doctor darkbloom logs --last 1h ``` `status` shows how the Mac serves, the live daemon state and the coordinator's last trust message. `doctor` runs the full diagnostic, including the account link and, on macOS 27, the App Attest section. ## Manage the provider ```bash theme={null} darkbloom start # start and enable at login darkbloom stop # drain and stop darkbloom restart # drain and start again darkbloom status # configuration and live state darkbloom update # check for and install a signed release ``` There is no `darkbloom earnings` command. View completed earnings, usage and Stripe status in the console at [console.darkbloom.dev](https://console.darkbloom.dev). ## Schedule availability Use the weekly editor: ```bash theme={null} darkbloom schedule ``` Or edit `~/.config/darkbloom/provider.toml` directly. See [Scheduling](/provider/scheduling). ## Host Darkbloom Sandbox jobs The same Mac can run approved GitHub Actions CI jobs in Linux and macOS VMs: ```bash theme={null} darkbloom sandbox setup darkbloom sandbox status darkbloom sandbox pause darkbloom sandbox resume darkbloom sandbox logs -f darkbloom sandbox uninstall ``` `darkbloom sandbox setup` requires an account approved for Darkbloom Sandbox. It prints the plan for this Mac, asks before installing, and puts the add-on in `~/DarkbloomSandbox`. Inference pauses while a job runs. ## macOS app A separate Darkbloom desktop app gives you a menu bar view of status, models and earnings. It manages the same `~/.darkbloom` installation and reads the same configuration as the CLI. > [!NOTE] > > Darkbloom is an experimental research prototype. Provider software may change between releases. Run `darkbloom update` regularly. # API key management — /v1/keys and /v1/auth/keys Source: https://docs.darkbloom.dev/reference/api-keys Create, inspect, rotate and revoke Darkbloom API keys. Management requires a Privy session; API keys cannot manage other keys. Darkbloom API keys are created and managed through `/v1/keys`. The older `/v1/auth/keys` endpoints still work for one key per account. Both families require a Privy session JWT; an API key used on a management route returns `403 forbidden`. > [!WARNING] > > API key creation requires browser-based Privy authentication. You cannot use an existing API key to mint or revoke other keys. This prevents a leaked key from creating new long-lived credentials. ## Create a key The recommended path is the console at [console.darkbloom.dev](https://console.darkbloom.dev), on the API console page (`/api-console`). ### POST /v1/keys ```bash theme={null} curl -X POST https://api.darkbloom.dev/v1/keys \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"name": "ci", "limit_usd": 25, "limit_reset": "monthly", "rpm_limit": 60}' ``` The response is `{key, data}`: `key` is the plaintext secret, shown once. New secrets start with `sk-db-`. Optional settings: * `name` — display name. * `limit_usd` and `limit_reset` (`none`, `daily`, `weekly`, `monthly`) — spend cap. * `rpm_limit`, `itpm_limit`, `otpm_limit` — request and token limits. * `allowed_models` — the only model IDs this key may use. * `expires_at` — expiry time. * `self_route_only` — restrict the key to the account's own machines. * `disabled` — turn the key off without deleting it. ### POST /v1/auth/keys The older mint takes no required body and returns `{api_key, account_id}`. It creates one key for the account. ## Inspect and change a key | Action | Call | | - | - | | List | `GET /v1/keys` → `{object: "list", data: [...]}` | | Inspect one | `GET /v1/keys/{id}` | | Inspect the calling key | `GET /v1/key` (accepts the API key itself) | | Change settings | `PATCH /v1/keys/{id}` with any subset of the settings above | | Rotate the secret | `POST /v1/keys/{id}/rotate` → new `key` | | Revoke | `DELETE /v1/keys/{id}` | `GET /v1/keys` shows `usage_usd`, `limit_usd` and `remaining_usd` per key. A key's `label` masks the secret to its prefix, first four and last four characters. ## Revoke a key with the older endpoint ### DELETE /v1/auth/keys **key** `string` *required* The API key to revoke, e.g. `"sk-db-..."`. The response is `{status: "revoked"}`. A revoked key stops authenticating after the coordinator's API-key cache refreshes; in-flight requests that already passed authentication can finish. ## Errors **403 forbidden** `error` An API key was used on a management route. Use the Privy session JWT. **400 bad_request** `error` The revoke body does not contain a `key` string. # Provider attestation — GET /v1/providers/attestation Source: https://docs.darkbloom.dev/reference/attestation Public attestation data for connected providers: each provider's App Attest authorization, verification states, security posture, hardware class and Secure Enclave public key. No authentication required. `GET /v1/providers/attestation` returns the coordinator's verification snapshot for every provider currently connected to the public network. No authentication is required. The data is intentionally public so that any third party can check the security posture of the providers serving inference requests. The response is diagnostic. It reports the coordinator's verdict at the snapshot time; it is not a reusable serving credential and does not publish raw Apple certificates or receipts. Darkbloom verifies provider Macs with Apple App Attest only, on macOS 27 or later. Darkbloom no longer uses MDM, and Apple Managed Device Attestation (MDA) is historical. The `mdm_verified`, `mda_*` and `acme_verified` fields remain on the wire so older clients keep parsing the response, but they grant nothing: they are `true` only for a legacy connection that still holds the retired `hardware` trust level, which no current provider does. ## Authentication Not required. Private-only connections are excluded from the shared cache; their owners can still see them through authenticated `GET /v1/me/providers`. ## Response **providers** `object[]` Array of attestation records, one per connected public provider. **provider fields** **provider_id** `string` Opaque connection ID, also returned per response as `X-Provider-Id`. **app_attest_authorized** `boolean` Whether the coordinator currently authorizes this connection with Apple App Attest: Apple attested the provider app's key on this Mac, and the coordinator verified a fresh assertion from it for an approved provider build. Only App Attest-authorized providers serve public requests. **authorization_expires_at** `integer` Unix seconds at which the current App Attest authorization ends unless it is renewed. Present when `app_attest_authorized` is `true`. Not a reusable serving credential. **verification** `object` When the coordinator last observed this provider, and the state of each verification path: `app_attest` (`state`, and `verified_at` / `expires_at` when verified) and the historical `legacy` path. A `state` is `verified`, `pending`, `expired`, `revoked`, `unsupported` or `offline`. **trust_level** `string` The provider's legacy trust level. * `"self_signed"` — Secure Enclave signature and periodic challenge-response verified. App Attest-authorized providers report this level; serving depends on `app_attest_authorized`, not on this field. * `"hardware"` — historical: the level Darkbloom MDM used to grant. No current provider gets it. * `"none"` — no legacy trust grant. The provider may still be authorized through App Attest. **status** `string` Connection status: `online`, `offline`, `untrusted`, and so on. **chip_name** `string` Apple Silicon chip name as reported by the provider. **hardware_model** `string` Mac hardware model identifier, e.g. `"Mac14,6"`. **memory_gb** `integer` Unified memory in GB. **gpu_cores** `integer` GPU core count. **models** `string[]` Model IDs the provider is serving. **secure_enclave** `boolean` Whether the legacy Secure Enclave attestation reported a Secure Enclave. **sip_enabled** `boolean` Whether System Integrity Protection is enabled, as signed by the provider. A valid signature binds the reported value; it does not independently certify current App Attest authorization. **secure_boot_enabled** `boolean` Whether Secure Boot is enabled, as signed by the provider. **authenticated_root_enabled** `boolean` Whether Authenticated Root (sealed system volume) is enabled, as signed by the provider. **system_volume_hash** `string` Hash of the sealed system volume reported by the provider. **se_public_key** `string` The provider's persistent legacy Secure Enclave P-256 public key (base64). It permits linking public sessions and is not the App Attest credential. Use it to verify the provider-generated `se_signature` and `response_hash` body fields. **mdm_verified** `boolean` Historical. `true` only for a legacy connection that holds the retired `hardware` trust level; no current provider does, so it is `false`. Darkbloom no longer uses MDM, and this grants nothing. **acme_verified** `boolean` Historical: the retired ACME device-attest-01 check. Always `false`; kept on the wire for shipped decoders, and it grants nothing. **mda_verified** `boolean` Historical: Apple Managed Device Attestation, which came only through Darkbloom MDM. `true` only for a legacy `hardware`-trust connection; it grants nothing. **mda_os_version** `string` Historical, from Managed Device Attestation; no longer updated. **mda_sepos_version** `string` Historical, from Managed Device Attestation; no longer updated. The response deliberately omits the hardware serial number, UDID, APNs device token, the raw Apple MDA certificate chain and the `code_attested` flag. The MDA leaf embeds serial and UDID in signed OIDs, so publishing the chain would disclose them even with the JSON fields removed. ## What the trust levels mean `trust_level` describes legacy attestation evidence, not the serving decision. Read `app_attest_authorized` and `verification` for that. | `trust_level` | Meaning | | - | - | | `self_signed` | The legacy registration signature verified without a current hardware-trust grant. App Attest-authorized providers report this level. The label alone does not prove current challenge freshness or serving authorization. | | `hardware` | Historical: Apple's MDM subsystem confirmed SIP and full Secure Boot, in agreement with the provider's Secure-Enclave-signed attestation. Darkbloom no longer uses MDM, and no current provider gets this level. | | `none` | No legacy trust grant. The provider may still be authorized through App Attest, or it may be untrusted or offline; `verification` says which. | Public routing requires a current qualified App Attest lease, followed by shared liveness, runtime, encryption and model checks. A served response does not by itself establish MDM or MDA verification. ## Per-response signals The coordinator writes these headers once a provider is committed to a request: | Header | Value | | - | - | | `X-Provider-Id` | Connection ID; join with the endpoint above | | `X-Provider-Authorization-Method` | `app_attest`, `legacy`, `dual` or `none` | | `X-Provider-Verification` | Compact JSON with `observed_at` and the method states, frozen at final dispatch | | `X-Provider-Trust-Level` | `none`, `self_signed` or `hardware` (legacy evidence; `hardware` is historical) | | `X-Provider-Attested` | `true` or `false` | | `X-Provider-Encrypted` | `true` when the provider has a registered X25519 key | | `X-Provider-Secure-Enclave` | `true` or `false` | | `X-Provider-Mda-Verified` | Historical; present only for a legacy connection that still carries MDA evidence, and it grants nothing | | `X-Provider-Chip`, `X-Provider-Model` | Hardware class | | `X-Attestation-Se-Public-Key` | The provider's Secure Enclave P-256 public key (base64) | | `X-Eigen-Sealed`, `X-Eigen-Sealed-Kid` | Present when you sealed the request | These are coordinator assertions over TLS, not Apple-signed response receipts. Optional `se_signature` and `response_hash` fields in a successful body are provider-generated; they are not headers and are not present on every response. Pin a provider identity by comparing `X-Attestation-Se-Public-Key` with `se_public_key` across requests. ## Example ```bash cURL theme={null} curl https://api.darkbloom.dev/v1/providers/attestation ``` ```json theme={null} { "providers": [ { "provider_id": "prov_a1b2c3d4", "app_attest_authorized": true, "authorization_expires_at": 1794790640, "verification": { "observed_at": 1794790357, "app_attest": { "state": "verified", "verified_at": 1794790001, "expires_at": 1794790640 }, "legacy": { "state": "pending" } }, "trust_level": "self_signed", "status": "online", "chip_name": "Apple M3 Max", "hardware_model": "Mac15,9", "memory_gb": 128, "gpu_cores": 40, "models": ["mlx-community/gemma-4-26b-a4b-it-8bit"], "secure_enclave": true, "sip_enabled": true, "secure_boot_enabled": true, "authenticated_root_enabled": true, "system_volume_hash": "3f1c...hex...", "se_public_key": "BHv9k2...base64...", "mdm_verified": false, "acme_verified": false, "mda_verified": false } ] } ``` # Account balance — GET /v1/payments/balance Source: https://docs.darkbloom.dev/reference/balance GET /v1/payments/balance — returns your current account balance. Returns balance_micro_usd, balance_usd, withdrawable_micro_usd, and withdrawable_usd. The balance endpoint returns your current account balance in both micro-USD (integer) and USD (string). Balances are credited when you deposit via the Darkbloom console and debited after each inference request completes. `balance_micro_usd` is the canonical value — all internal billing uses micro-USD to avoid floating-point rounding errors. The `balance_usd` string is a human-readable convenience field formatted to six decimal places. `withdrawable_micro_usd` reflects funds that can be withdrawn: provider earnings (inference and sandbox) and referral rewards. Deposits and invite credits are spendable but not withdrawable. ## Authentication This endpoint requires a Bearer token: ``` Authorization: Bearer sk-db-... ``` ## Response **balance_micro_usd** `integer` Your current balance in micro-USD (1 USD = 1,000,000 micro-USD). Use this value for precise balance comparisons and cost calculations. **balance_usd** `string` Your current balance as a USD string formatted to six decimal places, e.g. `"1.250000"`. **withdrawable_micro_usd** `integer` The portion of your balance available for withdrawal, in micro-USD. For consumer accounts this is typically `0`. **withdrawable_usd** `string` Withdrawable balance as a USD string formatted to six decimal places. ## Example ```bash cURL theme={null} curl https://api.darkbloom.dev/v1/payments/balance \ -H "Authorization: Bearer sk-db-..." ``` ### Example response ```json theme={null} { "balance_micro_usd": 4750000, "balance_usd": "4.750000", "withdrawable_micro_usd": 0, "withdrawable_usd": "0.000000" } ``` # Chat completions — POST /v1/chat/completions Source: https://docs.darkbloom.dev/reference/chat-completions POST /v1/chat/completions — generates replies from a message history. Accepts model, messages, stream, temperature. Returns a chat completion or SSE stream. The chat completions endpoint is the primary way to run inference on Darkbloom. It is fully compatible with the OpenAI Chat Completions API, so any OpenAI SDK works by setting the base URL to `https://api.darkbloom.dev/v1`. The coordinator routes your request to a hardware-attested Apple Silicon provider, encrypts the request body with the provider's X25519 key before forwarding it, and returns the response through the standard OpenAI response shape. Every response includes provider attestation headers so you can independently verify the hardware that served your request. `POST /v1/responses` is an alias for the [OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses). The coordinator auto-detects whether the body uses `input` (Responses format) or `messages` (Chat Completions format) and routes through the same handler. ## Authentication All inference endpoints require a Bearer token. Pass your API key in the `Authorization` header: ``` Authorization: Bearer sk-db-... ``` Get your API key from the [Darkbloom console](https://console.darkbloom.dev). ## Request **model** `string` *required* The model ID to use for this request. See [Models](/reference/models) for the list of available model IDs. Example: `"gemma-4-26b"` **messages** `object[]` *required* The conversation history as an array of message objects. Each object must have a `role` and a `content` field. * `role` — `"system"`, `"user"`, or `"assistant"` * `content` — the message text (string) **stream** `boolean` (default: false) When `true`, the response is delivered as a stream of Server-Sent Events (SSE). Each event carries a `data:` field with a JSON chunk. The stream ends with `data: [DONE]`. **max_tokens** `integer` Maximum number of tokens to generate. If you omit it, the coordinator uses the model's `max_output_length`, cut to what the prompt leaves of `context_length`. The worst-case cost of this bound is reserved before dispatch. **temperature** `number` Sampling temperature between 0 and 2. Higher values make output more random; lower values make it more deterministic. **top\_p** `number` Nucleus sampling parameter. The model considers only the tokens comprising the top `top_p` probability mass. **stop** `string | string[]` One or more sequences at which generation stops. The stop sequence itself is not included in the output. **seed** `integer` Fixed random seed for reproducible outputs. Two requests with the same seed and parameters will produce identical results when served by the same provider. ## Response (non-streaming) **id** `string` Unique identifier for the request. **object** `string` Always `"chat.completion"` for non-streaming responses. **choices** `object[]` Array of completion choices. Standard requests return exactly one choice. **choice fields** **choices\[].message** `object` The generated message. **message fields** **choices\[].message.role** `string` Always `"assistant"`. **choices\[].message.content** `string` The generated text. **choices\[].finish_reason** `string` Why generation stopped. `"stop"` means the model reached a natural end; `"length"` means `max_tokens` was reached. **usage** `object` Token counts for the request. **usage fields** **usage.prompt_tokens** `integer` Tokens consumed by the input messages. **usage.completion_tokens** `integer` Tokens generated in the response. **usage.total_tokens** `integer` Sum of prompt and completion tokens. ## Streaming When `stream: true`, the response is a sequence of SSE events: ``` data: {"id":"...","object":"chat.completion.chunk","choices":[{"delta":{"content":"Hello"},"finish_reason":null}]} data: {"id":"...","object":"chat.completion.chunk","choices":[{"delta":{"content":" world"},"finish_reason":null}]} data: [DONE] ``` A successful body may carry optional provider-generated `se_signature` and `response_hash` fields over the response hash. They are not headers and are not present on every response. ```json theme={null} {"choices":[],"se_signature":"","response_hash":""} ``` ## Response headers Every response (streaming and non-streaming) includes attestation headers that describe the provider that served the request. | Header | Description | | - | - | | `X-Provider-Id` | Connection ID; join with `GET /v1/providers/attestation` | | `X-Provider-Authorization-Method` | `app_attest`, `legacy`, `dual` or `none` | | `X-Provider-Verification` | Compact JSON with the frozen verification snapshot | | `X-Provider-Trust-Level` | `none`, `self_signed` or `hardware` (legacy evidence; `hardware` is historical) | | `X-Provider-Attested` | `"true"` or `"false"` | | `X-Provider-Encrypted` | `"true"` when the provider has a registered X25519 key | | `X-Provider-Secure-Enclave` | `"true"` or `"false"` | | `X-Provider-Mda-Verified` | Historical: present only for a legacy connection that still carries Managed Device Attestation evidence. It grants nothing, and no current provider has it | | `X-Provider-Chip` | Apple Silicon chip name, e.g. `"Apple M3 Max"` | | `X-Provider-Model` | Mac hardware model identifier | | `X-Attestation-Se-Public-Key` | Provider's Secure Enclave P-256 public key (base64) | | `X-Inference-Job-ID` | Job ID for this request (streaming only) | These are the coordinator's assertions over TLS, not a provider-signed receipt. There is no public serial-number header. Optional `se_signature` and `response_hash` fields may appear in a successful body; they are provider-generated. ## Examples ```bash cURL (non-streaming) theme={null} curl https://api.darkbloom.dev/v1/chat/completions \ -H "Authorization: Bearer sk-db-..." \ -H "Content-Type: application/json" \ -d '{ "model": "gemma-4-26b", "messages": [ {"role": "user", "content": "Explain what a Merkle tree is."} ], "max_tokens": 512 }' ``` ```bash cURL (streaming) theme={null} curl https://api.darkbloom.dev/v1/chat/completions \ -H "Authorization: Bearer sk-db-..." \ -H "Content-Type: application/json" \ -d '{ "model": "gemma-4-26b", "messages": [ {"role": "user", "content": "Explain what a Merkle tree is."} ], "stream": true }' ``` ```python Python (OpenAI SDK) theme={null} from openai import OpenAI client = OpenAI( base_url="https://api.darkbloom.dev/v1", api_key="sk-db-..." ) response = client.chat.completions.create( model="gemma-4-26b", messages=[ {"role": "user", "content": "Explain what a Merkle tree is."} ], max_tokens=512, ) print(response.choices[0].message.content) ``` ```python Python (streaming) theme={null} from openai import OpenAI client = OpenAI( base_url="https://api.darkbloom.dev/v1", api_key="sk-db-..." ) stream = client.chat.completions.create( model="gemma-4-26b", messages=[ {"role": "user", "content": "Explain what a Merkle tree is."} ], stream=True, ) for chunk in stream: if chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="", flush=True) ``` ```javascript Node.js (OpenAI SDK) theme={null} import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.darkbloom.dev/v1", apiKey: "sk-db-...", }); const response = await client.chat.completions.create({ model: "gemma-4-26b", messages: [ { role: "user", content: "Explain what a Merkle tree is." }, ], max_tokens: 512, }); console.log(response.choices[0].message.content); ``` ```javascript Node.js (streaming) theme={null} import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.darkbloom.dev/v1", apiKey: "sk-db-...", }); const stream = await client.chat.completions.create({ model: "gemma-4-26b", messages: [ { role: "user", content: "Explain what a Merkle tree is." }, ], stream: true, }); for await (const chunk of stream) { process.stdout.write(chunk.choices[0]?.delta?.content ?? ""); } ``` ### Example response ```json theme={null} { "id": "a3f1c2e7-84bb-4d9a-91f3-2b7e6d4a0c18", "object": "chat.completion", "choices": [ { "message": { "role": "assistant", "content": "A Merkle tree is a hash-based data structure where every leaf node contains the hash of a data block, and every non-leaf node contains the hash of its child nodes..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 14, "completion_tokens": 87, "total_tokens": 101 } } ``` # Text completions — POST /v1/completions Source: https://docs.darkbloom.dev/reference/completions POST /v1/completions — legacy text completion endpoint. Accepts model, prompt, max_tokens, temperature, and stream. Returns a completion object or SSE stream. The text completions endpoint is a legacy OpenAI-compatible endpoint that generates a continuation of a raw text prompt rather than a structured message history. It is routed through the same provider dispatch pipeline as [chat completions](/reference/chat-completions), so the same attestation headers and streaming format apply. For most use cases, prefer [POST /v1/chat/completions](/reference/chat-completions), which is the actively developed endpoint with full tool-call and response-format support. ## Authentication All inference endpoints require a Bearer token: ``` Authorization: Bearer sk-db-... ``` ## Request **model** `string` *required* The model ID to use. See [Models](/reference/models) for the list of available IDs. **prompt** `string` *required* The input text to complete. **max_tokens** `integer` Maximum number of tokens to generate. If you omit it, the coordinator uses the model's `max_output_length`, cut to what the prompt leaves of `context_length`. **temperature** `number` Sampling temperature between 0 and 2. **stream** `boolean` (default: false) When `true`, returns the response as SSE chunks ending with `data: [DONE]`. ## Example ```bash cURL theme={null} curl https://api.darkbloom.dev/v1/completions \ -H "Authorization: Bearer sk-db-..." \ -H "Content-Type: application/json" \ -d '{ "model": "gemma-4-26b", "prompt": "The capital of France is", "max_tokens": 16 }' ``` # Anthropic Messages API — POST /v1/messages Source: https://docs.darkbloom.dev/reference/messages POST /v1/messages — Anthropic-compatible endpoint. Accepts model, messages, max_tokens, and system. Returns an Anthropic-format content array response. The messages endpoint implements the Anthropic Messages API format, letting you use the official Anthropic SDK with Darkbloom by pointing it at `https://api.darkbloom.dev`. The request and response shapes follow the Anthropic API specification; the coordinator routes the request through the same provider dispatch and attestation pipeline as all other inference endpoints. ## Authentication All inference endpoints require a Bearer token: ``` Authorization: Bearer sk-db-... ``` When using the Anthropic SDK, set `base_url="https://api.darkbloom.dev"` and pass your Darkbloom API key as `auth_token`. The SDK's `api_key` option sends `x-api-key`, which the coordinator ignores. ## Request **model** `string` *required* The model ID to use. See [Models](/reference/models) for the list of available IDs. **messages** `object[]` *required* The conversation as an array of message objects. Each object must have: * `role` — `"user"` or `"assistant"` * `content` — the message text (string) **max_tokens** `integer` *required* Maximum number of tokens to generate. Required in Anthropic format. **system** `string` An optional system prompt that sets context or persona for the assistant. ## Response The response follows the Anthropic response shape with a `content` array. **id** `string` Unique identifier for the request. **type** `string` Always `"message"`. **role** `string` Always `"assistant"`. **content** `object[]` Array of content blocks. Text responses contain a single block with `type: "text"`. **content block fields** **content\[].type** `string` Content block type. `"text"` for standard responses. **content\[].text** `string` The generated text (present when `type` is `"text"`). **stop_reason** `string` Why generation stopped. `"end_turn"` for natural completion; `"max_tokens"` if the token limit was reached. **usage** `object` **usage fields** **usage.input_tokens** `integer` Tokens consumed by the input. **usage.output_tokens** `integer` Tokens generated in the response. ## Examples ```python Python (Anthropic SDK) theme={null} import anthropic client = anthropic.Anthropic( base_url="https://api.darkbloom.dev", auth_token="sk-db-...", ) message = client.messages.create( model="gemma-4-26b", max_tokens=512, system="You are a helpful assistant.", messages=[ {"role": "user", "content": "What is the difference between a process and a thread?"} ], ) print(message.content[0].text) ``` ```bash cURL theme={null} curl https://api.darkbloom.dev/v1/messages \ -H "Authorization: Bearer sk-db-..." \ -H "Content-Type: application/json" \ -d '{ "model": "gemma-4-26b", "max_tokens": 512, "system": "You are a helpful assistant.", "messages": [ {"role": "user", "content": "What is the difference between a process and a thread?"} ] }' ``` ### Example response ```json theme={null} { "id": "msg_01XFDUDYJgAACTvhG8fDDBEc", "type": "message", "role": "assistant", "content": [ { "type": "text", "text": "A process is an independent program with its own memory space..." } ], "stop_reason": "end_turn", "usage": { "input_tokens": 22, "output_tokens": 94 } } ``` # Available models — GET /v1/models Source: https://docs.darkbloom.dev/reference/models GET /v1/models returns the listed models with context limits, pricing, capabilities, provider counts and trust metadata. `GET /v1/models` returns the models listed on the Darkbloom network. The catalog is database-driven and aliases are maintained by the coordinator, so the endpoint is the authoritative list; this page does not reproduce a fixed set of IDs. Use it to discover valid `model` values and to check live availability before sending a request. ## Authentication ```bash theme={null} curl https://api.darkbloom.dev/v1/models \ -H "Authorization: Bearer sk-db-..." ``` ## Response **object** `string` Always `"list"`. **data** `object[]` Array of model objects. **model fields** **id** `string` The model ID to pass in inference requests. An alias ID, or a build ID for an un-aliased build. **object** `string` Always `"model"`. **created** `number` Registry entry creation time in Unix seconds; 0 when no registry record exists. **owned_by** `string` Always `"eigeninference"`. **name** `string` Display name. **hugging_face_id** `string` Upstream weights identifier, when known. **description** `string` Registry description. **input_modalities** `string[]` `["text"]`, plus `image`, `audio` or `video` when the build supports them. **output_modalities** `string[]` `["text"]`, or `["embedding"]`. **quantization** `string` Quantization of a concrete build. Omitted on alias entries. **context_length** `number` Maximum prompt plus completion context. **max_output_length** `number` The `max_tokens` a request gets when it names none. **pricing** `object` USD per unit as decimal strings: `prompt`, `completion`, `image`, `request`, `input_cache_read`. **supported_sampling_parameters** `string[]` Sampling fields the model accepts. **supported_features** `string[]` `tools`, `json_mode`, `structured_outputs`, `logprobs`, `web_search` or `reasoning`; omitted when none. **deprecation_date** `string` Optional registry deprecation date. **metadata** `object` `model_type`, `quantization`, `provider_count`, `attested_providers`, `trust_level`, `attestation`, `display_name`, `routable_providers`, `warm_providers`, `can_accept`. ## Example ```bash cURL theme={null} curl https://api.darkbloom.dev/v1/models \ -H "Authorization: Bearer sk-db-..." ``` ### Example response ```json theme={null} { "object": "list", "data": [ { "id": "your-model-id", "object": "model", "created": 1760000000, "owned_by": "eigeninference", "name": "Example model", "input_modalities": ["text"], "output_modalities": ["text"], "context_length": 262144, "max_output_length": 32768, "pricing": { "prompt": "0.0000001", "completion": "0.0000002", "input_cache_read": "0.00000005" }, "supported_features": ["tools", "reasoning"], "metadata": { "model_type": "text", "provider_count": 3, "attested_providers": 2, "trust_level": "hardware", "routable_providers": 2, "warm_providers": 1, "can_accept": true, "display_name": "Example model" } } ] } ``` The numbers above are illustrative; use the values the endpoint returns. ## Live fields * `provider_count` and `attested_providers` describe the providers advertising the build. * `routable_providers` and `warm_providers` come from the live capacity snapshot. * `can_accept` says whether at least one provider can take a request now. Zero `routable_providers` is a capacity shortfall: requests queue or end in `429 rate_limit_exceeded` with `Retry-After`, not `503 model_unavailable`. `GET /v1/models/capacity` exposes the same live counts without authentication. ## Retrieve one model `GET /v1/models/{id}` returns one entry for a listed ID, a hidden build ID or an alias. An unknown ID returns `404 model_not_found` with `param: "model"`. # Network stats — /v1/stats, /v1/leaderboard Source: https://docs.darkbloom.dev/reference/stats Public endpoints for Darkbloom network statistics. No auth required. Returns active providers, token totals, leaderboard rankings, and network-wide totals. These endpoints expose public, read-only statistics about the Darkbloom network. No authentication is required. They power the network dashboard on [console.darkbloom.dev](https://console.darkbloom.dev) and are suitable for external monitoring or status pages. ## GET /v1/stats Returns aggregate statistics for the attested, trusted public fleet: hardware totals, token counts, provider rows, model counts, earnings and a time series. The core body refreshes every 30 seconds and a successful body is retained for up to 5 minutes during a refresh failure; a failed read with no unexpired success returns `503 service_unavailable`. `snapshot_at` is the UTC source observation time. ### Response **snapshot_at** `string` UTC source observation time (RFC 3339 with nanoseconds). **total_requests** `integer` Cumulative number of inference requests served across the network lifetime. **total_prompt_tokens** `integer` Cumulative input tokens consumed across all requests. **total_completion_tokens** `integer` Cumulative output tokens generated across all requests. **total_tokens** `integer` Sum of prompt and completion tokens. **last_24h_requests** `integer` Requests in the last 24 hours. `last_24h_prompt_tokens`, `last_24h_completion_tokens` and `last_24h_total_tokens` accompany it. **verification_counts** `object` Public-fleet verification counts: `connections`, `authorized`, `app_attest`, `legacy` and `overlap`. **avg_tokens_per_request** `number` Average token count per request. **active_providers** `integer` Number of providers currently connected. **total_gpu_cores** `integer` Total GPU cores across all connected providers. **total_cpu_cores** `integer` Total CPU cores across all connected providers. **total_memory_gb** `integer` Total unified memory in GB across all connected providers. **total_bandwidth_gbs** `number` Total memory bandwidth in GB/s across all connected providers. **providers** `object[]` Array of per-provider hardware and stats snapshots. **provider fields** **providers\[].id** `string` Internal provider identifier. **providers\[].chip** `string` Apple Silicon chip name, e.g. `"Apple M3 Max"`. **providers\[].chip_family** `string` Chip family, e.g. `"M3"`. **providers\[].memory_gb** `integer` Unified memory size in GB. **providers\[].gpu_cores** `integer` GPU core count. **providers\[].status** `string` Provider status. `"online"` when available for requests. **providers\[].trust_level** `string` Legacy trust level: `"none"`, `"self_signed"` or `"hardware"`. Read the row's `verification` object for the serving method. **providers\[].decode_tps** `number` Most recently observed decode throughput in tokens per second. **providers\[].requests_served** `integer` Requests served by this provider in the current session. **providers\[].tokens_generated** `integer` Tokens generated by this provider in the current session. **providers\[].models** `string[]` Model IDs this provider is serving. **providers\[].current_model** `string` The model currently loaded on this provider. **models** `object[]` Aggregated per-model provider counts. **model fields** **models\[].id** `string` Model ID. **models\[].providers** `integer` Number of providers currently serving this model. **time_series** `object[]` Per-minute request and token counts for the last 30 minutes. **time series fields** **time_series\[].timestamp** `string` ISO 8601 UTC timestamp for the minute bucket. **time_series\[].requests** `integer` Requests completed in this minute. **time_series\[].prompt_tokens** `integer` Input tokens consumed in this minute. **time_series\[].completion_tokens** `integer` Output tokens generated in this minute. **time_series\[].total_tokens** `integer` Total tokens in this minute. *** ## GET /v1/leaderboard Returns up to the top 200 providers ranked by earnings, tokens generated, or jobs completed. Provider identities are pseudonymized; raw account IDs are never exposed. Cached for 5 minutes per metric and canonical window. After a successful fill, a later failure serves the last ranking with its own `updated_at`; with no success yet it returns `503 service_unavailable` with `Retry-After`. ### Query parameters **metric** `string` (default: earnings) The ranking metric. One of `"earnings"`, `"tokens"`, or `"jobs"`. **window** `string` (default: all) The time window for rankings. One of `"24h"`, `"7d"`, `"30d"`, or `"all"`. **limit** `integer` (default: 50) Maximum number of entries to return. Between 1 and 200. ### Response **metric** `string` The metric used for ranking. **window** `string` The time window used. **entries** `object[]` Ranked list of providers. **entry fields** **entries\[].rank** `integer` Position in the leaderboard (1-indexed). **entries\[].pseudonym** `string` Pseudonymized provider identifier derived deterministically from the account ID. **entries\[].earnings_micro_usd** `integer` Total earnings in micro-USD for the selected window. **entries\[].tokens** `integer` Total tokens generated for the selected window. **entries\[].jobs** `integer` Total inference jobs completed for the selected window. **updated_at** `string` ISO 8601 timestamp of when this response was generated. *** ## GET /v1/network/totals Returns aggregate network metrics (earnings, tokens, jobs, active accounts) for a given time window. Refreshed every 5 minutes and cached for 15 minutes; a failed refresh serves the last success with its own `updated_at`; `503 service_unavailable` only with no success yet. ### Query parameters **window** `string` (default: all) The time window. One of `"24h"`, `"7d"`, `"30d"`, or `"all"`. ### Response **window** `string` The time window used. **earnings_micro_usd** `integer` Total provider earnings in micro-USD for the window. **tokens** `integer` Total tokens generated for the window. **jobs** `integer` Total inference jobs completed for the window. **active_accounts** `integer` Number of distinct accounts active in the window. **updated_at** `string` ISO 8601 timestamp of when this response was generated. ## Examples ```bash GET /v1/stats theme={null} curl https://api.darkbloom.dev/v1/stats ``` ```bash GET /v1/leaderboard theme={null} curl "https://api.darkbloom.dev/v1/leaderboard?metric=earnings&window=7d&limit=10" ``` ```bash GET /v1/network/totals theme={null} curl "https://api.darkbloom.dev/v1/network/totals?window=24h" ``` ```bash GET /v1/network/models theme={null} curl "https://api.darkbloom.dev/v1/network/models?window=24h" ``` ```bash GET /v1/network/series theme={null} curl "https://api.darkbloom.dev/v1/network/series?window=24h" ``` ### Example /v1/stats response ```json theme={null} { "snapshot_at": "2026-11-16T15:00:00.123456789Z", "total_requests": 142893, "total_prompt_tokens": 89234120, "total_completion_tokens": 31047880, "total_tokens": 120282000, "avg_tokens_per_request": 841.7, "active_providers": 12, "total_gpu_cores": 480, "total_cpu_cores": 192, "total_memory_gb": 768, "total_bandwidth_gbs": 9828.0, "providers": [...], "models": [ {"id": "gemma-4-26b", "providers": 4}, {"id": "qwen3.5-35b-a3b", "providers": 5} ], "time_series": [...], "model_earnings": [...], "network_utilization": {...} } ``` ### Example /v1/leaderboard response ```json theme={null} { "metric": "earnings", "window": "7d", "entries": [ { "rank": 1, "pseudonym": "SwiftFalcon", "earnings_micro_usd": 8420000, "tokens": 91234567, "jobs": 4821 }, { "rank": 2, "pseudonym": "IronHawk", "earnings_micro_usd": 6150000, "tokens": 67012345, "jobs": 3640 } ], "updated_at": "2026-11-16T15:00:00Z" } ``` ### Example /v1/network/totals response ```json theme={null} { "window": "24h", "earnings_micro_usd": 12480000, "tokens": 148203450, "jobs": 7923, "active_accounts": 38, "updated_at": "2026-11-16T15:01:00Z" } ``` # Usage history — GET /v1/payments/usage Source: https://docs.darkbloom.dev/reference/usage GET /v1/payments/usage — returns your inference usage history. Each entry includes model, token counts, cost in micro-USD, and a timestamp. The usage endpoint returns your inference usage history as an array of per-request records. Each record shows the model used, the token counts, the cost charged, and the timestamp of the request. Usage is a recent-history view, not a complete billing export. ## Authentication This endpoint requires a Bearer token: ``` Authorization: Bearer sk-db-... ``` ## Response **usage** `object[]` Array of usage entries, most recent first. **entry fields** **job_id** `string` The internal job UUID for this inference request. Matches the `X-Inference-Job-ID` header. **model** `string` The model ID used for this request. **prompt_tokens** `integer` Number of input tokens consumed. **cached_tokens** `integer` The part of `prompt_tokens` that a provider served from its prefix cache. Omitted when zero. **completion_tokens** `integer` Number of output tokens generated. **cost_micro_usd** `integer` The cost charged for this request in micro-USD. **timestamp** `string` ISO 8601 timestamp of when the request was completed. ## Example ```bash cURL theme={null} curl https://api.darkbloom.dev/v1/payments/usage \ -H "Authorization: Bearer sk-db-..." ``` ### Example response ```json theme={null} { "usage": [ { "job_id": "a3f1c2e7-84bb-4d9a-91f3-2b7e6d4a0c18", "model": "gemma-4-26b", "prompt_tokens": 14, "cached_tokens": 0, "completion_tokens": 87, "cost_micro_usd": 72, "timestamp": "2025-04-30T14:22:07Z" }, { "job_id": "b7d3e9f1-21cc-4a8b-85e2-9c4d1a7f3b22", "model": "gemma-4-26b", "prompt_tokens": 32, "completion_tokens": 210, "cost_micro_usd": 44, "timestamp": "2025-04-30T13:05:41Z" } ] } ``` # Give a coding agent the sandbox skill Source: https://docs.darkbloom.dev/sandboxes/agent-skill A ready-made skill that tells Claude, Codex, and other coding agents when to offload work to a Darkbloom agent sandbox, how to move code without leaking a token, and how to clean up. The [MCP tools](/sandboxes/mcp-tools) say what an agent can do. The skill says when to do it: when offloading pays off, how to push code without putting a token in a sandbox, what keeps a long build alive, and to stop what it started. Save the text below as `.claude/skills/darkbloom-sandboxes/SKILL.md`. The YAML frontmatter is part of the skill file and must be kept. ````markdown theme={null} --- name: darkbloom-sandboxes description: Offload builds, tests and long-running work to Darkbloom agent sandboxes (Linux and macOS VMs on Apple silicon Macs) over SSH, and run several in parallel. Use when the local machine is the bottleneck (slow builds, memory pressure, many parallel jobs), when a task needs macOS or Xcode, or when a task should run in a fresh, isolated machine. Not for CI (that is GitHub Actions routed to Darkbloom) and not for production data. --- # Darkbloom agent sandboxes A sandbox is a VM you reach over SSH with `darkbloom-sandbox-cli`. Linux sandboxes are Ubuntu on arm64; macOS sandboxes have Xcode and Homebrew. You pay per second while a sandbox runs, so create what the task needs, keep work in the workspace, and stop it when the work is done. Read `darkbloom-sandbox-cli help ` for exact flags. The full guide is the customer page *Darkbloom agent sandboxes*. ## Preconditions 1. The CLI is installed and on `PATH`: `darkbloom-sandbox-cli --version` must print a release build and the plane `https://api-sandbox.darkbloom.dev`. 2. You are signed in: `darkbloom-sandbox-cli list`. If it fails with a 401, ask the human to run `darkbloom-sandbox-cli login`; it opens a browser and needs their approval. Never ask for their API key in chat. 3. If every call answers 404 `not_found`, the account is not allowlisted for sandboxes: stop and ask the human to get access. Do not retry in a loop. ## The loop for one task ```sh darkbloom-sandbox-cli sizes # what this account may create, and the price per hour darkbloom-sandbox-cli create --size c8-m16 --idle-minutes 60 --max-minutes 240 --wait darkbloom-sandbox-cli ssh sbx-… -- 'cd /workspace && uname -a' darkbloom-sandbox-cli stop sbx-… # keeps the workspace; costs nothing while stopped darkbloom-sandbox-cli delete sbx-… # erases the workspace ``` `create` prints the ID (`sbx-…`). Keep it: every later command needs it, and only the machine that created a sandbox can reach it. ## Choosing a platform and size - **Linux** for anything that does not need macOS: it is cheaper and there is far more capacity. Sizes run from `c4-m8` to `c32-m128`. - **macOS** only for Xcode, Swift, or a macOS app. It is scarce: expect `no_capacity` and retry or shrink. The largest macOS size is `mac-c8-m32`. - Prefer the smallest size that fits. `--cpus N --memory G` picks the cheapest size that meets a need. - `darkbloom-sandbox-cli sizes` is the authority on names and prices; do not assume one exists. ## Network: the allowlist is fixed at create There is no DNS and no plain HTTP inside a sandbox. Every outbound request goes through an HTTPS proxy that the login already sets in `HTTPS_PROXY`, on port 443, to hosts chosen when the sandbox is created. - Default (`--egress preset`): Darkbloom's developer list: GitHub, npm, crates.io, PyPI, Go, the Ubuntu mirrors and OpenAI. - Anything else must be named at create: `--egress allowlist --allow-set dev --allow-set homebrew --allow-host example.com`. Named sets include `dev`, `homebrew`, `node`, `rust`, `ruby`, `go`, `vscode`, `anthropic` and `darkbloom-builds` (which adds Zig, Hugging Face, kubectl and PostgreSQL downloads). - A blocked host fails with `CONNECT tunnel failed, response 403`. If a tool needs a new host, create a sandbox with that host; the allowlist cannot be changed on a running sandbox. ## Getting the code in Push it, and leave credentials out of the sandbox: ```sh H=darkbloom-xxxxxxxxxxxx # from: darkbloom-sandbox-cli ssh-config --all ssh "$H" 'git init -q --bare /workspace/work.git' git push "$H:/workspace/work.git" HEAD:main ssh "$H" 'git clone -q /workspace/work.git /workspace/work' ``` - This works for private repositories and needs no token inside the sandbox. - To copy an uncommitted tree: `rsync -a --exclude .zig-cache ./ "$H:/workspace/work/"`. - To clone from GitHub inside the sandbox instead, send a fine-grained, read-only token with `darkbloom-sandbox-cli secret set sbx-… GH_TOKEN < file` and have git read it with a credential helper. A secret lasts one boot: send it again after a `resume`. ## The workspace is the only thing that persists - Linux: `/workspace`. macOS: `~/workspace`. Everything else, the home directory included, is reset at every boot. - Put toolchains, caches and build output there, and export `PATH` and cache variables from a file in the workspace, for example `source /workspace/env.sh`. - On macOS, point Xcode's output there too: `xcodebuild -derivedDataPath ~/workspace/DerivedData`. - Do not write outside the workspace and expect it to survive. ## Long jobs and the idle stop A sandbox stops itself in two ways, and neither cares that a build is running: - **Idle** (`--idle-minutes`, 15 by default): no attached client and no network traffic. Work under `nohup` or in `tmux` does **not** count. - **Maximum** (`--max-minutes`, 240 by default): however busy. So while a job must run: - Keep an SSH client attached. Run the job in the foreground of a command you are still waiting on, or hold `darkbloom-sandbox-cli ssh sbx-…` open. - Or `darkbloom-sandbox-cli keepalive sbx-… 45m`, which only holds within the first hour of a boot. - Raise the ceiling with `darkbloom-sandbox-cli extend sbx-… 120` (up to 24 hours in total). - Before reporting a long job as started, check `darkbloom-sandbox-cli status sbx-…` and say what keeps it running. ## Parallel work Each sandbox is independent, so fan out rather than queueing: ```sh for H in darkbloom-a darkbloom-b darkbloom-c; do ssh "$H" 'cd /workspace/work && make test' > "$H.log" 2>&1 & done wait ``` The account has a limit on running sandboxes (2 by default; the human can raise it). More creates fail `409 limit_reached`. Stop the finished ones before starting more. Starts are rate-limited too (about 10 at once, then one a minute). ## Clean up, always Sandboxes cost money until they are stopped, and an agent that forgets them leaves a bill behind. - `stop` when the task is done: the workspace is kept and costs nothing, and a `resume` brings it back on the same Mac. - `delete` when the work is pushed out or no longer wanted. A sandbox stopped for 30 days is deleted automatically. - At the end of a session, `darkbloom-sandbox-cli list` and report what is still running, with IDs and states. ## What not to do - **Never put production credentials, customer data or regulated data in a sandbox.** The workspace is encrypted on the Mac, but Darkbloom can decrypt it, and the product does not yet claim confidentiality from the machine's owner. Treat a sandbox as a convenient isolated dev box, not a vault. - **Never work around attestation.** `ssh` verifies the boot before it connects; do not disable it, edit `known_hosts`, or pass extra SSH options to skip host-key checks. Use `ssh-config` for anything the `ssh` wrapper refuses. - **Do not create a sandbox per command.** One sandbox runs many commands. - **Do not print secrets.** `secret set` reads the value from a file or stdin; keep it out of argv, out of logs, and out of your replies. ## When something fails | Message | What it means | |---|---| | `unfunded` | The account's balance cannot cover the hold: tell the human. | | `no_capacity` | No Mac fits right now: retry, or a smaller size or the other platform. | | `boot_timeout` | It never started, and was not billed: create again. | | `409 limit_reached` | Stop a running sandbox first. | | `409 not_ready` | Still booting: `status` until `ready`, then retry. | | `verification_failed` | Do not retry blindly: delete it, create a new sandbox, and report it. | | `CONNECT tunnel failed, response 403` | The host is not in this sandbox's allowlist. | A sandbox that stops with work unsaved loses that work; commit and push inside the sandbox before long jobs, or keep the sandbox alive deliberately. ```` # Coding agents: MCP, Codex, and computer use Source: https://docs.darkbloom.dev/sandboxes/agents-and-mcp Give a coding agent access to agent sandboxes over the MCP server, run Codex inside a sandbox, and drive a macOS desktop with OpenAI's computer tool. A sandbox is useful to a coding agent only if the agent can create it, run commands in it, and clean it up. Darkbloom provides three ways to do that: an MCP server any MCP client can launch, a `codex` command that runs Codex inside the sandbox, and computer use for macOS desktops. ## The MCP server `darkbloom-sandbox-cli mcp` is a Model Context Protocol server on standard input and output. It uses your `login` and keeps your keys, token, and sandbox records in its own process: no tool result contains a secret, and `sandbox_exec` verifies the boot's attestation exactly as `ssh` does. Claude Desktop (`claude_desktop_config.json`), or any MCP client that runs a command: ```json theme={null} { "mcpServers": { "darkbloom-sandbox": { "command": "darkbloom-sandbox-cli", "args": ["mcp"] } } } ``` Codex (`~/.codex/config.toml`): ```toml theme={null} [mcp_servers.darkbloom-sandbox] command = "darkbloom-sandbox-cli" args = ["mcp"] ``` The server exposes `sandbox_create`, `sandbox_sizes`, `sandbox_list`, `sandbox_status`, `sandbox_exec`, `sandbox_read`, `sandbox_write`, `sandbox_keepalive`, `sandbox_extend`, `sandbox_stop`, `sandbox_resume`, and `sandbox_destroy`. [MCP server tools](/sandboxes/mcp-tools) describes each one, its defaults, and its limits. ## Run Codex in a sandbox ```sh theme={null} darkbloom-sandbox-cli codex sbx-… -- "fix the failing test and run it" ``` `codex` attests the boot (once per boot), then runs `codex app-server` in the guest over the same SSH channel and drives it with your task. There is no network port: prompts and approvals stay on your terminal, and a `humanCommand` checkpoint is never auto-approved. `--json` emits one JSON event per item on stdout while prompts stay on stderr. Useful options include `--cwd PATH` for the working directory, `--model NAME` for the model, `--approval-policy` (`untrusted`, `on-request`, or `never`), `--thread ID` to continue a session, and `--max-wall SECONDS` and `--max-steps N` to bound a run. ## Computer use For a macOS desktop, `cua run` drives the sandbox with OpenAI's computer tool until the task completes: ```sh theme={null} darkbloom-sandbox-cli cua run "TASK" --create --platform macos_arm64 --size mac-c4-m8 ``` It prints one line per action batch, keeps screenshots in a private temporary directory (`--screenshot-dir DIR` keeps them elsewhere), writes a JSONL transcript (`--transcript PATH`), and enforces hard step, wall-clock, token, and cost limits. It asks for confirmation before typing (unless you pass `--allow-typing-secrets`) and before quitting or closing an application. `--create` makes a sandbox and stops it if the run is cancelled or fails; it needs `--platform macos_arm64`, because computer use does. `--sandbox sbx-…` uses one this client created and leaves it running on success (`--ephemeral` stops it on success too). The API key comes from `--api-key-file` or `OPENAI_API_KEY`; `--api-base` defaults to `https://api.openai.com/v1` (`OPENAI_BASE_URL`). `mcp-cua sbx-…` exposes the same computer-use control to an MCP client: it attests the boot (once per boot), then serves the Model Context Protocol on standard input and output for the guest's computer-use agent, over an SSH stream-local forward. There is no TCP listener: the local end is a Unix socket, and MCP itself is stdio. On macOS, the desktop locks after 20 minutes without input unless a CLI connection has turned the lock off earlier in the boot. `vnc`, `cua run`, and `mcp-cua` tell you when the screen is locked already; see [the desktop (VNC)](/sandboxes/create-and-connect#the-desktop-vnc). ## Teach the agent when to use a sandbox The MCP tools say what an agent can do. The [sandbox skill](/sandboxes/agent-skill) says when offloading pays off, how to push code without putting a token in a sandbox, what keeps a long build alive, and to stop what it started. Install it as `.claude/skills/darkbloom-sandboxes/SKILL.md`. # Create and connect to an agent sandbox Source: https://docs.darkbloom.dev/sandboxes/create-and-connect Choose a size and price, create a Linux or macOS sandbox, control its outbound network, and connect over SSH, scp, rsync, VS Code, or VNC. This page covers choosing a size, creating a sandbox, its outbound network policy, and every way to reach it. For the lifecycle after creation, see [stop, resume, and retention](/sandboxes/lifecycle). ## Sizes and prices ```sh theme={null} darkbloom-sandbox-cli sizes # name, vCPUs, memory, workspace, price per hour, platforms you may boot it on ``` `sizes` reads the service's live list and is the price you pay. At the time of writing, Linux sizes cost $0.032 per vCPU-hour plus $0.008 per GiB-hour of memory, for example `c4-m8` (4 vCPUs, 8 GiB, 32 GiB workspace) at $0.192 an hour and `c8-m16` (8 vCPUs, 16 GiB, 64 GiB workspace) at $0.384. macOS sizes cost $0.35 to $0.90 an hour. Each platform takes only its own sizes, and the full list is in [sandbox pricing](/sandboxes/pricing). The largest sizes need the biggest Macs and may wait for capacity. Instead of a size you can ask for resources: `create --cpus 8 --memory 16` creates the cheapest size the service offers on the platform with at least that much, and says which. ## Create a sandbox ```sh theme={null} darkbloom-sandbox-cli create --size c4-m8 --wait # Linux, persistent, preset egress darkbloom-sandbox-cli create --platform macos_arm64 --size mac-c4-m8 --vnc # macOS (experimental), straight to its desktop ``` `create` sends a fresh nonce (or the one you name with `--nonce HEX`, 64 hex characters, to repeat the same create) and your SSH public key (`--key PUBKEY`, else `~/.ssh/id_ed25519.pub`, else a key it generates) and prints the sandbox ID (`sbx-…`). The CLI keeps a record of each sandbox, with the nonce and key, in `~/.config/darkbloom-sandbox/sessions/`: only the machine that created a sandbox can verify and reach it, so do not delete those records. `--wait` returns once the sandbox is ready; without it, `status` shows its progress. A create is idempotent per nonce: if its answer is lost (a dropped connection, a timeout), the same create again, with the same nonce, answers the sandbox it made rather than a second one. A create that failed answers its failure again, so trying again means a new create (a new nonce). A sandbox whose answer never reached you still shows in `darkbloom-sandbox-cli list` (and the console); delete it if you do not need it. Billing starts only once it is ready, and with nothing attached it stops at its idle limit. Options worth knowing: | Option | Default | What it does | | - | - | - | | `--size`, `--cpus`, `--memory` | none | A named size, or the cheapest size that fits the resources you ask for. | | `--platform` | `linux_arm64` | The OS: `linux_arm64` or `macos_arm64`. macOS is experimental: the desktop and heavy disk writes may be slow. | | `--ephemeral` | persistent | An ephemeral sandbox cannot stop: its workspace is deleted when it ends (including an idle stop). A persistent one keeps its workspace across stops. | | `--egress`, `--allow-host`, `--allow-set` | `preset` | Outbound network. See [network and egress](#network-and-egress). | | `--display`, `--vnc` | `none` | A desktop you open with `vnc`; only a create chooses it, on either platform (every macOS image can serve one). | | `--max-minutes N` | 240 (30–1440) | The longest each boot runs, however busy. | | `--idle-minutes N` | 15 (5–120) | Stops a ready sandbox with nothing attached and no traffic for that long. | | `--keep-alive DURATION` | none | Holds off the idle stop once ready. See [idle limit, keepalive, and maximum](/sandboxes/lifecycle#idle-limit-keepalive-and-maximum). | | `--key`, `--nonce` | `--key`: your default key or a generated one; `--nonce`: generated | Your SSH public key, and a 64-hex nonce that makes a repeated create answer the same sandbox. | | `--json` | off | Machine-readable output for scripts. See [scripting](#scripting). | `create` names no image: the service boots the agent image Darkbloom pins for the platform (Codex included), and the CLI records its digest so that it refuses to connect to a boot of any other image. ### Scripting With `--json`, a create that fails prints one JSON document on stdout, the sentence on stderr as ever, and exits 1 (2 for a usage error). The document has this shape: ```text theme={null} {"error": {"status", "code", "message", "retryable", "outcome_unknown", "sandbox_id"}} ``` With `--wait`, it prints the created sandbox on a first line once it has a Mac (or immediately when `--image` is given), and the ready sandbox (or that error document, with `"sandbox"` beside it) on a second. A create that gives up before it has a Mac prints the error document alone. ## Network and egress A sandbox has no inbound ports and no public address: you reach it only through the CLI. Outbound traffic goes through Darkbloom's gateway, HTTPS on port 443 only, through a proxy that every login already has in `HTTPS_PROXY` (`127.0.0.1:3128`). Plain `http://` URLs and other ports do not work: point package managers at HTTPS mirrors. * `--egress preset` (the default) allows Darkbloom's `codex+dev` list of developer hosts (package registries, GitHub, model APIs Codex uses). * `--egress allowlist --allow-host api.example.com --allow-host github.com` allows exactly the hosts you name instead (1 to 64 exact lowercase hostnames, no wildcards). An allowlist replaces the preset: name every host your work needs, one by one or by set (`--allow-set dev` is the preset's own hosts). `--allow-set NAME` (repeatable, only with `--egress allowlist`) adds a named set of hosts. The sets are Darkbloom's: the CLI asks the service for them when you name one, and `create` prints the hosts the allowlist came to and the sandbox's egress policy digest (what its attestation must show; `--json` has the hosts in `egress.allowlist`). The sandbox may reach every set's hosts and every `--allow-host`, 64 hosts at most together, fixed when it is created: | Set | Hosts | For | | - | - | - | | `dev` | the `codex+dev` preset's hosts | what `--egress preset` reaches | | `homebrew` | `formulae.brew.sh`, `ghcr.io`, `pkg-containers.githubusercontent.com`, `github.com`, `raw.githubusercontent.com`, `release-assets.githubusercontent.com` | `brew install` on macOS | | `node` | `nodejs.org`, `registry.npmjs.org`, `registry.yarnpkg.com`, `repo.yarnpkg.com` | Node.js downloads, npm, Yarn (Corepack's too) | | `rust` | `sh.rustup.rs`, `static.rust-lang.org`, `crates.io`, `index.crates.io`, `static.crates.io` | rustup, Rust toolchains, crates | | `ruby` | `rubygems.org`, `index.rubygems.org`, `cdn.cocoapods.org` | `gem install`, CocoaPods | | `go` | `go.dev`, `dl.google.com`, `proxy.golang.org`, `sum.golang.org`, `storage.googleapis.com` | Go downloads and modules | | `vscode` | `update.code.visualstudio.com`, `vscode.download.prss.microsoft.com`, `main.vscode-cdn.net`, `marketplace.visualstudio.com` | VS Code Remote-SSH's server | | `anthropic` | `api.anthropic.com` | the Anthropic API (Claude Code) | | `darkbloom-builds` | GitHub, npm, Go, Rust, PyPI, Hugging Face, Zig, kubectl, PostgreSQL and Ubuntu package downloads, and Playwright's browsers (31 hosts) | what Darkbloom's own builds download | A set names the hosts its tool's own downloads use, not every host a build may reach: a Homebrew cask, or a formula built from source, downloads from its vendor's host, a CocoaPods pod from its own repository, and a VS Code extension installed in the sandbox from its publisher's host (`PUBLISHER.gallerycdn.vsassets.io`; VS Code can also download extensions on your machine and copy them over, its `remote.downloadExtensionsLocally` setting). Name those hosts with `--allow-host`. A service from before the sets were served leaves them to your CLI version's own (every set above but `darkbloom-builds`, and `dev` as that version knows the preset), and `create` says so. A name the service has no set for creates nothing. The preset does not reach Homebrew's formula list or the host its packages download from, so `brew install` fails under it. A macOS sandbox that installs with Homebrew: ```sh theme={null} darkbloom-sandbox-cli create --platform macos_arm64 --size mac-c4-m8 \ --egress allowlist --allow-set dev --allow-set homebrew ``` A host outside the policy fails inside the guest: the proxy refuses it with HTTP 403 and says why (`curl: (56) CONNECT tunnel failed, response 403`, as git and most tools report it; `curl -v` shows the proxy's header `Sandbox-Refusal: policy; mode=…; host=…`). A 502 from the proxy is every other failure to open the connection: the host is allowed but could not be reached just now, the URL names a port other than 443 or an IP address instead of a hostname, or the sandbox's egress limits are used up. The 403 needs both the sandbox's image and the service to carry this change: until both do, a host outside the policy answers 502 as well. ## Connect over SSH ```sh theme={null} darkbloom-sandbox-cli ssh sbx-… # an interactive shell darkbloom-sandbox-cli ssh sbx-… -- uname -a # one command, its output here ``` Before the first connection to each boot, `ssh` verifies the boot's [attestation](/sandboxes/security#attestation) and pins the host key it attests; it then takes a short-lived ingress capability from the service and runs your `ssh` (`DARKBLOOM_SANDBOX_SSH`, default `ssh`) through the gateway with only that key, as `agent@sbx-…` on Linux and `runner@sbx-…` on macOS. Your work lives in `/workspace` (Linux) or `~/workspace` (macOS). On current Linux images, `~/workspace` is a link to `/workspace`, so the same path works on both. On an older Linux image a `~/workspace` you make is a directory in the home, which is memory and gone at the next stop; a stopped sandbox gets the link when it moves to the new image with `resume --upgrade-image`. See [image upgrades](/sandboxes/lifecycle#image-upgrades). `darkbloom-sandbox-cli codex sbx-… -- "task"` runs Codex in the sandbox over the same channel. See [coding agents](/sandboxes/agents-and-mcp). ### Files `ssh … -- COMMAND` connects its standard input and output, so copies are pipes: ```sh theme={null} tar czf - ./myproject | darkbloom-sandbox-cli ssh sbx-… -- tar xzf - -C /workspace # upload a tree (Linux) darkbloom-sandbox-cli ssh sbx-… -- tar czf - -C /workspace myproject | tar xzf - # download it darkbloom-sandbox-cli ssh sbx-… -- 'cat > /workspace/notes.txt' < notes.txt # one file ``` ### Plain OpenSSH: scp, sftp, rsync, port forwards, editors `darkbloom-sandbox-cli ssh-config` prints an OpenSSH host entry per sandbox that reaches it through the CLI, so every OpenSSH tool works, and editors' remote servers that forward a port (VS Code Remote-SSH, JetBrains Gateway) work with Linux sandboxes (macOS sandboxes allow no forwarding): ```sh theme={null} darkbloom-sandbox-cli ssh-config --all > ~/.ssh/darkbloom-sandbox.conf # Make this the FIRST line of ~/.ssh/config (ssh keeps the first value it # reads for each option, so a `Host *` above it would override it): # Include ~/.ssh/darkbloom-sandbox.conf ssh darkbloom-2f7c9a410d3e # the Host name ssh-config printed scp ./data.csv darkbloom-2f7c9a410d3e:/workspace/ # Linux; on macOS :workspace/ (sftp alike) rsync -a -e ssh ./src/ darkbloom-2f7c9a410d3e:/workspace/src/ ssh -N -L 8080:127.0.0.1:8080 darkbloom-2f7c9a410d3e # a server in the box on localhost:8080 ``` `ssh-config sbx-…` prints one sandbox's entry, `--all` every sandbox this CLI created; run it again after you create or delete sandboxes. Each entry is named `darkbloom-` and the first 12 characters of the ID after `sbx-` (the whole ID if two would collide), logs in as the sandbox's user (`agent` or `runner`) with the SSH key you created it with, and trusts only the host key the CLI pinned from the boot's attestation, checked strictly; it never forwards your SSH agent or X11 display into the sandbox. Its `ProxyCommand` is `darkbloom-sandbox-cli proxy sbx-…`: every connection verifies the boot exactly as `ssh` does (attesting it the first time after a create or resume) and takes a fresh short-lived capability from the service, so nothing in the entry expires and there is no token in it; the CLI reads your token from where `login` stored it (or `DARKBLOOM_SANDBOX_TOKEN`, which your shell passes on to ssh). Without the config, `ssh` passes forwarding flags placed after `--`: ```sh theme={null} darkbloom-sandbox-cli ssh sbx-… -- -L 8080:127.0.0.1:8080 -N ``` It also accepts `-R`, `-D`, `-T`, `-t`, `-C`, `-q`, and `-v`; a second `--` starts the remote command. It refuses options that would change how ssh reaches or trusts the sandbox (`-o`, `-F`, `-J`, `-i`, `-p`, …): use `ssh-config` for anything else. Linux sandboxes allow local forwards (`-L`, `-D`); macOS sandboxes allow none. ## The desktop (VNC) ```sh theme={null} darkbloom-sandbox-cli create --size c4-m8 --vnc # create with a display, wait, open it darkbloom-sandbox-cli vnc sbx-… # open the desktop of a sandbox created with one ``` `vnc` verifies the boot's attestation first (never skipped), turns on the guest's display with a fresh random password sealed to the attested guest key, listens on `127.0.0.1` only (`--port N`, else any free port), and opens your viewer at `vnc://127.0.0.1:` (macOS Screen Sharing, or any VNC viewer). A sandbox created without a display cannot get one later (`409 display_not_enabled`): create a new one with `--vnc`. **End-to-end encrypted** means the screen traffic travels inside the SSH channel to the attested guest, encrypted from your machine to the sandbox. Darkbloom's gateway and the network relay it without seeing it, and the desktop listens only on the guest's loopback, so nothing else on the network can reach it. This is not a claim of confidentiality from the Mac's owner. See [security](/sandboxes/security#your-connection). **Slow links.** The desktop sends only what changes, but a busy screen needs bandwidth: Darkbloom's targets are a first frame within 2 seconds and under 8 Mbit/s at 1080p. On a slow link, use a smaller window or lower your viewer's quality. macOS desktops are the newest part and may lag. **The macOS screen lock.** On today's macOS images the desktop locks after 20 minutes without input, and a locked desktop shows only the wallpaper and takes no clicks or keys, from you or from a computer-use agent. No way to unlock it from inside the sandbox is known; a new boot starts unlocked, so `stop` it and `resume` it (the workspace is kept). The CLI prevents the lock: at its first connection to each boot of a macOS sandbox (`ssh`, `vnc`, `codex`, `cua`, the MCP servers, and plain `ssh` or an editor through `ssh-config`'s entries) it turns the lock off for that boot, which takes about five seconds once and says nothing. Connect within 20 minutes of a create or a resume if you will use the desktop later; `vnc`, `cua run`, and `mcp-cua` tell you when the screen is locked already (`sbx-…'s screen is locked. …`). A later image turns the lock off by itself; the CLI notices that at its first connection to a sandbox of such an image and makes no extra connection to that sandbox again. # Sandbox lifecycle: stop, resume, and retention Source: https://docs.darkbloom.dev/sandboxes/lifecycle What persists across a stop, where the workspace lives, how image upgrades work, and how the idle limit, keepalive, and maximum affect long-running work. A sandbox is billed only while it runs. This page covers stopping and resuming one, what survives, how images change, and how to keep long work alive. ## Stop and resume ```sh theme={null} darkbloom-sandbox-cli stop sbx-… # keeps the workspace darkbloom-sandbox-cli resume sbx-… # boots it again on the same workspace darkbloom-sandbox-cli delete sbx-… # the sandbox and its workspace, for good darkbloom-sandbox-cli list # your sandboxes, newest first (--all: the ended ones too) darkbloom-sandbox-cli status sbx-… # one sandbox: state, why it stopped, its deadlines ``` The console's sandbox page can stop a persistent sandbox too (**Stop sandbox**, which keeps the workspace), but it cannot resume one: only the CLI that created it can. `list` shows the sandboxes that are not over. Deleted ones and ones that failed to start stay on record for at least 30 days: `list` only counts them (`77 ended sandboxes … are not shown`), and `list --all` lists them. The service's list is bounded (100 sandboxes; more only when more than that have not ended): when it is full the count reads `at least …`, and `status sbx-…` still shows an older one. `list --json` prints the service's whole list. ## What persists Across a stop and resume you keep: * the workspace (`/workspace` or `~/workspace`): your files, their owners and permissions, links, git repositories, and Codex's login and sessions, since `CODEX_HOME` is there; * the sandbox ID; * its size; * your SSH key. Everything outside the workspace starts fresh at every boot: a package installed with `apt` or `brew` outside it is gone after a resume. ## Where the workspace lives The workspace stays on the one Mac it was created on and is **not backed up**. A resume runs only there: * if that Mac is busy, the service answers `no_capacity`; * if it is offline, `host_unavailable`; * if it is only getting ready (it has just updated or restarted, or is downloading the sandbox's image), `host_starting`, which is worth a retry within the minute. None of these answers changes the sandbox: it stays stopped as it was, and `status` keeps saying why it stopped. If the Mac leaves the fleet, the workspace is lost with it. Keep your work in git, pushed elsewhere. `status` and `list` say when a stopped sandbox's Mac is offline or was removed (`home` in the API; a **Mac offline** or **Mac removed** badge in the console): * **Offline under a day:** it resumes once the Mac is back, and still counts toward your workspace storage. * **Offline a day or more:** it no longer counts toward your storage, and it resumes only if that Mac returns. * **Removed:** it can never resume (`409 host_removed`) and no longer counts toward your storage. Delete it before it is deleted automatically (`status` says when): deleting erases its workspace key; the automatic deletion keeps it. ## Retention A stopped sandbox costs nothing. If it stays stopped for 30 days, Darkbloom deletes it and its workspace; `status` and `list` show the date. Resume it before then: once it runs again, the next stop starts a new 30 days. ## Each resume is a new boot A resume uses a fresh nonce, gets a new attested host key (the CLI pins it on the next `ssh`), a new hold, and billing from `ready`. ![Sandbox console sandbox detail showing state, size, workspace and a state timeline through requested, placed, booting, attested and ready](https://mintcdn.com/eigenlabs-f49d2e97/2TtlNanikOmTAJr5/images/console/sandboxes-detail.png?fit=max\&auto=format\&n=2TtlNanikOmTAJr5\&q=85\&s=5da764d390dca12e9311fb7eb011d784) A sandbox's page in the sandbox console: its state timeline from requested to ready. Example data. ## Image upgrades Darkbloom pins one agent image per platform and moves the pin when it ships fixes. A running sandbox keeps its image until it stops; a stopped one keeps the image it was created with. A plain `resume` changes it only to a re-signed twin: the same image, with the same guest content, signed again for the Mac's new add-on. The CLI verifies a twin before it adopts it, and says so (`resumed sbx-… on image …: this workspace's image … re-signed for its Mac's new add-on`). The Macs of the fleet take a new release one by one, over hours or days, and a sandbox follows the Mac that holds its workspace: `status` and `list` say for each sandbox whether its own Mac still boots its image (`current`) or boots another now (`upgrade available`), so two of your sandboxes can differ. Once its Mac boots any other image, a plain `resume` changes nothing and says so (image digests shortened here): ```text theme={null} sbx-… was not resumed: the plane boots agent-linux sandboxes from image 1a2b3c4d5e6f now, and this workspace's image is 0f1e2d3c4b5a (409 upgrade_required). A plain resume changes a sandbox's image only to a verified re-signed twin of it (the same guest content). An upgrade boots 1a2b3c4d5e6f on the same workspace (its files, volume and Mac), with the same sandbox ID and the same SSH key; … To upgrade and resume it: darkbloom-sandbox-cli resume sbx-… --upgrade-image ``` On a terminal, `resume` instead starts `sbx-… needs an image upgrade to resume:`, shows both images and what an upgrade keeps, and asks `Upgrade sbx-… to image … and resume it? [y/N]` before it upgrades to the image it showed. `--upgrade-image` upgrades without asking (for scripts and `--json`). An upgrade keeps everything a resume keeps: only the image changes, and the new boot is attested like every boot. * Only a **stopped, persistent sandbox that has run before** can upgrade (else `409 upgrade_not_allowed`): stop a running one first. A sandbox that was stopped before it ever started also can: its workspace was never created, so the upgrade only picks the image its first boot runs. * There is no way back to the old image, and a failed upgraded boot loses nothing: the sandbox stays stopped on the new image, and `resume` retries. * If the CLI loses the service's answer, it keeps the request: run the same `resume` again, which replays exactly it. Do not use an older CLI or delete the record meanwhile. ## Idle limit, keepalive, and maximum A running sandbox stops by itself in two ways, so you never pay for one you forgot: * **Idle limit** (`--idle-minutes`, 15 by default): it stops after that long with nothing attached (`ssh`, `vnc`, `codex`) and no network traffic. Work left running inside does **not** count: a build or training run in `tmux` or under `nohup` is stopped when you disconnect. An ephemeral sandbox loses its workspace with it. * **Maximum** (`--max-minutes`, 240 by default): every boot stops after that long, however busy. `extend` raises it. Before you leave work running unattended: ```sh theme={null} darkbloom-sandbox-cli keepalive sbx-… 45m # 90m, 2h, 1h30m, … ; off to cancel darkbloom-sandbox-cli extend sbx-… 120 # 120 more minutes before the maximum (15 or more, 1440 in total) darkbloom-sandbox-cli status sbx-… # what keeps it running, and until when ``` A keepalive holds off only the idle limit, and only up to the boot's keepalive limit: by default an hour from the boot's start. Ask for more and the CLI says until when it was held; past the limit the service refuses it (`409 keep_alive_limit`) and the idle limit applies again. For longer unattended work, keep a client attached (leave `darkbloom-sandbox-cli ssh sbx-…` open on your machine, for example in a local `tmux`) or let it move traffic. A resume starts each boot without a keepalive unless you pass `resume sbx-… --keep-alive DURATION` (held to the same limit). The [troubleshooting page](/sandboxes/troubleshooting) lists the stop reasons and what to do next. # Limits and billing Source: https://docs.darkbloom.dev/sandboxes/limits-and-billing Per-account limits for running sandboxes, storage, vCPUs, and start rate, plus how per-second billing and hourly holds work. Limits are per account, unless Darkbloom set your grant's own: then those replace the values below (a daily egress limit included), and your grant may also limit vCPUs and sizes (`sizes` then lists only the sizes you may boot). ## Limits | Limit | Value | When you hit it | | - | - | - | | Running sandboxes per account (starting, running, stopping, resuming) | 2 | `409 limit_reached`: `this account already has 2 running sandboxes and its limit is 2 (stopped sandboxes do not count); stop or delete one` | | Workspace storage per account (running and stopped sandboxes, except stopped ones whose Mac was removed or has been offline a day) | 256 GiB | `409 limit_reached`: `this account's workspaces already hold 224 GiB of its 256 GiB limit (stopped sandboxes included) and this sandbox needs 64 GiB more; delete a stopped sandbox` | | vCPUs of the running sandboxes together | none, unless your grant sets one | `409 limit_reached`: `this account's running sandboxes already use 8 vCPUs of its 8 vCPU limit and this sandbox needs 4 more (stopped sandboxes do not count); stop or delete one, or choose a smaller size` | | Sizes you may boot | every size the platform offers, unless your grant names some | `409 size_not_granted`: `this account may not boot the size class c32-m128; its grant allows c4-m8, c8-m16` | | How fast an account starts sandboxes (creates and resumes together) | 10 at once, then 1 a minute | `429 rate_limited`, with how long to wait | | A boot's duration | 30–1440 minutes (`--max-minutes`) | the sandbox stops (`max_minutes`) | | Egress per account per day (UTC) | none by default, unless Darkbloom set one for you or your grant's own | `409 limit_reached`: `this account's sandboxes moved … through Darkbloom's gateway today (UTC), its daily limit is …; creates and resumes are refused until … (running sandboxes are not stopped)` | | Allowlist hosts | 1–64 exact lowercase hostnames | the CLI refuses it before sending; the API answers `422 invalid_request` | | Sandbox records per account (ended sandboxes included, each kept at least 30 days after it ends) | 50,000 | `409 limit_reached`: `this account holds 50000 sandbox records and its limit is 50000: an ended sandbox's record is kept at least 30 days after it ends, so creates are refused until older ended ones are pruned or Darkbloom raises the limit (its operators are alerted)` | An ended sandbox (deleted, or failed to start) stays in `status` for at least 30 days after it ends; then its record is removed. `list` shows every sandbox that has not ended, however old, and `list --all` the newest ended ones too (100 entries in all). Its charges stay in your billing history. The numbers in a `limit_reached` message are your account's own; `list` shows the sandboxes that count. A refused start is reported by the CLI as: ```text theme={null} the plane is limiting how often this account sends such requests: wait 42 seconds, then run … ``` Repeating a resume whose outcome you did not read, or a resume the service answers `upgrade_required`, does not count against the start rate. ## Prices See [sandbox pricing](/sandboxes/pricing) for every size and its hourly rate, the Linux formula, and worked examples. `darkbloom-sandbox-cli sizes` reads the live list and is the price you pay. ## Billing * **Per second while it runs:** from the moment the sandbox is ready until its VM is gone (a stop takes seconds), at its size's price, with a one-minute minimum per charge (each boot, and each fresh hour it moves to; the service never opens a charge just for a boot's last minutes). Starting up and stopped sandboxes are free. * **A hold per hour.** Before each boot starts, Darkbloom holds an hour at its size's price from your balance, and settles it to the seconds the boot ran. A boot that runs longer moves on to a fresh hour before each hour ends (one more hour held, the last one settled), so every second is billed and nothing is charged twice. If your balance cannot hold the first hour, the sandbox does not start (`unfunded`); if it cannot hold a later hour, the sandbox stops (a persistent one keeps its workspace). [Add credits](/billing/add-credits) on the console's **Billing** page. * **What you were charged.** A sandbox's cost shows two amounts: the estimate at its size's price, and what Darkbloom charged your balance (`cost.charged` in the API; **Charged** on the console's sandbox page). The charge counts each hour once it is settled, so it trails the estimate while the sandbox runs. A sandbox on a Mac your own account provides is not charged. * **What it costs so far.** `status` shows the sandbox's price and both amounts on one line: ```text theme={null} $0.36/hour while it runs; about $0.24 so far (40 min 7 s billed), $0.18 charged to the balance so far (1 charge still open) ``` * **When it stops.** `status` shows when the service will stop a running sandbox (its idle limit and its maximum) and when it will delete a stopped one; `list` shows the same for each. * **Darkbloom's own billing problems are not yours:** if Darkbloom cannot charge for more than 10 minutes, a running sandbox stops (`billing_lapsed`) with its workspace kept, persistent or not, and you resume it later. The CLI says `a problem on Darkbloom's side, not the account's`. ## Records and retention An ended sandbox's record is kept at least 30 days, and a stopped sandbox is deleted with its workspace after 30 days stopped. [Sandbox lifecycle](/sandboxes/lifecycle) covers both. # MCP server tools Source: https://docs.darkbloom.dev/sandboxes/mcp-tools The twelve tools the Darkbloom sandbox MCP server exposes, with their defaults, output limits, workspace paths, and image-upgrade consent. `darkbloom-sandbox-cli mcp` exposes these tools to an MCP client. It keeps your keys, token, and sandbox records in its own process, no tool result contains a secret, and `sandbox_exec` verifies the boot's attestation exactly as `ssh` does. | Tool | What it does | | - | - | | `sandbox_create` | Creates a sandbox and waits for it to be ready. | | `sandbox_sizes` | Lists the sizes this account may create, with prices and platforms. | | `sandbox_list` | Lists sandboxes and says how many ended ones it left out. | | `sandbox_status` | Returns one sandbox's state, deadlines, and cost. | | `sandbox_exec` | Runs a command in the workspace and returns its output. | | `sandbox_read` | Reads a file. | | `sandbox_write` | Writes a file. | | `sandbox_keepalive` | Holds off the idle stop for a duration. | | `sandbox_extend` | Adds minutes before the boot's maximum. | | `sandbox_stop` | Stops a sandbox and keeps its workspace. | | `sandbox_resume` | Boots a stopped sandbox on the same workspace. | | `sandbox_destroy` | Deletes the sandbox and its workspace. | ## Create and resume `sandbox_create` takes `allow_hosts` and `allow_sets` (the sets of [network and egress](/sandboxes/create-and-connect#network-and-egress)) for an allowlist, and waits for the sandbox to be ready: 45 seconds by default, up to 900 with `timeout_seconds`, or `wait: false` to return at once. A client that sends `_meta.progressToken` gets progress while it waits. If the sandbox is still starting, the tool returns its ID and state, so your agent polls with `sandbox_status` instead of creating another. `sandbox_resume` waits the same way. `sandbox_stop` keeps the workspace, and an idle-stopped sandbox is resumed, not destroyed. `sandbox_resume` never changes a sandbox's image by itself: when the service needs an upgrade it explains it and shows the full 64-hex digest of the image it would boot, and upgrades only when called again with `upgrade_image` set to exactly that digest. A different or unverifiable digest is refused before anything is sent. ## List and status `sandbox_list` leaves ended sandboxes out and says how many (`ended_omitted`); `include_ended: true` lists them too. `list_full: true` says the service's list was full (100 sandboxes or more), so older ones may be in neither. ## Commands and files Commands and files live in the workspace. `sandbox_exec` starts each command in the workspace (`/workspace` on Linux, `~/workspace` on macOS; `cwd` names another directory), and `sandbox_read` and `sandbox_write` take a path that is absolute, `~/…` (the login's home), or relative to the workspace. Only the workspace survives a stop: a write outside it says so (the login's `~/.codex` is a link into the workspace, so it is kept). ## Results sized for a model `sandbox_exec` keeps 16 KiB of stdout and of stderr by default (`max_output_bytes`, up to 1 MiB). Of a longer stream it returns the start and the end, cut between characters, with a line between them that says how much was left out. A command's output and a file's content are sent once, as JSON text. A command that outlives `timeout_seconds` (60 by default, 600 at most) is no longer waited for but may still run: start long work with `nohup COMMAND > LOG 2>&1 &` and read the log. # Darkbloom agent sandboxes Source: https://docs.darkbloom.dev/sandboxes/overview Run Linux and macOS virtual machines on Apple silicon Macs in Darkbloom's fleet. SSH in, run a coding agent, open a desktop, and pay per second. > [!WARNING] > > Agent sandboxes are **experimental** and open by invitation. Expect rough > edges and breaking changes. An agent sandbox is a Linux VM (or, experimentally, a macOS VM) on an Apple silicon Mac in Darkbloom's community fleet, for you or your coding agent: SSH in, run Codex or another agent, open its desktop, stop it, and resume it later on the same workspace. You pay per second while it runs, from the same Darkbloom balance that Darkbloom inference uses. > [card] [Quickstart](/sandboxes/quickstart) > > From a new account to parallel builds: install, create, connect, and push code. > [card] [Create and connect](/sandboxes/create-and-connect) > > Sizes and prices, create flags, egress allowlists, SSH, files, and VNC. > [card] [Coding agents](/sandboxes/agents-and-mcp) > > Run Codex, drive the desktop with computer use, or expose sandboxes over MCP. > [card] [Limits and billing](/sandboxes/limits-and-billing) > > Per-account limits, billing holds, and what each charge covers. ## What you can do with a sandbox * **Work over SSH.** Open an interactive shell, run one command, or copy files with `scp` and `rsync`. * **Keep a workspace.** Your files, their owners and permissions, links, git repositories, and Codex's login and sessions survive a stop and resume. * **Run several in parallel.** Each sandbox is independent, so builds and tests fan out instead of queueing. * **Open a desktop.** A VNC desktop is available on either platform when you create the sandbox with one. * **Let a coding agent drive it.** The built-in MCP server, the `codex` command, and computer use let an agent create sandboxes, run commands, and read and write files. ## Linux and macOS | | Linux | macOS | | - | - | - | | Platform name | `linux_arm64` (the default) | `macos_arm64` | | Image | Ubuntu with git, a C and C++ toolchain, Python and Node | Xcode and Homebrew | | SSH login | `agent` | `runner` | | Workspace | `/workspace` | `~/workspace` | | Sizes | `c4-m8`, `c8-m16`, … | `mac-c4-m8`, `mac-c8-m16`, … | | Status | Available | Experimental: the desktop and heavy disk writes may be slow. | On current Linux images, `~/workspace` is a link to `/workspace`, so the same path works on both platforms: `readlink ~/workspace` prints `/workspace`. Sandboxes are arm64 only. There are no virtual machines inside a sandbox, and no GPU on Linux. ## Pricing Billing is per second from the moment a sandbox is ready until its VM is gone, with a one-minute minimum per charge. Starting up and stopped sandboxes are free. `darkbloom-sandbox-cli sizes` reads the live list and is the price you pay. At the time of writing, Linux sizes cost $0.032 per vCPU-hour plus $0.008 per GiB-hour of memory: `c4-m8` (4 vCPUs, 8 GiB, 32 GiB workspace) at $0.192 an hour and `c8-m16` (8 vCPUs, 16 GiB, 64 GiB workspace) at $0.384. macOS sizes cost $0.35 to $0.90 an hour. Each platform takes only its own sizes; the full table is in [sandbox pricing](/sandboxes/pricing). The largest sizes need the biggest Macs and may wait for capacity. See [limits and billing](/sandboxes/limits-and-billing) for holds, what the console shows, and what happens when your balance cannot cover a boot. ## How you reach a sandbox A sandbox has no inbound ports and no public address: you reach it only through `darkbloom-sandbox-cli`. Outbound traffic goes through Darkbloom's gateway, HTTPS on port 443 only, through a proxy that every login already has in `HTTPS_PROXY` (`127.0.0.1:3128`). Plain `http://` URLs and other ports do not work, so point package managers at HTTPS mirrors. The CLI verifies a boot's attestation before it connects to it and pins the host key that boot attests. See [security](/sandboxes/security). ## Who can use agent sandboxes Access is by invitation, and a grant of one platform does not cover the other. Send the Account ID the console shows under **Settings** and the platforms you need (`linux_arm64`, `macos_arm64`, or both) to your Darkbloom contact. Until you are granted, the sandbox API answers as if it did not exist. The [troubleshooting page](/sandboxes/troubleshooting) shows the message the CLI prints. You need a funded Darkbloom account. Sign up at [https://console.darkbloom.dev](https://console.darkbloom.dev) and add funds there: sandboxes draw on the same balance as Darkbloom inference. ## Next steps Start with the [quickstart](/sandboxes/quickstart) to create and connect to your first sandbox, then read [create and connect](/sandboxes/create-and-connect) for sizes, network policy, and the desktop. # Sandbox pricing Source: https://docs.darkbloom.dev/sandboxes/pricing What an agent sandbox costs: per-second billing by size, Linux and macOS hourly rates, the Linux formula, hourly holds, and worked examples. A sandbox is priced per second by size, from the moment it is ready until its VM is gone, with a one-minute minimum per charge. ## Sizes ### Linux sizes | Size | vCPU | Memory | Workspace | Per hour | | - | - | - | - | - | | `c4-m8` | 4 | 8 GiB | 32 GiB | \$0.192 | | `c4-m16` | 4 | 16 GiB | 32 GiB | \$0.256 | | `c8-m16` | 8 | 16 GiB | 64 GiB | \$0.384 | | `c8-m32` | 8 | 32 GiB | 64 GiB | \$0.512 | | `c12-m32` | 12 | 32 GiB | 64 GiB | \$0.640 | | `c16-m32` | 16 | 32 GiB | 64 GiB | \$0.768 | | `c16-m64` | 16 | 64 GiB | 64 GiB | \$1.024 | | `c24-m48` | 24 | 48 GiB | 64 GiB | \$1.152 | | `c24-m96` | 24 | 96 GiB | 64 GiB | \$1.536 | | `c32-m64` | 32 | 64 GiB | 64 GiB | \$1.536 | | `c32-m128` | 32 | 128 GiB | 64 GiB | \$2.048 | Linux sizes follow this formula: $0.032 per vCPU-hour plus $0.008 per GiB-hour of memory. For `c8-m32`, that is 8 × $0.032 plus 32 × $0.008, or \$0.512 an hour. ### macOS sizes | Size | vCPU | Memory | Workspace | Per hour | | - | - | - | - | - | | `mac-c4-m8` | 4 | 8 GiB | 32 GiB | \$0.35 | | `mac-c4-m16` | 4 | 16 GiB | 32 GiB | \$0.45 | | `mac-c8-m16` | 8 | 16 GiB | 64 GiB | \$0.70 | | `mac-c8-m32` | 8 | 32 GiB | 64 GiB | \$0.90 | Billed per second from ready, one-minute minimum per charge; stopped sandboxes are free. macOS sizes are fixed per size; the Linux formula does not apply. Each platform boots only its own sizes. `darkbloom-sandbox-cli sizes` lists the sizes your account may boot on each platform. ## What you pay for * Each second from the moment the sandbox is ready until its VM is gone, at its size's hourly rate. * A one-minute minimum per charge: each boot, and each further hour a long boot moves to. * The hour held from your balance before each boot starts. ## What you don't pay for * Starting up: a sandbox being created or resumed costs nothing until it is ready. * A stopped sandbox: it costs nothing, including its workspace, which is deleted after 30 days stopped. See [lifecycle](/sandboxes/lifecycle). * A sandbox on a Mac your own account provides. ## Examples | Sandbox | Time | Cost | | - | - | - | | One `c8-m16` sandbox | 3 hours | \$1.152 | | Four `c16-m32` sandboxes | 30 minutes each | \$1.536 | | One `mac-c8-m32` sandbox | 8 hours | \$7.20 | | 20-second test boot of `c4-m8` | 1 minute (the minimum) | \$0.0032 | | One sandbox stopped for a week | 0 billed seconds | \$0 | ## How charges work * **A hold per hour.** Before each boot starts, Darkbloom holds one hour at the size's price from your balance, then settles it to the seconds the boot ran. A boot that runs longer moves to a fresh hour before each hour ends: one more hour is held and the last one is settled, so every second is billed once. * **A balance that cannot hold the first hour.** The sandbox does not start (`unfunded`). * **A balance that cannot hold a later hour.** The sandbox stops; a persistent sandbox keeps its workspace. Add funds and resume it. * **A billing problem on Darkbloom's side.** A running sandbox stops (`billing_lapsed`) with its workspace kept, and you can resume it later. * **What it has cost so far.** `darkbloom-sandbox-cli status sbx-…` shows the hourly price, the estimate so far, and what has been charged to your balance so far. ## Paying Inference, CI and sandboxes all draw on one prepaid Darkbloom balance. Add funds at [console.darkbloom.dev](https://console.darkbloom.dev). * `darkbloom-sandbox-cli sizes` shows each size's price, the live rate you are charged. * `darkbloom-sandbox-cli status sbx-…` shows one sandbox's cost so far. * The console's **Billing** page shows your balance and each charge. ## Prices as of November 2026 These rates are as of November 2026. The live prices are what `darkbloom-sandbox-cli sizes` prints; it also lists which sizes your account may boot on each platform. # Agent sandboxes quickstart Source: https://docs.darkbloom.dev/sandboxes/quickstart Go from a new Darkbloom account to builds running in parallel on Linux and macOS agent sandboxes, with your code pushed from your own machine. > [!WARNING] > > Agent sandboxes are **experimental** and open by invitation. Expect rough > edges and breaking changes. This page takes you from a new account to builds running in parallel on Darkbloom's Linux and macOS sandboxes, with your code pushed from your own machine. [Create and connect](/sandboxes/create-and-connect) covers every create flag, network policy, and connection method; [troubleshooting](/sandboxes/troubleshooting) lists every error and what to do. ## Before you start * **Your machine:** a Mac with Apple silicon, or Linux, with OpenSSH (`ssh` and `ssh-keygen`). * **A funded account:** sign up at [https://console.darkbloom.dev](https://console.darkbloom.dev) and add funds there. Sandboxes draw on the same balance as Darkbloom inference. * **Access:** sign in at [https://api-sandbox.darkbloom.dev](https://api-sandbox.darkbloom.dev) with the same account, open **Settings**, and send the **Account ID** to your Darkbloom contact. Say which platforms you need: `linux_arm64`, `macos_arm64`, or both. A grant of one platform does not cover the other. Until you are granted, the sandbox API answers as if it did not exist. ![Sandbox console Settings page showing the account's email and Account ID above its API keys](https://mintcdn.com/eigenlabs-f49d2e97/2TtlNanikOmTAJr5/images/console/settings.png?fit=max\&auto=format\&n=2TtlNanikOmTAJr5\&q=85\&s=48d05c26623664a5baddcfc8a7c91afc) Settings in the sandbox console, where you find your Account ID and API keys. Example data. ## Install the CLI and sign in Your Darkbloom contact sends you the release build of `darkbloom-sandbox-cli` until the installer is served. Put it on your `PATH`. If it reached you through a browser or a chat app, macOS quarantines it, so clear that first: ```sh theme={null} mkdir -p ~/.local/bin && mv ~/Downloads/darkbloom-sandbox-cli ~/.local/bin/ chmod 755 ~/.local/bin/darkbloom-sandbox-cli xattr -d com.apple.quarantine ~/.local/bin/darkbloom-sandbox-cli 2>/dev/null export PATH="$HOME/.local/bin:$PATH" # also add this line to your shell profile darkbloom-sandbox-cli --version # release build, default plane https://api-sandbox.darkbloom.dev ``` When the service serves CLI releases, one command installs the current release for Apple silicon Macs, Linux x86_64, or Linux arm64 into `~/.local/bin`: ```sh theme={null} curl -fsSL https://api-sandbox.darkbloom.dev/cli/install.sh | sh ``` While releases are served to invited accounts only, the installer needs an API key from the console (**Settings** → **API keys**), saved in a file only you can read. The installer refuses a key file others can read: ```sh theme={null} chmod 600 ~/.dbx-key curl -fsSL https://api-sandbox.darkbloom.dev/cli/install.sh | DARKBLOOM_SANDBOX_TOKEN_FILE=~/.dbx-key sh ``` A key an earlier `darkbloom-sandbox-cli login` stored is used by itself. `sh -s -- --dir DIR` installs elsewhere. Later, `darkbloom-sandbox-cli self-update` installs the service's current release in place. It keeps the binary it replaced as `darkbloom-sandbox-cli.previous` beside it, and refuses an older release unless you pass `--force`; `--check` only says what is available. Sign in, then list what you may run: ```sh theme={null} darkbloom-sandbox-cli login # opens a page in your browser: check the code, then approve darkbloom-sandbox-cli sizes # each size's vCPUs, memory, workspace, price per hour and platforms ``` ![Command-line login page in the sandbox console showing the code, the device name, the account and what approving does](https://mintcdn.com/eigenlabs-f49d2e97/2TtlNanikOmTAJr5/images/console/cli-login-approve.png?fit=max\&auto=format\&n=2TtlNanikOmTAJr5\&q=85\&s=bafcebaf856052deacc381551d59df91) The browser page that approves darkbloom-sandbox-cli login: check the code and approve it. Example data. `login` stores an API key (`dbx_sk_…`, valid 90 days by default, revocable in the console's settings) owner-only (mode 0600) in `~/.config/darkbloom-sandbox/`, for that service only. `login --paste` or `login --token-file PATH` stores a key you created in the console instead, and `DARKBLOOM_SANDBOX_TOKEN` passes one to automation. `logout` revokes the stored key and forgets it. ## Create sandboxes A Linux sandbox for builds. The default network policy reaches GitHub and the main package registries: ```sh theme={null} darkbloom-sandbox-cli create --size c16-m32 --idle-minutes 60 --max-minutes 480 --wait ``` A macOS sandbox for Xcode builds, with Homebrew. `--display vnc` lets you open its screen later with `darkbloom-sandbox-cli vnc sbx-…`: ```sh theme={null} darkbloom-sandbox-cli create --platform macos_arm64 --size mac-c8-m32 \ --egress allowlist --allow-set dev --allow-set homebrew \ --display vnc --idle-minutes 60 --max-minutes 480 --wait ``` `create` prints the sandbox's ID (`sbx-…`). `darkbloom-sandbox-cli list` and `status sbx-…` show each sandbox's state, time left, and cost so far. ![Sandbox console Sandboxes page listing sandboxes with state, size, image, egress, cost and ready time](https://mintcdn.com/eigenlabs-f49d2e97/2TtlNanikOmTAJr5/images/console/sandboxes-list.png?fit=max\&auto=format\&n=2TtlNanikOmTAJr5\&q=85\&s=0c076849639657a930eac9660ca0d78a) The Sandboxes page in the sandbox console: each sandbox's state, size, egress, cost so far and readiness. Example data. Network access is HTTPS (port 443) only, through a proxy that the sandbox already sets in `HTTPS_PROXY`. To reach a host outside the default, create the sandbox with an allowlist: * `--egress allowlist`, plus the hosts you need. * `--allow-set NAME` adds a named set of hosts. * `--allow-host HOST` adds one host. The [egress sets table](/sandboxes/create-and-connect#network-and-egress) lists every set. `darkbloom-builds`, for example, adds Zig, Go, Rust, and PyPI downloads. The allowlist is fixed when the sandbox is created. The largest sizes need the biggest Macs and may wait for capacity. If a create fails with `no_capacity`, retry, pick a smaller size, and keep work that does not need macOS on Linux. ## Connect ```sh theme={null} darkbloom-sandbox-cli ssh sbx-… # a shell: user agent on Linux, runner on macOS darkbloom-sandbox-cli ssh sbx-… -- uname -a # one command ``` For plain `ssh`, `scp`, `rsync`, `git`, and editors' remote SSH, write an SSH config entry for each sandbox: ```sh theme={null} darkbloom-sandbox-cli ssh-config --all > ~/.ssh/darkbloom-sandbox.conf # Make this the FIRST line of ~/.ssh/config: # Include ~/.ssh/darkbloom-sandbox.conf ``` * Each sandbox becomes a host named `darkbloom-` followed by 12 characters of its ID. * Run `ssh-config --all` again after you create or delete sandboxes. * Linux sandboxes allow port forwards (`ssh -N -L 8080:127.0.0.1:8080 darkbloom-…`). macOS sandboxes allow none. ## Bring your code Push from your machine over SSH. This works for private repositories, and no credential goes into the sandbox: ```sh theme={null} H=darkbloom-xxxxxxxxxxxx # a host name from ssh-config W=/workspace # on macOS: W=workspace (the workspace is in the login's home) ssh "$H" "git init -q --bare $W/app.git" git remote add sandbox "$H:$W/app.git" git push sandbox HEAD:main ssh "$H" "git clone -q $W/app.git $W/app" # Later: git push sandbox HEAD:main && ssh "$H" "cd $W/app && git pull -q" ``` To copy a working tree that is not committed: ```sh theme={null} rsync -a --exclude .git ./ "$H:/workspace/app/" ``` To clone from GitHub inside the sandbox instead: 1. Send a fine-grained, read-only token with `darkbloom-sandbox-cli secret set sbx-… GH_TOKEN < token-file`. 2. Point a git credential helper at the secret's file. The secret is sealed to that boot and lasts until the sandbox stops. See [secrets](/sandboxes/security#secrets). ## Keep tools in the workspace Only the workspace survives a stop: * `/workspace` on Linux. * `~/workspace` on macOS. Everything else, your home directory included, starts fresh at every boot. Install toolchains the image lacks, and point caches, into the workspace. For example, Zig on Linux: ```sh theme={null} cd /workspace ZIG=0.15.2 # your version curl -fsSL "$(curl -fsSL https://ziglang.org/download/index.json \ | jq -r --arg v "$ZIG" '.[$v]["aarch64-linux"].tarball')" | tar -xJ mv zig-*-"$ZIG" zig printf 'export PATH=/workspace/zig:$PATH\nexport ZIG_GLOBAL_CACHE_DIR=/workspace/.cache/zig\n' > env.sh ``` This download needs `--allow-set darkbloom-builds`, which includes `ziglang.org`. Run `source /workspace/env.sh` in each new login. On macOS: * `brew install` (with the `homebrew` set) installs into a directory that resets at every boot. * Keep Xcode's build output in the workspace: `xcodebuild -scheme App -derivedDataPath ~/workspace/DerivedData build`. ## Run builds in parallel Each sandbox is independent. Create several, then fan out from your machine: ```sh theme={null} for H in darkbloom-aaaa darkbloom-bbbb darkbloom-cccc; do ssh "$H" 'cd /workspace/app && make test' > "$H.log" 2>&1 & done wait ``` A sandbox stops after `--idle-minutes` with no client attached and no network traffic. **Work left running inside, in `tmux` or under `nohup`, does not keep it alive.** * Keep an SSH session open from your machine. The loop above does this. * `darkbloom-sandbox-cli keepalive sbx-… 45m` holds off the idle stop, but only within the first hour of a boot. * `darkbloom-sandbox-cli extend sbx-… 120` adds time before `--max-minutes`, up to 24 hours in total. An account runs 2 sandboxes at a time unless Darkbloom set another limit for you. See [limits](/sandboxes/limits-and-billing#limits). ## Let a coding agent drive it `darkbloom-sandbox-cli mcp` is an MCP server. With it, an agent such as Codex or Claude can: * create sandboxes * run commands in them * read and write files * stop the sandboxes again For Codex (`~/.codex/config.toml`): ```toml theme={null} [mcp_servers.darkbloom-sandbox] command = "darkbloom-sandbox-cli" args = ["mcp"] ``` Other clients and the full tool list are in [coding agents](/sandboxes/agents-and-mcp) and [MCP server tools](/sandboxes/mcp-tools). **Teach the agent how to use the sandboxes.** The tools say what an agent can do, not when to do it. Install the [sandbox skill](/sandboxes/agent-skill) as `.claude/skills/darkbloom-sandboxes/SKILL.md` so the agent knows when offloading pays off, how to push code without putting a token in a sandbox, what keeps a long build alive, and to stop what it started. ## Stop or delete ```sh theme={null} darkbloom-sandbox-cli stop sbx-… # keeps the workspace; a stopped sandbox costs nothing darkbloom-sandbox-cli resume sbx-… # the same workspace, on the same Mac darkbloom-sandbox-cli delete sbx-… # erases the workspace ``` * **Billing:** per second from the moment a sandbox is ready, with a one-minute minimum. See [billing](/sandboxes/limits-and-billing#billing). * **Retention:** a sandbox stopped for 30 days is deleted. ## Before you rely on it * **Only the machine that created a sandbox can reach it.** The CLI keeps each sandbox's keys in `~/.config/darkbloom-sandbox/`. Do not delete those records. * **macOS capacity is small.** A create can fail with `no_capacity`: retry, pick a smaller size, and keep work that does not need macOS on Linux. * **What the machines can't do:** sandboxes are arm64 only. There are no virtual machines inside a sandbox, and no GPU on Linux. * **The network:** HTTPS only, through the proxy. There is no DNS inside, so a tool that ignores `HTTPS_PROXY` cannot connect. * **Your workspace is encrypted on the Mac, but Darkbloom can decrypt it,** and a sandbox is not yet confidential from the Mac's owner. Keep production credentials out. See [security](/sandboxes/security). * **When a command fails,** [troubleshooting](/sandboxes/troubleshooting) lists each error and what to do. # Agent sandbox security and privacy Source: https://docs.darkbloom.dev/sandboxes/security What each boot attests, what is encrypted, what Darkbloom can and cannot see, how secrets work, and which confidentiality claims the product does not yet make. > [!WARNING] > > Darkbloom can decrypt your workspace, and agent sandboxes do not yet claim > confidentiality from the owner of the Mac they run on. Do not keep production > credentials or regulated data in a sandbox. ## Attestation Each boot comes with a statement that the Mac's Darkbloom agent asserts with an Apple App Attest key: what runs (the qualified agent build, the image, kernel, and VM configuration, the egress policy) and the keys the guest generated, bound to the fresh nonce your CLI chose and to your SSH key, whose private half only you hold. Your CLI checks it against Apple's App Attest root, the Darkbloom release key compiled into it (which signs the list of qualified builds), and Darkbloom's build-revocation list, before `ssh`, `vnc`, `codex`, `secret set`, and the MCP server's `sandbox_exec`, and pins the host key the boot attests: your CLI accepts no other host key for that boot. `darkbloom-sandbox-cli attest sbx-…` prints what it attests. ## Your connection `ssh`, `vnc`, and `codex` traffic is encrypted end to end between your machine and the attested guest: Darkbloom's gateway relays it and cannot read it in transit. The Mac's owner controls the machine the guest runs on, so this is not a claim of confidentiality from them. See [what is not claimed yet](#what-is-not-claimed-yet). ## Your workspace Your workspace is stored encrypted on the Mac. Its key is kept by Darkbloom and released, sealed to the boot's attested key, only to an attested boot. **Darkbloom can decrypt your workspace**: do not keep anything there you would not trust Darkbloom with. The encryption does not detect tampering: the Mac's owner could corrupt or roll back parts of it, and the sandbox would not notice. ## Secrets Send a secret with: ```sh theme={null} darkbloom-sandbox-cli secret set sbx-… NAME < value ``` Secrets are sealed on your machine to that boot's attested key and land as `/run/secrets/NAME` in the guest (on macOS, in its RAM disk at `/private/var/run/darkbloom-ram/secrets/NAME`). The service carries them sealed and does not open them. A secret lasts one boot (it is sealed to that boot's key): send it again after each resume. Each is 1 byte to 64 KiB, at most 32 per sandbox. ## What Darkbloom records Darkbloom records: * account, sandbox, and Mac identifiers; * sizes, platforms, states, and the reasons for them; * timestamps, billed seconds, and charges; * your SSH public key and the device name `login` registered; * the hostnames you allow; * the hostnames of connections the gateway refused; * per-sandbox connection and byte counts at the gateway, kept per boot for 90 days, for abuse handling and any daily egress limit; * the IP addresses your requests come from (access logs). Outbound HTTPS goes through the gateway, which sees each destination hostname and how much flows, not the encrypted content. Darkbloom does not record what you type, your screen, or your files. ## What is not claimed yet Agent sandboxes are an early product. Darkbloom does not yet claim that a sandbox is confidential from the owner of the Mac it runs on: the hardware checks that would back that claim are still being completed. Treat a sandbox as a convenient, isolated development environment, not as a place for production credentials or regulated data. Report anything that looks like a security issue to your Darkbloom contact at once, rather than testing it further. # Troubleshooting agent sandboxes Source: https://docs.darkbloom.dev/sandboxes/troubleshooting What each agent sandbox error means, from access and capacity to resume, billing, attestation, and the screen lock, and what to do next. Every message the CLI prints has a next step. The tables below group them by where they happen. ## Access Until your account is granted sandboxes, the sandbox API answers as if it did not exist. The CLI says: ```text theme={null} the plane found nothing for this account (404 not_found: …): agent sandboxes may be off on https://api-sandbox.darkbloom.dev/, or the account may not be allowlisted for them. They are by invitation: ask your Darkbloom contact for access, … ``` Send the Account ID the console shows under **Settings** and the platforms you need to your Darkbloom contact. A grant of one platform does not cover the other. ## Create and placement | You see | What it means | What to do | | - | - | - | | `no Mac has room for a c4-m8 linux_arm64 sandbox right now, so sbx-… did not start (failed: no_capacity)` | The fleet had no room for that size. Nothing was charged. | Retry in a few minutes, or choose a smaller size (`sizes`). | | `create` waits a few seconds and goes on after `the request did not finish` or a lost connection | Its answer was lost. `create` finds the sandbox the service made by the nonce it sent, or sends the same create again (twice at most). | Nothing. If it still fails it names the nonce: `list` shows the sandbox if the service made it; `delete` it if you do not need it. | | `create` says `sbx-… waits for a Mac: reading it until it is placed` | Darkbloom accepted the sandbox and is still finding it a Mac. `create` waits, because it records the image the sandbox boots, which is known once it has a Mac. | Nothing: it goes on by itself, for up to 5 minutes. If you interrupt it (Ctrl-C), the sandbox is left without a record on this computer: delete it with the command that line names, `darkbloom-sandbox-cli delete sbx-…`. | | `sbx-… was created but no Mac took it within 5 min; deleted sbx-…` | No Mac took the sandbox while `create` waited, so `create` deleted it (it had no record yet, so nothing was using it). | Create it again later (with a new `--nonce` if you passed one), or with another size (`darkbloom-sandbox-cli sizes`). | | `sbx-… was created but …: delete it with darkbloom-sandbox-cli delete sbx-…` | `create` could not follow the sandbox to its Mac, or could not delete it once it gave up (the service did not answer, or refused), so the sandbox is left without a record on this computer. | Run that command once the service answers again. | | `the plane answered a read of sbx-… with …: refused, nothing was recorded, and sbx-… was not deleted` | While `create` waited, the service answered with another sandbox than the one this create made. `create` trusts no such answer: it records nothing and deletes nothing. | Check the sandbox with the `status … --json` command the message names (its `nonce` is this create's if it is yours); if it is yours, delete it with the `delete` command the message names. Tell your Darkbloom contact. | | `sbx-… was created but is gone` | The sandbox was deleted while `create` waited (from another client, or by Darkbloom). | Nothing to clean up: create another if you need one. | | `sbx-… stopped … before this create recorded it`, or `was deleted … before this create recorded it` | Another client (the console, another CLI) stopped or deleted the sandbox while `create` waited, so `create` failed and recorded nothing. | A stopped one cannot be resumed from this computer: delete it with the command the message names, and create another. | | `…: this client has a record of sbx-…, so create does not delete it`, or `… while this create waited for its placement …: this client's record of sbx-… is left as it was` | A create repeated with `--nonce` found its sandbox, which this computer already recorded, still waiting for a Mac (or stopped or deleted meanwhile). `create` never deletes a sandbox it has a record of. | `darkbloom-sandbox-cli status sbx-…` shows it. Run the same create again later, or `delete` the sandbox if you do not need it. | ## Resume | You see | What it means | What to do | | - | - | - | | `the Mac that holds sbx-…'s workspace has no room for it right now … (409 no_capacity)` | A resume runs only on its workspace's Mac, which is busy. | Retry `resume` in a few minutes. | | `the Mac that holds this sandbox's workspace has just restarted …` (or `… is downloading the image this sandbox boots from …`, `… is reconnecting to Darkbloom …`) `… nothing changed and the sandbox is still stopped` | That Mac is not busy, only getting ready: after a Darkbloom update or a restart it takes sandboxes again within a minute or two. Nothing was charged and the retry costs nothing. | Run the same `resume` again in a minute (a few seconds for `reconnecting`). | | `the Mac that holds sbx-…'s workspace is offline or not taking sandboxes … (409 host_unavailable)` | That Mac is away; the workspace is kept on it. | Retry `resume` once it is back; `status` shows since when it is offline and until when the workspace is kept. | | `the Mac that held sbx-…'s workspace was removed, so sbx-… cannot resume … (409 host_removed)`, or `status` says `its Mac was removed` | That Mac left the fleet for good; the sandbox no longer counts toward your storage. | `delete` it; no retry will resume it. | | `sbx-… was not resumed: the plane boots … from image … now, … (409 upgrade_required)` | Darkbloom moved the image pin. | See [image upgrades](/sandboxes/lifecycle#image-upgrades). | | `sbx-… is already running (ready), so there is nothing to resume` (or `already starting`, `still stopping`) (`409 conflict`) | `resume` boots only a stopped sandbox; nothing changed. | Use it (`ssh`), or wait until `status` says stopped and resume again. | | `a resume of sbx-… is saved and its outcome is not known yet` | An earlier `resume` lost the service's answer, or its workspace's Mac had no room or was offline (or, with an older CLI, `resume` was run on a running sandbox). | Run `darkbloom-sandbox-cli resume sbx-…`: it sends the saved resume again, which settles it. If it still says so while the sandbox runs, stop the sandbox, then resume it. | ## Billing | You see | What it means | What to do | | - | - | - | | `… the account's balance could not cover the hold for its boot (failed: unfunded)` | Your balance cannot hold an hour of the size. | Add funds, then run the command again. | | `: Darkbloom's billing could not charge for it (billing_lapsed), a problem on Darkbloom's side, not the account's` (or `unbillable`) | Darkbloom's side. | Resume it in a few minutes (a create that did not start, `failed: unbillable`: run the create again); the workspace is kept. | ## Stops | You see | What it means | What to do | | - | - | - | | stopped `after 15 idle minutes with no client attached and no traffic` | The idle limit. | See [idle limit, keepalive, and maximum](/sandboxes/lifecycle#idle-limit-keepalive-and-maximum): keepalive, or keep a client attached. | | stopped `at its maximum of 240 minutes per boot` | The maximum. | `resume`; next time `--max-minutes` or `extend`. | | `: its Mac went offline while it ran` (`host_lost`) | The Mac disappeared; billing stopped then. | `resume` when the Mac is back (persistent sandboxes), unless `status` says `its Mac was removed`: then `delete` it. | ## Attestation | You see | What it means | What to do | | - | - | - | | `: its boot failed attestation` (`verification_failed`) | The service could not verify the boot's statement, so the boot never became ready (and was not billed). | Create a new sandbox; tell your Darkbloom contact. | | `ssh`, `vnc`, or `attest` refuses to connect because verification failed, or the build is revoked | Your CLI could not prove the boot runs a Darkbloom-qualified build on a genuine Mac (or Darkbloom revoked that build). | Do not work around it (no other client, no unattested key): delete the sandbox, create a new one, and report it. This check is what makes the guarantees in [security](/sandboxes/security) hold. | ## Limits and the desktop | You see | What it means | What to do | | - | - | - | | `409 limit_reached`, `429 rate_limited` | A per-account limit or the start rate. | See [limits](/sandboxes/limits-and-billing#limits). | | `sbx-…'s screen is locked. …`, or a macOS desktop that shows only the wallpaper and takes no input | The desktop is locked: macOS locks it after 20 minutes without input unless a CLI connection turned that off earlier in the boot (or something in the sandbox locked it). | `stop` and `resume` it, then connect within 20 minutes. See [the desktop (VNC)](/sandboxes/create-and-connect#the-desktop-vnc). | A host outside the egress policy fails inside the guest with `curl: (56) CONNECT tunnel failed, response 403`; see [network and egress](/sandboxes/create-and-connect#network-and-egress). # Verifying provider attestation on Darkbloom Source: https://docs.darkbloom.dev/security/attestation How Darkbloom verifies a provider's identity and build with Apple App Attest, what the public attestation endpoint exposes, and how to read per-response verification headers. Attestation is how Darkbloom decides that a provider is a genuine Mac running a qualified build before it receives work. On macOS 27 or later the supported verification is **Apple App Attest**. Darkbloom no longer uses MDM, and Apple Managed Device Attestation (MDA) is historical; those paths grant nothing. A provider verified before the App Attest migration may keep a frozen legacy authorization, but no new machine can join it. ## What attestation proves A provider admitted to the public fleet has demonstrated: 1. It is running a signed provider build whose code and runtime hashes the coordinator accepts. 2. It holds a current App Attest serving authorization: Apple attested a key the signed provider app holds on that Mac, and the coordinator verified a fresh assertion from it for an approved provider build. A legacy Secure Enclave authorization, where present, is historical evidence frozen at the migration; it is not a path a new provider can take. 3. Its connection has a registered X25519 key for the mandatory coordinator-to-provider encryption hop. Attestation is not proof of computation correctness. It does not certify RAM or chip reports, guarantee memory wiping, or remove the coordinator or the provider process as plaintext endpoints. ## App Attest On macOS 27 or later, the provider proves itself with App Attest. The coordinator verifies the assertion, the qualified executable and the build policy, then issues a bounded authorization with an expiry. A provider can remain connected while its authorization is pending or expired, but it does not receive public work until a current grant exists. Recurring receipt monitoring and stricter reward or removal decisions are separate from basic serving. An App Attest grant is not a reusable serving credential. A reply waiting for verification does not create a trust grace period, and a local `doctor` pass is not a coordinator verdict. ## Legacy authorization A provider verified before the migration may hold legacy authorization. The coordinator checks the Secure Enclave registration signature, the live connection's posture and the challenge freshness. This path is frozen to already-verified machines: a new machine cannot join it, MDM and MDA play no part, and an unsupported macOS version does not create a legacy fallback. Its `hardware` trust level is historical, and no current provider is granted it. See [Trust levels](/security/trust-levels). ## Public attestation endpoint ```bash theme={null} curl https://api.darkbloom.dev/v1/providers/attestation ``` No authentication is required. The response contains one record per connected public provider. Private-only connections are excluded; their owners can see them through authenticated `GET /v1/me/providers`. See the [attestation reference](/reference/attestation) for every field. Each record includes: * `provider_id` — the connection ID, also returned as `X-Provider-Id`. * `app_attest_authorized` and `authorization_expires_at`, when an App Attest grant exists. * `verification` — `observed_at`, plus `app_attest` and the historical `legacy` path, each with a `state` (`verified`, `pending`, `expired`, `revoked`, `unsupported` or `offline`) and optional `verified_at` / `expires_at`. * `trust_level` — `none`, `self_signed` or `hardware`. These describe legacy evidence; `hardware` is historical. * `status` — `online`, `offline`, `untrusted`, and so on. * Hardware class and served models: `chip_name`, `hardware_model`, `memory_gb`, `gpu_cores`, `models`. * Security posture as signed by the provider: `secure_enclave`, `sip_enabled`, `secure_boot_enabled`, `authenticated_root_enabled` and an optional `system_volume_hash`. * `se_public_key` — the persistent legacy Secure Enclave P-256 public key. * `mdm_verified`, `acme_verified` (always `false`), `mda_verified` and the optional MDA OS versions. These are historical and `true` only for a legacy `hardware`-trust connection; they grant nothing. The response deliberately omits the hardware serial number, UDID, APNs device token, the raw Apple MDA certificate chain and the `code_attested` flag. The MDA leaf embeds serial and UDID in signed OIDs, so publishing the chain would disclose them. ## Per-response signals Once a provider is committed to a request, the coordinator writes: | Header | Meaning | | - | - | | `X-Provider-Id` | Connection ID, joinable to the public endpoint | | `X-Provider-Authorization-Method` | `app_attest`, `legacy`, `dual` or `none` | | `X-Provider-Verification` | Compact JSON with the frozen `observed_at`, `app_attest` and `legacy` states | | `X-Provider-Trust-Level` | `none`, `self_signed` or `hardware` (legacy evidence; `hardware` is historical) | | `X-Provider-Attested` | `true` or `false` | | `X-Provider-Encrypted` | `true` when the provider has a registered X25519 key | | `X-Provider-Secure-Enclave` | `true` or `false` | | `X-Provider-Mda-Verified` | Historical; present only for a legacy connection that still carries MDA evidence, and it grants nothing | | `X-Provider-Chip`, `X-Provider-Model` | Hardware class | | `X-Attestation-Se-Public-Key` | The provider's legacy Secure Enclave P-256 public key (base64) | These are coordinator assertions over TLS, not Apple-signed receipts. A successful body may also carry optional provider-generated `se_signature` and `response_hash` fields; they are not headers and are not present on every response. Pin a provider identity by comparing `X-Attestation-Se-Public-Key` with `se_public_key` across requests. ## Reading the method `X-Provider-Authorization-Method` tells you which path admitted the request. `X-Provider-Verification` carries the frozen states; missing fields mean the snapshot is unavailable, so do not infer a method from `trust_level` or the MDA flags alone. A legacy `self_signed` field can coexist with a valid App Attest grant. # How Darkbloom protects your prompts Source: https://docs.darkbloom.dev/security/overview Darkbloom encrypts requests in transit, keeps prompt content out of logs, and runs the coordinator in a Confidential VM. The provider process and the coordinator do see plaintext while handling a request. An inference request passes through infrastructure you do not own: the Darkbloom coordinator and a provider Mac. This page states what the encryption and runtime protections do, and what they do not do. ## The privacy model in one paragraph Your request is encrypted between you and the coordinator if you seal it, and is always encrypted between the coordinator and the provider that runs the model. The coordinator decrypts the request in memory to route and bill it, and writes no prompt text or completion to logs or storage. The provider process decrypts it because it runs the model, so it sees the prompt and completion in plaintext. This is not end-to-end encryption between you and the provider. ## Encryption * **Consumer to coordinator (optional).** You can seal the request body to the coordinator's published X25519 key (`GET /v1/encryption-key`). The response comes back sealed to your ephemeral key with `X-Eigen-Sealed: true`. If sealing is not configured, or you send plain JSON, this hop is TLS only. * **Coordinator to provider (mandatory).** The coordinator re-encrypts each request with the provider's registered X25519 key before forwarding it over the provider WebSocket. A provider without a registered key is never selected. * **Provider to coordinator (mandatory).** Response chunks are encrypted on the same hop. A provider that returns a plaintext or wrong-key chunk is marked `untrusted` and the request fails rather than being served insecurely. A sealed request cannot use a remote `image_url`: the coordinator will not fetch media on behalf of a sealed body. ## The coordinator The coordinator runs in a GCP Confidential VM using AMD SEV. Its memory is encrypted by the hardware, so the hypervisor host cannot read coordinator state. The coordinator is still a trust boundary, not a blind relay: it opens the request in memory to apply the request contract, route it, reserve balance and settle usage. ## Logs and retention The coordinator records metadata — request and trace IDs, model, sampling parameters, token counts, latency, the selected provider and your account identity — but not prompt text or response content. Content-derived artifacts are limited to keyed digests used for cache routing. ## The provider process The provider runs a hardened process. Debugger attachment is refused with `PT_DENY_ATTACH`, Hardened Runtime blocks memory-reading APIs and code injection, and core dumps are disabled before inference data enters the process. System Integrity Protection must stay on; with SIP off, an administrator can read a running process's memory. Attestation and routing gates reduce that risk but do not make the Mac owner cryptographically unable to read the process. ## Verifying a provider * `GET /v1/providers/attestation` publishes the coordinator's verification snapshot for public providers, including the App Attest or legacy method state and the legacy trust level. * Per-response headers name the provider, the authorization method, the verification snapshot and the provider's Secure Enclave public key. * A qualified signed build is checked before routing. The coordinator does not publish raw Apple certificates or receipts. See [Attestation](/security/attestation) and [Trust levels](/security/trust-levels). # Understanding provider trust on Darkbloom Source: https://docs.darkbloom.dev/security/trust-levels How Darkbloom decides which provider Macs may serve your requests: Apple App Attest plus Secure Enclave attestation, and what the trust_level field means today. Every provider that serves public requests on Darkbloom is authorized by **Apple App Attest** and attested by its **Secure Enclave**. This page explains what that means for your prompts and how the older `trust_level` field relates to it. `trust_level` describes legacy attestation evidence, not the serving decision. Read `X-Provider-Authorization-Method` and `X-Provider-Verification` on a response for the serving decision, and `app_attest_authorized` on the public endpoint. ## App Attest authorization A provider serves public requests only while the coordinator authorizes its connection with App Attest: * Apple has attested a key held by the signed Darkbloom provider app on that Mac (macOS 27 or later). * The coordinator verifies a fresh assertion from that key, for an approved provider build, and renews the authorization only with new assertions. * The provider's **Secure Enclave** identity signs its attestation blob, and a **challenge-response** re-confirms SIP and Secure Boot every 5 minutes; a provider whose posture changes is removed from routing. You can see each provider's current authorization in `app_attest_authorized` from [`GET /v1/providers/attestation`](/reference/attestation). ## The trust_level field * `none` — no legacy trust grant. The provider may still be authorized through App Attest; the `verification` object says which. * `self_signed` — the Secure Enclave attestation and challenge-response above. App Attest-authorized providers report this level. * `hardware` — historical. It was granted through Darkbloom MDM and Apple Managed Device Attestation, which Darkbloom no longer uses. No current provider is granted it, and it adds nothing to the guarantees above. A provider can retain a `self_signed` field while its serving path is App Attest. The label alone does not prove current challenge freshness or current serving authorization. ## What it means for your privacy Every serving provider gives your prompts the same runtime protections: the mandatory coordinator-to-provider encryption hop, the Hardened Runtime, SIP-enforced anti-debugging and build hash checks, backed by App Attest and the Secure Enclave. The provider process decrypts the request because it runs the model, so it necessarily sees the prompt and completion in plaintext, and the coordinator opens the request in memory to route and bill it. This is not end-to-end encryption. Attestation limits which Mac receives a request; it does not make the Mac owner unable to read the process. ## Checking a response Use the response headers: * `X-Provider-Authorization-Method` — `app_attest`, `legacy`, `dual` or `none`. * `X-Provider-Verification` — the frozen method states and timestamps. * `X-Provider-Trust-Level` — the legacy level. * `X-Provider-Attested` — the coordinator's attestation flag. See [Attestation](/security/attestation) for the full header list and the public endpoint.