# C3 Docs

> C3 runs GPU and CPU jobs on cloud hardware for researchers, engineers and coding agents. Describe a job in a .c3 YAML file, run c3 deploy or use the hosted MCP server, and C3 provisions the machine, runs the script and returns the results.

- [C3 Docs](https://docs.cthree.cloud/index.md)

## artifacts

- [Artifacts](https://docs.cthree.cloud/artifacts.md): Which files a job keeps, how to download them, and how to feed one job's results into the next.

## authentication

- [Authentication and API keys](https://docs.cthree.cloud/authentication.md): Signing in, verifying your email, and using API keys from scripts, CI and agents.

## cli

- [CLI reference](https://docs.cthree.cloud/cli.md): Every c3 command, its flags and its output.

## concepts

- [How C3 works](https://docs.cthree.cloud/concepts.md): What C3 does with your script, from deploy to results.

## configuration

- [Project configuration](https://docs.cthree.cloud/configuration.md): Every field in the .c3 file, what c3 deploy uploads, and how to exclude files.

## datasets

- [Datasets](https://docs.cthree.cloud/datasets.md): Upload data once, mount it in any job, and pin versions for reproducibility.

## environments

- [Environments](https://docs.cthree.cloud/environments.md): Choose how C3 prepares the machine before your script runs, with a working example of each mode.

## errors

- [Errors](https://docs.cthree.cloud/errors.md): Every user-visible error code, what it means and what to do.

## examples

- [Examples](https://docs.cthree.cloud/examples.md): Ready-to-run projects in the c3-examples repository.

## hardware

- [Hardware and capacity](https://docs.cthree.cloud/hardware.md): Which GPUs and CPUs you can request, how to check price and availability, and what happens when capacity runs out.

## mcp

- [MCP server](https://docs.cthree.cloud/mcp.md): Connect Claude Code, Cursor, Codex, ChatGPT, VS Code or claude.ai to C3 and let an agent list hardware, deploy jobs, follow logs and collect results with nothing installed.

## pricing

- [Pricing and plans](https://docs.cthree.cloud/pricing.md): What a job costs, how credit is reserved and refunded, and what each plan allows.

## telemetry

- [Telemetry and privacy](https://docs.cthree.cloud/telemetry.md): What the CLI reports to C3 on each deploy, and what it never sends.


---

# Full Documentation Content

# Artifacts

Artifacts are the files a job keeps: plots, metrics, checkpoints, trained weights. Everything else on the machine is discarded when the job ends.

## What is collected[​](#what-is-collected "Direct link to What is collected")

Two places, both collected into the job's results:

* `$C3_ARTIFACTS_DIR`, a directory that exists in every job.
* Any directory listed under `output:` in `.c3`, relative to your workspace.

```
import os, json
with open(os.path.join(os.environ["C3_ARTIFACTS_DIR"], "metrics.json"), "w") as f:
    json.dump(results, f)
```

```
output:
  - ./results
  - ./checkpoints
```

Collection happens after your script exits. If the script succeeds but the upload fails, the job is marked `FAILED` with reason `UPLOAD_ERROR`; contact support with the report code, since the compute already ran. If the script fails, times out or is cancelled, C3 still tries to upload whatever was written.

## Download[​](#download "Direct link to Download")

```
c3 pull job_abc123             # into ./job_abc123/
c3 pull job_abc123 results     # only the results/ folder
c3 pull                        # previously undownloaded jobs among the latest 100 succeeded jobs
c3 pull job_abc123 --json      # machine-readable report instead of progress
```

Results are also browsable with the data commands, at two equivalent paths:

```
c3 data ls /jobs/job_abc123/
c3 data ls /projects/my-project/jobs/job_abc123/
c3 data cp /jobs/job_abc123/ ./output/
```

## Reuse results in another job[​](#reuse-results-in-another-job "Direct link to Reuse results in another job")

Mount a finished job's artifacts directly, without downloading, using `c3 deploy --storage=legacy` with this `.c3` block. The default JuiceFS pathway uses [persistent data resources](https://docs.cthree.cloud/datasets.md#persistent-workspaces-and-working-data) and does not accept dataset-version mounts:

```
datasets:
  - ref: /jobs/job_abc123
    mount: /data/previous
```

This is how to build pipelines. Preprocess in one job, train in the next with `ref: /jobs/<preprocess-job>`, evaluate in a third with `ref: /jobs/<train-job>`. The data never leaves C3 storage.

## Storage usage[​](#storage-usage "Direct link to Storage usage")

Artifact bytes count towards your storage usage, shown by `c3 balance`. There is no storage quota on any plan. See [Pricing and plans](https://docs.cthree.cloud/pricing.md#storage).


---

# Authentication and API keys

## Sign in[​](#sign-in "Direct link to Sign in")

```
c3 login       # opens the browser; credentials are stored in ~/.c3/
c3 whoami      # user, email, verification status, organisation
c3 logout
```

New accounts must verify their email address before running jobs, using data or billing. If you miss the email, `c3 verify-email` sends another. Until then, commands fail with `EMAIL_VERIFICATION_REQUIRED`.

The [dashboard](https://cthree.cloud/dashboard) uses the same login.

## API keys[​](#api-keys "Direct link to API keys")

Use an API key wherever a browser login is impractical: CI, a shared machine, a coding agent, or billing several people to one organisation.

```
c3 apikey create ci-runner     # prints the key once: c3_key_...
c3 apikey list
c3 apikey revoke <key-id>
```

Keys can also be created on the [dashboard settings page](https://cthree.cloud/dashboard/settings). A key belongs to the organisation that created it, and jobs submitted with it are owned and billed there.

### Use a key[​](#use-a-key "Direct link to Use a key")

Preferred: an environment variable, from your shell or your CI secret store.

```
export C3_API_KEY=c3_key_...
c3 deploy
```

Alternatively, put it in `.c3`:

```
api_key: c3_key_...
```

`c3 deploy` strips `api_key` from the copy of `.c3` it uploads, so the key never reaches the job. It does not strip anything else. Keep a `.c3` that contains a key out of version control.

When several credentials are present, `api_key` in `.c3` wins, then `C3_API_KEY`, then `C3_AUTH_TOKEN`, then the saved `c3 login` session. `c3 whoami` shows which one is active.

### If a key leaks[​](#if-a-key-leaks "Direct link to If a key leaks")

Revoke it immediately with `c3 apikey revoke` and create a new one. A revoked key fails with `403`.

## Coding agents[​](#coding-agents "Direct link to Coding agents")

The MCP server accepts either a browser login (OAuth) or an API key header, depending on the host. See [MCP server](https://docs.cthree.cloud/mcp.md#two-ways-to-authenticate).


---

# CLI reference

```
curl -fsSL https://cthree.cloud/install.sh | sh   # install (Linux, macOS)
c3 update                                         # update to the latest release
c3 version
```

`c3 docs` prints every page of this site as plain text, for piping into an agent or a file.

## Reconcile a persistent workspace[​](#reconcile-a-persistent-workspace "Direct link to Reconcile a persistent workspace")

After a job writes to a persistent workspace, local edits may conflict with its new remote revision. Fetch the remote files into a new directory before merging those edits:

```
# Run in the workspace root containing .c3.
c3 workspace fetch my-workspace ../workspace-fetched --script job.sbatch
# Review both trees and copy your intended local edits into workspace-fetched.
cd ../workspace-fetched
c3 deploy job.sbatch --storage=juicefs --workspace my-workspace
```

`--script` is optional when `.c3` already names the submission script. Fetch uses the same script/ignore selection and sanitized config bytes as deploy for its baseline, while retaining every exported file locally. It verifies the exact resource revision, export manifest and file checksums before writing that baseline. Fresh checkouts without a CLI sync record can also fetch an existing workspace: the CLI finds it by the project in `.c3` and the supplied workspace name within your authenticated organisation. This reuses the resource without allocating another workspace. An existing invalid or mismatched sync record still refuses. It never overwrites the original checkout or an existing destination, uploads files, creates a resource, or submits a job. Pending imports must be reconciled first; a remote revision change during the download refuses the new baseline. If another job writes remotely, repeat the fetch into another new directory before reconciling further local edits, including Python lockfile updates. Older workspaces may contain a Python environment from the previous runtime. To retain that remote cache while fetching code, use:

```
c3 workspace fetch my-workspace ../workspace-code --preserve-python-cache
```

This omits exactly `.c3-runtime/python` from the new local checkout while keeping the remote environment and its interpreter symlinks. Other regular files, including `.c3-runtime` siblings, are fetched. Normal additive deploys preserve the omitted remote cache; this is a code checkout, not a complete local copy. Symlinks outside that cache still refuse. Without the flag, full exports retain their strict symlink refusal. The JSON receipt includes every `read_operations` ID and the exact `preserved_remote_prefixes`; inspect a reported retained read operation before retrying after an uncertain response.

Do not edit `.c3-runtime-sync-*` records yourself. A failed local publication may leave a partial new directory for inspection; its baseline is installed last.

This command reconciles files on the CLI host; hosted MCP/dashboard clients use the existing runtime resource export/download operations instead.

## Jobs[​](#jobs "Direct link to Jobs")

### c3 deploy[​](#c3-deploy "Direct link to c3 deploy")

Submit a job from the `.c3` in the current folder or any parent.

```
c3 deploy [script] [-f] [-v] [-p <provider>] [--json] [--dry-run] [--list-files] [--storage juicefs|legacy]
```

| Flag                                | Effect                                                                                                                                                                                                  |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--storage juicefs\|legacy`         | Storage pathway; defaults to JuiceFS. Legacy is an explicit compatibility choice.                                                                                                                       |
| `--environment-delivery nydus\|oci` | Container delivery; defaults to Nydus. OCI keeps persistent storage and downloads the ordinary image.                                                                                                   |
| `--workspace <name>`                | Persistent workspace name within the project. Omitted, a fresh checkout gets its own private workspace and reuses it on every later deploy; name one explicitly to share a workspace between checkouts. |
| `--data-resource <name=id[:ro]>`    | Attach a persistent data resource; writable unless `:ro` is supplied. Repeat for multiple resources.                                                                                                    |
| `-f`, `--follow`                    | Stream logs until the job finishes                                                                                                                                                                      |
| `-v`, `--verbose`                   | With `-f`, include system and agent log streams                                                                                                                                                         |
| `-p`, `--provider <id>`             | Pin a provider for this run                                                                                                                                                                             |
| `--json`                            | Print the submitted job as one JSON object. Not with `-f`                                                                                                                                               |
| `--dry-run`                         | Show the route, rate and availability. Nothing is uploaded                                                                                                                                              |
| `--list-files`                      | Print the files that would be uploaded and exit. No sign-in needed                                                                                                                                      |
| `[script]`                          | A legacy `.sbatch` script instead of `.c3`                                                                                                                                                              |

Plain `c3 deploy` publishes the workspace through owned storage (verified and published by the control plane) and runs it on persistent JuiceFS storage; `c3 deploy --storage=legacy` uses the existing presigned storage and execution path. There is no automatic fallback between them. The option applies both to `.c3` projects and script arguments.

For legacy script submissions (`c3 deploy job.sbatch`), the CLI looks for a project `.c3` from the workspace folder upward, skipping directories named `.c3`, such as the credential store at `~/.c3`. If none exists, it writes a generated project name. If it cannot read the project name from the workspace's own `.c3`, it moves that file to `.c3.broken-<unix time>` and writes a starter config with a new generated project name, `script: run.sh`, `hardware: l40`, `time: "01:00:00"`, and `output: [./results]`. It also sets `python.project: ./` when both `pyproject.toml` and `uv.lock` exist. The flight plan reports the replacement and backup filename; inspect the backup to recover custom settings. An unreadable parent config remains an error and is not replaced. Config-based `c3 deploy` (without a script argument) still reports config-loading errors.

### c3 squeue[​](#c3-squeue "Direct link to c3 squeue")

```
c3 squeue [-n <count>] [--json]
c3 squeue <job-id> [--json]
```

Lists every active job plus the most recent finished ones (`-n`, default 10). With a job ID, shows one job in full: route, latest attempt and failure diagnosis.

### c3 logs[​](#c3-logs "Direct link to c3 logs")

```
c3 logs <job-id> [-f] [-v]
```

Prints setup progress and your script's stdout and stderr. `-f` tails until the job ends.

### c3 cancel[​](#c3-cancel "Direct link to c3 cancel")

```
c3 cancel <job-id>
```

Stops a pending or running job. Time already used is billed.

### c3 pull[​](#c3-pull "Direct link to c3 pull")

```
c3 pull [job-id] [folder] [--json]
c3 pull --all [--json]
```

Downloads a job's artifacts into `./<job-id>/`. With no ID, downloads previously undownloaded jobs among the latest 100 succeeded jobs. `folder` limits the download to one artifact directory.

### c3 init[​](#c3-init "Direct link to c3 init")

Writes a starter `.c3` in the current folder.

### c3 migrate[​](#c3-migrate "Direct link to c3 migrate")

```
c3 migrate job.sbatch
```

Converts a Slurm script's `#SBATCH` directives into a `.c3`.

## Data[​](#data "Direct link to Data")

```
c3 data ls [-l] [-R] <path>        # datasets, versions or files
c3 data cp <src> <dst>             # upload or download; local paths one side, /datasets or /jobs the other
c3 data rm [-r] [-f] [-n] <path>   # delete a version, or a dataset with -r; -n is a dry run
c3 data du [--dedup] <path>        # storage used
c3 data log [-n <count>] <path>    # version history
```

Path forms: `/datasets/<name>/`, `/datasets/<name>/@<version>/`, `/datasets/<name>/@latest/`, `/jobs/<job-id>/`, `/projects/<project>/jobs/`. See [Datasets](https://docs.cthree.cloud/datasets.md).

## Hardware[​](#hardware "Direct link to Hardware")

```
c3 list [--all] [--class <class>] [--provider <id>] [--json]
```

Shows classes, profiles, providers, prices and availability. `-al` is short for `--all`. See [Hardware and capacity](https://docs.cthree.cloud/hardware.md).

## Account[​](#account "Direct link to Account")

```
c3 login            # sign in through the browser; credentials stored in ~/.c3/
c3 logout
c3 whoami [--json]  # user, email, verification status, organisation
c3 verify-email     # resend the verification email
c3 apikey create <name>
c3 apikey list
c3 apikey revoke <key-id>
```

See [Authentication and API keys](https://docs.cthree.cloud/authentication.md).

## Billing[​](#billing "Direct link to Billing")

```
c3 balance              # credit, plan and storage usage
c3 topup --verify-card  # verify a card for £10 welcome credit (£1 hold, released); once per card/account
c3 topup [amount]       # add credit, whole pounds, £10 to £10,000; opens checkout
c3 upgrade [tier] [-y]  # free, pro or team; -y skips confirmation for scripts
```

See [Pricing and plans](https://docs.cthree.cloud/pricing.md).

## Environment variables[​](#environment-variables "Direct link to Environment variables")

| Variable          | Effect                                             |
| ----------------- | -------------------------------------------------- |
| `C3_API_KEY`      | Authenticate with an API key instead of `c3 login` |
| `C3_AUTH_TOKEN`   | Raw bearer token, for CI                           |
| `C3_PROVIDER`     | Default provider pin, same as `-p`                 |
| `C3_API_ENDPOINT` | Control plane URL. Leave unset for production      |

## JSON output[​](#json-output "Direct link to JSON output")

`--json` on `deploy`, `squeue`, `pull`, `list` and `whoami` prints one JSON document to stdout and sends progress and warnings to stderr. Field tables for `deploy` and `squeue` are on [Project configuration](https://docs.cthree.cloud/configuration.md#machine-readable-output).

## Persistent deployment defaults[​](#persistent-deployment-defaults "Direct link to Persistent deployment defaults")

Both `c3 deploy` and `c3 deploy run.sh` use JuiceFS and Nydus. `--dry-run` previews that same execution path without uploading or reserving a workspace. Choose `python.project` with `pyproject.toml` and `uv.lock`, or `docker.image`. Bash scripts run inside the chosen container.

Each fresh checkout automatically gets its own persistent workspace; repeated deploys from that checkout reuse it. `--workspace <name>` explicitly selects a named workspace for sharing. Existing checkouts with a local `default` workspace binding keep it. Local `.c3-runtime-sync-*` state should not be committed or copied into another checkout and is never uploaded.

Workspace writes persist between jobs. An unchanged checkout reuses remote content. If both a job and your local checkout have changed, the error gives a `c3 workspace fetch <name> <new-directory>` command. Reconcile edits there before redeploying. Prepared Python environments live in the container, so they do not need to be fetched. For a legacy workspace cache, add `--preserve-python-cache`.

Idle workspaces count their stored bytes toward the runtime storage limit. Active jobs reserve their allowed growth; imports reserve their upload bytes. `STORAGE_QUOTA_EXCEEDED` reports the usage/reservations, requested growth and limit. Free unused data or wait for active writes to finish before retrying.

Existing `datasets:` version mounts are not automatically converted into mutable resources. Use `c3 data resource create`, `c3 data resource upload`, and `--data-resource name=id[:ro]`, or select `--storage=legacy` for the old workflow. CPU and other offerings without the persistent runtime also require an explicit compatible storage choice. Unavailable new-runtime capacity does not silently switch your job to another execution or storage model.


---

# How C3 works

C3 runs your code on a GPU in a data centre. You point it at a project folder, say what hardware you want, and it provisions the machine, sets up the environment, runs your script, saves the output and shuts the machine down. You pay for the seconds it ran.

## What you deploy[​](#what-you-deploy "Direct link to What you deploy")

One of three things, chosen in `.c3`:

* **A Python project.** C3 installs your `pyproject.toml` dependencies with `uv` and runs your script in that environment. The environment is cached, so the second job starts faster than the first.
* **A container.** C3 pulls a public Docker Hub or GitHub Container Registry image and runs your script inside it. Use this for system packages, other languages or a specific CUDA stack.
* **A plain Bash script.** C3 runs it on the machine as is. Whatever it needs, it installs itself.

Whichever you choose, the whole project folder goes with it, and the script runs from that folder on the machine. See [Environments](https://docs.cthree.cloud/environments.md).

## Deploy, then walk away[​](#deploy-then-walk-away "Direct link to Deploy, then walk away")

`c3 deploy` uploads the folder and returns a job ID within seconds. From then on the job is C3's problem, not your laptop's. Close the lid, lose the wifi, go home. The job queues for a machine, runs to completion, and its output is saved in C3's storage.

Come back whenever you like:

```
c3 squeue              # what is queued, running and finished
c3 logs job_abc123     # what it printed
c3 pull job_abc123     # download its results
```

The same jobs show in the [dashboard](https://cthree.cloud/dashboard) and to any coding agent connected through the [MCP server](https://docs.cthree.cloud/mcp.md). If you would rather watch, `c3 deploy -f` streams the logs live, and closing the terminal does not stop the job.

If you have used Slurm: `c3 deploy` is `sbatch`, `c3 squeue` is `squeue`, `c3 cancel` is `scancel`, and `.c3` replaces the `#SBATCH` header. The difference is that there is no shared filesystem and no login node. Everything the job needs goes in with it, and everything it produces comes out as artifacts.

## Files in, files out[​](#files-in-files-out "Direct link to Files in, files out")

|                   | Workspace                                              | Dataset                                                   | Artifacts                                                           |
| ----------------- | ------------------------------------------------------ | --------------------------------------------------------- | ------------------------------------------------------------------- |
| What              | Your code: `.c3`, the script, source, `pyproject.toml` | Inputs: measurements, images, model weights               | Outputs: results, plots, checkpoints                                |
| How it gets there | Uploaded automatically by every `c3 deploy`            | Uploaded once with `c3 data cp`, mounted with `datasets:` | Written by the job to `$C3_ARTIFACTS_DIR` or an `output:` directory |
| On the machine    | The working directory                                  | The `mount` path, such as `/data/my-data`                 | Collected after the script exits                                    |

Three rules cover most mistakes:

* **The workspace is everything under `.c3`.** It is hashed on every deploy and staged onto every machine. That is fine for code and wrong for data. Anything over a few hundred megabytes, shared between projects, or not written by you belongs in a [dataset](https://docs.cthree.cloud/datasets.md): upload it once, mount it from any job.
* **Only artifacts survive.** Files written anywhere else on the machine are gone when the job ends. Write results to `$C3_ARTIFACTS_DIR` or a directory listed under `output:`. See [Artifacts](https://docs.cthree.cloud/artifacts.md).
* **Results can feed the next job.** Mount `/jobs/<job-id>` as a dataset and the next job reads the previous one's output without it ever coming back to your laptop.

## Hardware[​](#hardware "Direct link to Hardware")

Ask for a class and C3 picks the cheapest available machine in it: `l40` (48 GB, the default), `a100` (80 GB) or `h100` (80 GB). Or name an exact profile from `c3 list --all`, including CPU-only machines with up to 96 cores and 384 GB of RAM. C3 buys from several providers and routes each job to whichever has the machine. See [Hardware and capacity](https://docs.cthree.cloud/hardware.md).

## Job lifecycle[​](#job-lifecycle "Direct link to Job lifecycle")

| State        | Meaning                                        |
| ------------ | ---------------------------------------------- |
| `PENDING`    | Accepted, waiting for a machine                |
| `SCHEDULING` | Machine assigned, environment being prepared   |
| `RUNNING`    | Your script is executing. Billing starts here  |
| `SUCCEEDED`  | Script exited 0 and results were collected     |
| `FAILED`     | Script exited non-zero, or C3 could not run it |
| `CANCELED`   | Stopped by `c3 cancel`                         |
| `TIMED_OUT`  | Hit the `time` limit                           |

`c3 squeue` shows `SUCCEEDED` as `COMPLETED`, and as `SYNCED` once you have run `c3 pull`.

## What it costs[​](#what-it-costs "Direct link to What it costs")

Per second while `RUNNING`, at the hourly rate of the machine the job landed on. Queueing, provisioning and result upload are free. Credit is reserved when you submit and refunded if the job never ran. New accounts start at £0; verify a card to claim £10 once per account and card (`c3 topup --verify-card`). Your plan sets how many machines you can run at once. See [Pricing and plans](https://docs.cthree.cloud/pricing.md).

## Glossary[​](#glossary "Direct link to Glossary")

| Term      | Meaning                                                               |
| --------- | --------------------------------------------------------------------- |
| Class     | A family of GPUs you can request: `l40`, `a100`, `h100`               |
| Profile   | An exact machine type, such as `h100-80gb` or `cpu-d3-96vcpu-384gb`   |
| Provider  | The data centre operator that supplied a machine                      |
| Workspace | The files under `.c3` that `c3 deploy` uploads                        |
| Dataset   | Data uploaded once with `c3 data cp`, versioned, mountable in any job |
| Artifacts | Files a job wrote to `$C3_ARTIFACTS_DIR` or an `output:` directory    |
| Chip      | One running machine, GPU or CPU. Plans limit chips in use at once     |
| Walltime  | The `time` limit in `.c3`. Default one hour                           |


---

# Project configuration

A `.c3` YAML file at the root of your project describes the job. Run `c3 deploy` from that folder or any folder below it. `c3 init` writes a starter file.

```
project: my-experiment
script: run.sh
hardware: l40
time: "04:00:00"

python:
  project: ./

datasets:
  - ref: /datasets/imagenet
    mount: /data/imagenet

output:
  - ./checkpoints
  - ./results
```

## Fields[​](#fields "Direct link to Fields")

| Field                         | Required | Description                                                                                                                                   |
| ----------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `script`                      | yes      | Bash script to run, relative to `.c3`                                                                                                         |
| `project`                     | no       | Name, lowercase letters, digits and hyphens. Generated by `c3 init`                                                                           |
| `hardware`                    | no       | A class (`l40`, `a100`, `h100`) or an exact profile. Omit to let C3 choose. See [Hardware](https://docs.cthree.cloud/hardware.md)             |
| `time`                        | no       | Maximum runtime as `"HH:MM:SS"`. Default one hour. You pay only for time used                                                                 |
| `job_name`                    | no       | Display name in `c3 squeue` and the dashboard                                                                                                 |
| `python.project`              | no       | Directory with `pyproject.toml` and `uv.lock`. See [Environments](https://docs.cthree.cloud/environments.md)                                  |
| `docker.image`                | no       | Public Docker Hub or `ghcr.io` image. Cannot be combined with `python`                                                                        |
| `docker.requires_accelerator` | no       | `cuda` or `none`. C3 refuses a mismatched machine before the script runs                                                                      |
| `datasets`                    | no       | List of `ref` and optional `mount`. See [Datasets](https://docs.cthree.cloud/datasets.md)                                                     |
| `output`                      | no       | Directories to collect as results. See [Artifacts](https://docs.cthree.cloud/artifacts.md)                                                    |
| `provider`                    | no       | Pin a provider such as `nebius`. Omit to auto-route                                                                                           |
| `regions`                     | no       | Allowlist of provider region IDs. Omit for any region                                                                                         |
| `capacity.on_unavailable`     | no       | `wait` (default) or `fail` when the provider has no stock. See [Hardware](https://docs.cthree.cloud/hardware.md#when-capacity-is-unavailable) |
| `capacity.max_wait_minutes`   | no       | How long to wait for stock, 1 to 360. Default 60                                                                                              |
| `ignore_file`                 | no       | Ignore rules file to use instead of `.c3ignore`                                                                                               |
| `api_key`                     | no       | Local credential. Stripped from the uploaded copy. See [Authentication](https://docs.cthree.cloud/authentication.md)                          |
| `gpu`                         | no       | Older alias for `hardware`. Do not set both                                                                                                   |

Comments are allowed: `#` at the start of a line or after a value. Quote values that contain `#`.

## What gets uploaded[​](#what-gets-uploaded "Direct link to What gets uploaded")

`c3 deploy` uploads the regular files under the folder containing `.c3`. It always skips `.git/`, `node_modules/`, Python virtual environments and caches, compiled Python files, shared libraries, symlinks and OS metadata. Everything else is included, including `.env` files, lock files and any data you have left in the folder.

Every file is hashed on every deploy and only new content is transferred, so code is cheap to redeploy. Large inputs are not: keep them out of the project folder and upload them once as a [dataset](https://docs.cthree.cloud/datasets.md#workspace-or-dataset) instead.

Preview the selection without uploading or signing in:

```
c3 deploy --list-files
c3 deploy --list-files --json     # {"files":[".c3","run.sh","src/train.py"]}
```

### Exclude files[​](#exclude-files "Direct link to Exclude files")

Add a `.c3ignore` next to `.c3`. It uses `.gitignore` syntax:

```
.env
.env.*
!.env.example
results/
scratch/
```

To reuse your `.gitignore` instead:

```
ignore_file: .gitignore
```

To combine both, keep `.c3ignore` and import:

```
#!include:.gitignore
scratch/
```

Rules: `*.log` matches at any depth, `/local.txt` only at the root, `results/` matches directories, `!pattern` re-includes, last match wins. Built-in exclusions cannot be undone. Excluding the `script` is an error. Ignore rules affect only the workspace upload, not datasets or results.

## Machine-readable output[​](#machine-readable-output "Direct link to Machine-readable output")

`c3 deploy --json` prints one JSON object to stdout after submission and nothing else. It cannot be combined with `-f`.

| Field                               | Meaning                               |
| ----------------------------------- | ------------------------------------- |
| `id`                                | Job ID                                |
| `status`                            | Initial state, normally `PENDING`     |
| `provider`, `region`                | Selected route, `null` until assigned |
| `hardware_profile`                  | Exact profile selected, when known    |
| `hardware_kind`, `accelerator_kind` | `gpu` or `cpu`; `cuda` or `none`      |
| `dashboard_url`                     | Job page in the dashboard             |
| `pull_command`                      | The `c3 pull` command for this job    |

`c3 squeue --json` returns the same jobs as the table, as an array with lifecycle timestamps, route and the latest attempt's machine ID.

## Migrating a Slurm script[​](#migrating-a-slurm-script "Direct link to Migrating a Slurm script")

`c3 deploy job.sbatch` still works and reads `#SBATCH --time` and `--job-name`. Convert it once with `c3 migrate job.sbatch`, which writes the equivalent `.c3`.

## Deploy telemetry[​](#deploy-telemetry "Direct link to Deploy telemetry")

Each `c3 deploy` sends a short operational summary to C3: timings, outcome, selected route and aggregate file counts. No file names, contents or paths. See [Telemetry and privacy](https://docs.cthree.cloud/telemetry.md).


---

# Datasets

Upload data to C3 once, then mount it in any job. Data moves between C3 storage and the machine over fast links; only the first upload from your laptop is slow.

## Workspace or dataset?[​](#workspace-or-dataset "Direct link to Workspace or dataset?")

`c3 deploy` already uploads your project folder, so small inputs can simply sit next to your script. Use a dataset instead when the data is:

* **large**: more than a few hundred megabytes. The workspace is re-hashed on every deploy and staged onto every machine; a dataset is uploaded once.
* **shared**: used by more than one project, or by a colleague. A dataset mounts into any job; a workspace belongs to one project.
* **versioned**: something you will update and want to reproduce. Datasets keep every version; a workspace is replaced on each deploy.
* **produced by a job**: mount `/jobs/<job-id>` directly rather than downloading and re-uploading. See [Artifacts](https://docs.cthree.cloud/artifacts.md#reuse-results-in-another-job).

If large data must stay in the project folder, exclude it from the upload with `.c3ignore` (see [Project configuration](https://docs.cthree.cloud/configuration.md#exclude-files)) and upload it as a dataset instead.

## Upload[​](#upload "Direct link to Upload")

```
c3 data cp ./my-data/ /datasets/my-data/
```

Every file is hashed before upload and skipped if you have already uploaded it, so re-uploading a dataset with a few changed files transfers only those files. Only your own earlier uploads count: a file someone else uploaded is transferred again and stored once. Each upload creates a new immutable version.

Large files are sent as 32 MiB parts, several at a time, and each part is retried on a fresh connection if the network drops it. A status line shows bytes sent, rate and retries; a retry is routine and only a part that keeps failing is reported. An interrupted upload resumes: run the same command again and the parts already stored are skipped. Set `C3_CLI_MULTIPART_CONCURRENCY` (1 to 16, default 4) to change how many parts are in flight.

## Mount in a job[​](#mount-in-a-job "Direct link to Mount in a job")

Dataset-version mounts require an explicit compatibility choice. Add this block to `.c3`, then submit with `c3 deploy --storage=legacy`. For the default JuiceFS pathway, use [persistent data resources](#persistent-workspaces-and-working-data).

```
datasets:
  - ref: /datasets/my-data
    mount: /data/my-data
```

Your script reads the files at the mount path like local files:

```
data = np.loadtxt("/data/my-data/measurements.csv", delimiter=",")
```

Rules:

* `mount` must be absolute. If omitted, it is `/data/<dataset-name>`.
* `ref` can be a local directory, such as `./my-data`. C3 uploads it as a dataset before submitting.
* `ref` can be a previous job's results, `/jobs/<job-id>`. See [Artifacts](https://docs.cthree.cloud/artifacts.md#reuse-results-in-another-job).
* Without a version, a job gets the latest version at the moment it is submitted. Later uploads do not change a queued job.
* The same `datasets:` block works for [autoresearch](https://docs.cthree.cloud/autoresearch/configuration): every evaluation job of a run mounts the datasets, pinned when the run is submitted.

## Versions[​](#versions "Direct link to Versions")

Every upload creates a new version. Without a version, a job mounts whichever version is latest when it is submitted. Pin one to make a run reproducible:

```
c3 data log /datasets/my-data/           # versions, newest first, with their ids
```

```
datasets:
  - ref: /datasets/my-data/@a1b2c3d4e5f6   # an id from c3 data log
    mount: /data/my-data
```

The id is the start of the version's content hash. C3 expands it before submitting and refuses the deploy if it matches no version or more than one. `@latest` means the same as no version. Coding agents pass the same id in the `version` field of the MCP `deploy` tool.

Older versions can be inspected and downloaded the same way:

```
c3 data ls -l /datasets/my-data/@a1b2c3d4e5f6/
c3 data cp /datasets/my-data/@a1b2c3d4e5f6/ ./
```

## Browse and download[​](#browse-and-download "Direct link to Browse and download")

```
c3 data ls /datasets/                       # all datasets
c3 data ls /datasets/my-data/               # versions
c3 data ls -l /datasets/my-data/@latest/    # files in the latest version
c3 data cp /datasets/my-data/@latest/ ./    # download
c3 data du /datasets/my-data/               # storage used
c3 data rm -r /datasets/my-data/            # delete the whole dataset
```

Deleting the latest version makes the previous one current. Deleting the last version removes the dataset.

Datasets can also be scoped to a project at `/projects/<project>/data/<name>/`, with the same commands. The [dashboard](https://cthree.cloud/dashboard/data) shows the same data.

How storage works

Datasets, uploaded workspaces and job results all use one content-addressed store. Every file is a blob keyed by its SHA-256 hash; a manifest lists the blobs in each version. Identical files across datasets, jobs and workspaces are stored once, and storage usage is charged on unique bytes. Listings still show every file in every version.

## Persistent workspaces and working data[​](#persistent-workspaces-and-working-data "Direct link to Persistent workspaces and working data")

The default JuiceFS pathway keeps workspace and working-data writes between jobs. It is enabled only for qualified runtime offerings. Existing immutable datasets and `c3 pull <job>` results keep their current meaning.

```
c3 deploy --storage=juicefs --workspace default
c3 data resource ls my-project
c3 data resource create my-project data training
c3 data resource upload <resource-id> ./training 0
c3 data resource operation <operation-id>
c3 deploy --storage=juicefs --data-resource training=<resource-id>
```

A checkout records its resource ID, synchronized revision and local content baseline in `.c3-runtime-sync-<name>.json`. Keep that file locally; it is excluded from uploads. Re-deploying unchanged code reuses the current remote workspace. Local edits conflict if a job changed the workspace after the last synchronization. Fetch an export and reconcile deliberately, or choose a new workspace name. Missing local paths never delete remote checkpoints.

`--data-resource name=<resource-id>` mounts working data at `/data/name` with write access; append `:ro` for read-only access. A resource permits one writer or shared readers. Jobs waiting for the complete resource set do not hold GPUs. Filesystem writes made by a failed job can still persist; failures do not restore an earlier workspace.

```
c3 data resource files <resource-id> [prefix] [cursor]
c3 data resource export <resource-id> [prefix]
c3 data resource download <export-operation-id> <new-folder>
c3 data resource rm <resource-id> <relative-path> <expected-revision>
c3 data resource operation <operation-id>
```

Listings and exports return operation IDs. Inspect the operation to obtain its bounded file listing or immutable export manifest. Download a completed export into a new local directory with `c3 data resource download`; existing directories are never overwritten. The browser downloads bounded exports as a tar archive. Listings across separately requested pages are not an atomic snapshot. Deletes require an explicit path and current revision. An uncertain operation retains ownership until recovery; retrying with a different operation ID does not bypass it.

The dashboard Data page and `resource_*` MCP tools use the same resource APIs. MCP `deploy` accepts `storage: "juicefs"` and explicit `runtime_storage` resource revisions. MCP callers import local edits explicitly; a hosted server cannot infer a local checkout's synchronization baseline.


---

# Environments

By default, C3 runs your script inside a container delivered through Nydus, with a persistent JuiceFS workspace. Choose how to prepare that container:

| Your project                                                | Use       | C3 prepares                                                                        |
| ----------------------------------------------------------- | --------- | ---------------------------------------------------------------------------------- |
| Python with a `pyproject.toml`                              | `python:` | A reusable container with Python and your locked dependencies already installed    |
| Anything with system packages, other languages, custom CUDA | `docker:` | A public Docker Hub or GitHub Container Registry image, your script runs inside it |
| Self-contained binaries or Bash scripts                     | `docker:` | A suitable base image such as `ubuntu:24.04`                                       |

`python:` and `docker:` cannot be combined. Setup done inside the script itself runs again on every job.

## Python[​](#python "Direct link to Python")

```
project: python-example
script: run.sh
hardware: l40
time: "02:00:00"

python:
  project: ./

output:
  - ./results
```

```
# run.sh
#!/bin/bash
set -euo pipefail
python3 train.py --output "$C3_ARTIFACTS_DIR"
```

```
# pyproject.toml
[project]
name = "python-example"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = ["jax[cuda12]", "numpy"]
```

Before allocating a GPU, C3 prepares your Python interpreter and locked dependencies on a CPU worker, then runs your script inside the resulting container. The base includes Python 3.12; preparation can download the interpreter your project requests. The virtualenv and interpreter live in the container, outside your persistent workspace.

Unchanged environments are reused across jobs and fresh VMs. Changing the interpreter, dependency configuration, lockfile or local dependency source prepares a new environment. Code and result changes do not rebuild ordinary static dependency environments. Your submitted project runs from the workspace; as before, C3 does not install the root project as a package. Local dependency packages are built into the environment. Prepared environments remain private to your organization. Packages requiring additional system libraries should use a custom `docker.image`. Managed Python requires a provider image qualified for this mode. Create or refresh the lock file locally:

```
uv lock
```

If you only have a `requirements.txt`, create a `pyproject.toml` with `uv init` and `uv add -r requirements.txt`, then `uv lock`. If the project is in a subdirectory, point `python.project` at it.

## Docker[​](#docker "Direct link to Docker")

```
project: docker-example
script: run.sh
hardware: l40
time: "02:00:00"

docker:
  image: pytorch/pytorch:2.4.0-cuda12.4-cudnn9-runtime
  requires_accelerator: cuda

output:
  - ./results
```

C3 prepares the image once per immutable image/platform and reuses its Nydus representation. It runs `bash /workspace/run.sh` with your persistent workspace, attached data resources and `$C3_ARTIFACTS_DIR` mounted. Select `--environment-delivery=oci` to use ordinary container delivery instead.

Images on the GitHub Container Registry work the same way:

```
docker:
  image: ghcr.io/my-lab/trainer:1.4
  requires_accelerator: cuda
```

Requirements:

* Without a registered credential reference, use a public image on Docker Hub or `ghcr.io`. `ubuntu:24.04`, `user/image:tag`, `docker.io/...` and `ghcr.io/<owner>/<image>:<tag>` are accepted, with a tag or a digest. Other registries are rejected before upload. Anonymous pulls require a public package; GHCR reports private or missing packages as denied.
* C3 reuses an image already present on the machine. Pin a digest if you need a specific build rather than a mutable tag such as `latest`.
* The image must contain `bash`. Alpine and distroless images often do not.
* Set `requires_accelerator: cuda` for GPU images and `none` for CPU images. C3 stops before running the script if the machine does not match.
* C3 preserves the verified image environment for the payload, while fixing workspace, home and cache destinations for isolation.

If C3 has registered a private registry credential for your organization, pass its reference alongside the image:

```
docker:
  image: registry.example.com/team/trainer:1.4
  credential_id: my-registered-reference
```

`credential_id` is a nonsecret reference, not a password or token. The server checks its organization, registry and repository before preparing the image. A refusal fails the submission; C3 never retries it anonymously. This requires JuiceFS storage and works with Nydus or ordinary OCI delivery. It cannot be used with `python:`, legacy storage or `c3 ar deploy`. MCP `deploy` accepts the same reference as `docker_credential_id`. Public images need no new setting.

For a CPU offering without the persistent runtime, use `--storage=legacy` and set `requires_accelerator: none`. See [CPU jobs](https://docs.cthree.cloud/hardware.md#cpu-jobs).

## Bash[​](#bash "Direct link to Bash")

```
project: bash-example
script: run.sh
hardware: l40
time: "00:30:00"

docker:
  image: ubuntu:24.04

output:
  - ./results
```

```
# run.sh
#!/bin/bash
set -euo pipefail
mkdir -p results
./bin/my-simulation --output results/output.dat
```

Whatever the script installs is installed again on every job. Move that setup into `python:` or `docker:` when startup time matters.

## Container contents and persistence[​](#container-contents-and-persistence "Direct link to Container contents and persistence")

The container supplies Python, system libraries and command-line tools. The managed Python image supplies Bash and uv; projects needing a compiler or extra system packages should use a custom Docker image. GPU jobs receive the assigned GPU devices and driver libraries through the isolated runtime.

Files under `/workspace` and attached writable data resources persist between jobs. Changes to the container root, `/tmp` or the job home are temporary. Prepared Python environments can be reused without receiving the same VM.

`--storage=legacy` explicitly selects the older execution/storage pathway for compatible offerings. It is never selected automatically after a runtime failure.

## Variables available to your script[​](#variables-available-to-your-script "Direct link to Variables available to your script")

| Variable           | Value                                        |
| ------------------ | -------------------------------------------- |
| Working directory  | `/workspace`                                 |
| `C3_ARTIFACTS_DIR` | `/artifacts`                                 |
| `HOME`             | `/home/job` (temporary)                      |
| `VIRTUAL_ENV`      | `/opt/c3/python/venv` in managed Python mode |
| `TMPDIR`           | `/tmp` (temporary)                           |

The environment is sanitised: no C3 credentials or storage keys are visible to your script. `.env` files in your workspace are uploaded but not loaded; load them yourself if you need them.


---

# Errors

Codes are the same in the CLI, the dashboard and MCP tool results. Errors you can fix name the next step. Failures on C3's or a provider's side show a report code to quote to support.

## Account and billing[​](#account-and-billing "Direct link to Account and billing")

| Code                             | Meaning                                                         | What to do                                                |
| -------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------- |
| `EMAIL_VERIFICATION_REQUIRED`    | Email not verified                                              | `c3 verify-email`, click the link, retry                  |
| `INSUFFICIENT_CREDITS`           | Balance cannot cover the job's reserve                          | `c3 topup`, or lower `time`                               |
| `CONCURRENCY_LIMIT`              | Plan's chip limit reached                                       | Wait, `c3 cancel` a job, or `c3 upgrade`                  |
| `403 Invalid or revoked API key` | Key wrong or revoked                                            | `c3 apikey create`, update the host                       |
| `401 invalid_token`              | Login session expired                                           | `c3 login` again; MCP hosts: remove and re-add the server |
| `FORBIDDEN`                      | Account restricted, or resource belongs to another organisation | `c3 whoami`; contact support if unexpected                |

## Submission[​](#submission "Direct link to Submission")

| Code or message                                     | Meaning                                                                                            | What to do                                             |
| --------------------------------------------------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| `'script' field is required`                        | `.c3` has no `script`                                                                              | Add it                                                 |
| `cpu is a hardware group, not a selectable profile` | `hardware: cpu`                                                                                    | Pick an exact profile from `c3 list --class cpu --all` |
| `VALIDATION_ERROR`                                  | A field is malformed: `gpu` and `hardware` disagree, empty `regions`, relative `mount`, bad `time` | The message names the field                            |
| Excluded submission script                          | Ignore rules exclude `script`                                                                      | Fix `.c3ignore`                                        |
| `WORKSPACE_TOO_LARGE`                               | MCP inline upload over 20 MiB or 500 files                                                         | Use `prepare_upload` or the CLI                        |
| `PROVIDER_NOT_CONFIGURED`                           | Pinned provider does not offer that hardware                                                       | `c3 list --provider <id> --all`                        |

## Capacity and scheduling[​](#capacity-and-scheduling "Direct link to Capacity and scheduling")

| Code                            | Meaning                                           | What to do                                           |
| ------------------------------- | ------------------------------------------------- | ---------------------------------------------------- |
| `GPU_OUT_OF_STOCK`              | No stock for the request at submit time           | Other class or provider, or pin both and let it wait |
| `PROVIDER_UNAVAILABLE`          | Provider disabled or unreachable                  | Remove the pin or choose another                     |
| `PROVISIONING_BLOCKED`          | Not an error. Job is `PENDING`, waiting for stock | Wait, or `c3 cancel` and resubmit elsewhere          |
| `PROVIDER_CAPACITY_UNAVAILABLE` | Waited `max_wait_minutes` without stock           | Resubmit with other hardware. Reserve refunded       |
| `CAPACITY_POOL_DISABLED`        | Selected pool turned off by C3                    | Resubmit with other hardware. Reserve refunded       |
| `QUEUE_DEADLINE_EXCEEDED`       | `PENDING` for six hours                           | Resubmit later or elsewhere. Reserve refunded        |

## Runtime and results[​](#runtime-and-results "Direct link to Runtime and results")

| Code                       | Meaning                                                                                                                                  | What to do                                                                                |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `FAILED`, exit code shown  | Your script exited non-zero                                                                                                              | `c3 logs <job-id>`                                                                        |
| `TIMED_OUT`                | Hit the `time` limit                                                                                                                     | Raise `time`; partial artifacts are still collected                                       |
| `PREPARATION_ERROR`        | Setup failed before the script: `uv sync`, missing `uv.lock`, image pull, dataset not found                                              | The message says which; fix and resubmit                                                  |
| `DOCKER_IMAGE_NOT_FOUND`   | The registry has no such image or tag. On `ghcr.io` a private package looks the same to an anonymous pull                                | Check `docker.image` and, on GHCR, the package visibility; the message names the registry |
| `DOCKER_IMAGE_NOT_PUBLIC`  | The registry refused an anonymous pull. On `ghcr.io` this also covers a misspelt owner or package, because GitHub reports both as denied | Make the image public, or fix the path. Private images are not supported                  |
| `DOCKER_IMAGE_PULL_FAILED` | Any other pull failure, including a `ghcr.io` rate limit                                                                                 | Retry; the message names the registry                                                     |
| `DOCKER_HUB_RATE_LIMITED`  | Docker Hub throttled the pull                                                                                                            | Retry later                                                                               |
| Accelerator mismatch       | `requires_accelerator` does not match the machine                                                                                        | Fix `hardware` or the flag                                                                |
| `UPLOAD_ERROR`             | Script succeeded, results could not be saved                                                                                             | Contact support with the report code                                                      |
| `MACHINE_LOST`             | Provider machine disappeared mid-job                                                                                                     | Resubmit; quote the report code if it recurs                                              |

## Rate limits[​](#rate-limits "Direct link to Rate limits")

| Code                              | Meaning                                  | What to do                           |
| --------------------------------- | ---------------------------------------- | ------------------------------------ |
| `429 RATE_LIMITED`                | More than 120 MCP tool calls in a minute | Slow down; retry after `Retry-After` |
| `VERIFICATION_EMAIL_RATE_LIMITED` | Too many resend requests                 | Wait a few minutes                   |


---

# Examples

All examples are in [github.com/c3-research/c3-examples](https://github.com/c3-research/c3-examples). Each folder has a `.c3` and runs as is.

```
git clone https://github.com/c3-research/c3-examples.git
cd c3-examples/<example>
c3 deploy -f
c3 pull
```

Or point a coding agent at the folder: "Deploy this directory to C3, wait for it, and show me the results."

| Example        | Shows                                                                                   | Hardware | Time   |
| -------------- | --------------------------------------------------------------------------------------- | -------- | ------ |
| `jax-matmul`   | Python mode, `uv` dependencies, a benchmark plot saved as an artifact                   | `l40`    | 10 min |
| `hello.sbatch` | A legacy Slurm script deployed unchanged with `c3 deploy hello.sbatch --storage=legacy` | 1 GPU    | 5 min  |

## jax-matmul, step by step[​](#jax-matmul-step-by-step "Direct link to jax-matmul, step by step")

The `.c3`:

```
project: jax-matmul-example
script: run.sh
hardware: l40
time: "00:10:00"

python:
  project: ./

output:
  - ./results
```

`run.sh` is one line, `python3 train.py`. The `pyproject.toml` lists `jax[cuda12]`, `numpy` and `matplotlib`; C3 installs them with `uv` before the script runs.

`train.py` multiplies large matrices on the GPU, times them, prints the timings to the log and saves `results/benchmark.png`. After the job finishes, `c3 pull` downloads `./job_<id>/results/`.


---

# Hardware and capacity

## Available hardware[​](#available-hardware "Direct link to Available hardware")

| Request               | Machine                 | Memory | Typical use                                       |
| --------------------- | ----------------------- | ------ | ------------------------------------------------- |
| `l40`                 | NVIDIA L40 or L40S      | 48 GB  | Default for training, inference and most GPU work |
| `a100`                | NVIDIA A100 80 GB       | 80 GB  | Larger models, memory-bound workloads             |
| `h100`                | NVIDIA H100 80 GB       | 80 GB  | Fastest option for large training runs            |
| `cpu-d3-4vcpu-16gb`   | AMD EPYC, 4 vCPU        | 16 GB  | Small CPU jobs, builds, smoke tests               |
| `cpu-d3-96vcpu-384gb` | AMD EPYC, 96 vCPU       | 384 GB | Large simulations, compilation, data processing   |
| `cpu-e2-4vcpu-16gb`   | Intel Ice Lake, 4 vCPU  | 16 GB  | Small CPU jobs                                    |
| `cpu-e2-48vcpu-192gb` | Intel Ice Lake, 48 vCPU | 192 GB | Large CPU jobs                                    |

Prices and availability can change. Check current values:

```
c3 list            # classes with price range and availability
c3 list --all      # every profile with its provider and exact price
```

The same view is at [cthree.cloud/status](https://cthree.cloud/status).

## Choosing hardware[​](#choosing-hardware "Direct link to Choosing hardware")

In `.c3`:

```
hardware: l40                 # a class: C3 picks the cheapest available machine in it
hardware: h100-80gb           # an exact profile, from c3 list --all
hardware: cpu-d3-96vcpu-384gb # CPU machines are always requested by exact profile
provider: nebius              # optional: only use this provider
regions: [eu-north1]          # optional: only these provider regions
```

Omit `hardware` entirely and C3 picks from the `l40` class. `c3 deploy -p <provider>` pins a provider for one run. `c3 deploy --dry-run` shows the route, rate and availability without submitting.

## CPU jobs[​](#cpu-jobs "Direct link to CPU jobs")

Request an exact CPU profile. `hardware: cpu` is rejected because `cpu` is a group, not a machine. CPU machines have no CUDA or NVIDIA drivers, so Docker images must declare `requires_accelerator: none`:

```
hardware: cpu-d3-96vcpu-384gb
docker:
  image: ubuntu:24.04
  requires_accelerator: none
```

CPU capacity is experimental: usable and billed normally, but the profiles and images may change. There is no multi-node MPI launcher; MPI runs within one machine.

## Availability[​](#availability "Direct link to Availability")

`c3 list` shows `HIGH`, `MEDIUM` or `LOW` for each row. This is a coarse signal of capacity C3 can currently offer, not a stock count. `LOW` can mean capacity is unavailable, access is temporarily restricted, or pricing is stale. A current price may still be listed while capacity is unavailable. The CLI, status page and MCP hardware listing use the same public availability signal. Exact stock, provider regions and native machine names are not shown before a job is matched; after submission, `c3 squeue <job-id>` shows the provider, region and profile the job landed on.

## How long before my job starts[​](#how-long-before-my-job-starts "Direct link to How long before my job starts")

If a compatible machine is already warm, your script starts within seconds of submission. Otherwise C3 provisions a new machine, which takes minutes and varies by provider and hardware. `PENDING` means C3 is waiting for a machine; `SCHEDULING` means one is assigned and being prepared. Neither state is billed.

## When capacity is unavailable[​](#when-capacity-is-unavailable "Direct link to When capacity is unavailable")

If the selected provider reports it is out of stock, a waiting job stays `PENDING`. Existing provider paths report `PROVISIONING_BLOCKED` and retry the selected pool. Two fields control the capacity policy:

```
capacity:
  on_unavailable: wait     # wait (default) or fail
  max_wait_minutes: 60     # 1 to 360
```

* `wait` retries until the deadline, then fails the job with `PROVIDER_CAPACITY_UNAVAILABLE`.
* `fail` fails immediately instead, so you can resubmit with different hardware.

Separately, the queue has a six-hour maximum lifetime. When no compute ran, the reserved credit is refunded once any original allocation and cleanup are resolved. An uncertain provider response can delay that refund while C3 checks whether a machine was created.

The bounded capacity-attempt path being introduced for AWS keeps one original wait deadline across retries and restarts. A provider pin stays pinned. Before an unpinned job is assigned or consumes a native allocation, C3 may choose another matching offering within the original hardware/region constraints at an equal or lower price. Suitable warm machines come first, followed by ordinary fresh-positive provider stock; an AWS cold attempt requires fresh zero-capacity estimates from every matching alternative provider. AWS remains gated during onboarding.

On that path, pending feedback distinguishes an attempt, waiting for capacity, machine startup and reconciliation of an uncertain original allocation. C3 recovers the original allocation before considering a replacement. A finished job on that path is not retried; submit a new job to start a new wait window. Legacy submissions retain their selected-pool behavior.

Routing details

* A pinned provider goes through the same stock, inventory and spend checks as auto-routing, so a pin can be rejected while auto-routing succeeds elsewhere.
* On existing provider paths, submitting to an out-of-stock pool is only allowed when both `provider` and `hardware` are set; other requests are rejected at submit time with `GPU_OUT_OF_STOCK`.
* On existing provider paths, ambiguous responses and repeated provisioning failures can remain blocked until `max_wait_minutes` even with `on_unavailable: fail`. On the bounded AWS path, an explicit capacity refusal fails promptly for `fail`; uncertainty requires recovery of the original request rather than another launch.


---

# MCP server

C3 hosts a [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server so coding agents can use C3 directly. An agent connected to it can list hardware and prices, deploy a job to a chosen GPU class or provider, wait for it, read its logs, and collect its results. Nothing needs to be installed on the machine running the agent.

The MCP server is a third thin client next to the CLI and the web dashboard. Every tool mirrors one `c3` command, calls the same API the CLI calls with the same credential, and returns `cli_equivalent`, the exact `c3` invocation that reproduces what it did. If you can do it with `c3`, an agent can do it through MCP; if `c3` refuses, so does the tool, with the same error.

## Endpoint[​](#endpoint "Direct link to Endpoint")

| Environment     | URL                                 |
| --------------- | ----------------------------------- |
| Production      | `https://api.cthree.cloud/mcp`      |
| Staging preview | `https://test.api.cthree.cloud/mcp` |

The setup examples below use the production URL; substitute the staging URL to try a change before it reaches production. The transport is Streamable HTTP. Every tool call is a self-contained request; there are no sessions to keep alive.

## Two ways to authenticate[​](#two-ways-to-authenticate "Direct link to Two ways to authenticate")

**URL only (OAuth).** Give your host just the URL. On first use it receives a login challenge, discovers C3's Auth0 tenant from the endpoint's metadata, registers itself, and opens a browser login. Tokens refresh automatically. Use this on your own machine.

**API key (header).** Create a key with `c3 apikey create <name>` or on the [dashboard settings page](https://cthree.cloud/dashboard/settings) and send it as `Authorization: Bearer c3_key_...`. No browser is involved. Use this for headless agents, CI, or hosts that cannot run a browser. A configured key never triggers a login; a revoked key returns a `403` so you see the problem instead of a login prompt.

Both paths give the agent exactly the access the same credential has in the CLI, including the verified-email requirement and any account restriction.

## Host setup[​](#host-setup "Direct link to Host setup")

| Host                         | URL-only (OAuth) | API-key header |
| ---------------------------- | ---------------- | -------------- |
| Claude Code                  | yes              | yes            |
| claude.ai and Claude Desktop | yes              | no             |
| Cursor                       | yes              | yes            |
| ChatGPT                      | yes              | no             |
| Codex                        | yes              | yes            |
| VS Code                      | yes              | yes            |

These are host authentication capabilities, not a verified C3 support matrix. Only Claude Code with an API-key header has been exercised against staging (2 September 2026); OAuth and the other hosts remain unverified.

### Claude Code[​](#claude-code "Direct link to Claude Code")

URL only:

```
claude mcp add --transport http c3 https://api.cthree.cloud/mcp
# then, inside a session, run /mcp and choose "Authenticate" for c3
```

API key:

```
claude mcp add --transport http c3 https://api.cthree.cloud/mcp \
  --header "Authorization: Bearer c3_key_..."
```

Headless use works with the API-key form, for example `claude -p "List the hardware C3 offers and deploy run.sh on an l40"`.

### claude.ai and Claude Desktop[​](#claudeai-and-claude-desktop "Direct link to claude.ai and Claude Desktop")

Open **Settings → Connectors → Add custom connector**, enter `https://api.cthree.cloud/mcp`, and complete the login when prompted. Connectors use OAuth only.

### Cursor[​](#cursor "Direct link to Cursor")

Add to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global). Omit `headers` to use OAuth instead of a key.

```
{
  "mcpServers": {
    "c3": {
      "url": "https://api.cthree.cloud/mcp",
      "headers": { "Authorization": "Bearer c3_key_..." }
    }
  }
}
```

### ChatGPT[​](#chatgpt "Direct link to ChatGPT")

Enable developer mode under **Settings → Connectors**, choose **Create**, and enter `https://api.cthree.cloud/mcp`. ChatGPT connectors use OAuth only.

### Codex[​](#codex "Direct link to Codex")

Add to `~/.codex/config.toml`. For OAuth omit `bearer_token_env_var` and run `codex mcp login c3`.

```
[mcp_servers.c3]
url = "https://api.cthree.cloud/mcp"
bearer_token_env_var = "C3_API_KEY"
```

Set `C3_API_KEY` in the environment Codex runs in.

### VS Code[​](#vs-code "Direct link to VS Code")

Add to `.vscode/mcp.json`. Delete the `headers` block to use OAuth.

```
{
  "inputs": [
    { "id": "c3-key", "type": "promptString", "description": "C3 API key", "password": true }
  ],
  "servers": {
    "c3": {
      "type": "http",
      "url": "https://api.cthree.cloud/mcp",
      "headers": { "Authorization": "Bearer ${input:c3-key}" }
    }
  }
}
```

## Tools[​](#tools "Direct link to Tools")

Each tool description begins with the `c3` command it mirrors. Results always include `cli_equivalent`. Money-moving commands (`c3 topup`, `c3 upgrade`), API-key management, and operator commands are deliberately not exposed; when a job needs credits the error names `c3 topup` for the user to run.

| Tool                       | Mirrors                                                                       | What it does                                                                                                                                                                                     | Inputs (`?` = optional)                                                                                                                                                                                                                                                                                                                                  |
| -------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `whoami`                   | `c3 whoami --json`                                                            | Show the identity behind the configured credential: user id, email, organisation, permissions, admin flag and C3 access status.                                                                  | none                                                                                                                                                                                                                                                                                                                                                     |
| `list_hardware`            | `c3 list --json [--class <class>] [--provider <id>] [--all]`                  | List the hardware classes C3 can run jobs on with C3-billed prices and a coarse live availability signal.                                                                                        | `class?`, `provider?`, `all?`                                                                                                                                                                                                                                                                                                                            |
| `preview_route`            | `c3 deploy --dry-run --json [-p <provider>]`                                  | Show how a deploy with these selectors would route (provider, region, hardware profile, hourly rate, availability) without creating a job or reserving credit.                                   | `hardware?`, `gpu?`, `provider?`, `regions?`, `walltime_seconds?`, `capacity?`, `project?`, `storage?`, `environment_delivery?`                                                                                                                                                                                                                          |
| `balance`                  | `c3 balance`                                                                  | Show the credit balance, subscription plan and storage usage for the account.                                                                                                                    | none                                                                                                                                                                                                                                                                                                                                                     |
| `list_jobs`                | `c3 squeue --json [-n <history>]`                                             | List jobs the way `c3 squeue` does: every active job (PENDING, SCHEDULING, RUNNING) followed by the most recent terminal jobs (`history` of them, default 10).                                   | `status?`, `history?`, `limit?`, `offset?`, `hardware_profile?`                                                                                                                                                                                                                                                                                          |
| `get_job`                  | `c3 squeue <job-id> --json`                                                   | Show one job in full: status, selected route (provider, region, hardware profile, rate), capacity policy, failure diagnosis and the latest attempt.                                              | `job_id`                                                                                                                                                                                                                                                                                                                                                 |
| `job_logs`                 | `c3 logs <job-id> [-v]`                                                       | Return one page of log lines for the job's latest attempt with a cursor for the next page.                                                                                                       | `job_id`, `cursor?`, `limit?`, `all_streams?`                                                                                                                                                                                                                                                                                                            |
| `wait_for_job`             | `c3 logs <job-id> -f`                                                         | Poll a job every 2 seconds until it reaches a terminal state (SUCCEEDED, FAILED, CANCELED, TIMED\_OUT) or the timeout elapses (default 30s, maximum 50s).                                        | `job_id`, `timeout_seconds?`                                                                                                                                                                                                                                                                                                                             |
| `cancel_job`               | `c3 cancel <job-id>`                                                          | Request cancellation of a job.                                                                                                                                                                   | `job_id`                                                                                                                                                                                                                                                                                                                                                 |
| `deploy`                   | `c3 deploy [script] --json [-p <provider>] [--storage <mode>]`                | Submit a job.                                                                                                                                                                                    | `storage?`, `environment_delivery?`, `runtime_storage?`, `hardware?`, `gpu?`, `provider?`, `regions?`, `walltime_seconds?`, `capacity?`, `project`, `script?`, `files?`, `workspace?`, `workspace_publication_id?`, `job_name?`, `datasets?`, `output?`, `python_project_dir?`, `docker_image?`, `docker_credential_id?`, `docker_requires_accelerator?` |
| `list_artifacts`           | `c3 pull <job-id> --json`                                                     | List the files a job produced with sizes and short-lived download URLs.                                                                                                                          | `job_id`                                                                                                                                                                                                                                                                                                                                                 |
| `read_artifact`            | `c3 pull <job-id>`                                                            | Return one artifact's content inline (text, or base64 for binary) when it is at most 1 MiB; larger files return the size and a download URL only.                                                | `job_id`, `path`                                                                                                                                                                                                                                                                                                                                         |
| `data_ls`                  | `c3 data ls <path>`                                                           | List datasets, a dataset's versions, the files in a version, uploaded workspace versions, or a job's artifacts.                                                                                  | `path`                                                                                                                                                                                                                                                                                                                                                   |
| `data_du`                  | `c3 data du <path>`                                                           | Report storage used by datasets: total bytes across versions, unique bytes after content-addressed dedup, file and version counts.                                                               | `path?`                                                                                                                                                                                                                                                                                                                                                  |
| `data_rm`                  | `c3 data rm [-r] [-n] -f <path>`                                              | Remove a dataset version or a whole dataset with `recursive`, repointing latest to a surviving version when needed.                                                                              | `path`, `recursive?`, `dry_run?`                                                                                                                                                                                                                                                                                                                         |
| `data_upload`              | `c3 data cp <local-dir> /datasets/<name>/`                                    | Create a new version of a dataset from inline files (at most 20 MiB decoded and 500 files; for anything larger, hosts with a shell use prepare\_upload and hosts with the CLI use `c3 data cp`). | `dataset`, `files`                                                                                                                                                                                                                                                                                                                                       |
| `resource_import_manifest` | `c3 deploy (persistent workspace synchronization)`                            | Import files from a committed owned workspace publication using an explicit resource revision.                                                                                                   | `operation_id`, `resource_id`, `expected_revision`, `publication_id`                                                                                                                                                                                                                                                                                     |
| `resource_list`            | `c3 data resource ls <project> [after]`                                       | List persistent workspaces and working data in a project, including their current revisions.                                                                                                     | `project`, `after?`                                                                                                                                                                                                                                                                                                                                      |
| `resource_create`          | `c3 data resource create <project> <kind> <name>`                             | Create a named workspace or mutable data resource.                                                                                                                                               | `project`, `kind`, `name`                                                                                                                                                                                                                                                                                                                                |
| `resource_show`            | `c3 data resource show <resource-id>`                                         | Read the resource revision and storage usage without listing file contents.                                                                                                                      | `resource_id`                                                                                                                                                                                                                                                                                                                                            |
| `resource_files`           | `c3 data resource files <resource-id> [prefix] [cursor]`                      | Request a bounded file listing under shared read ownership.                                                                                                                                      | `resource_id`, `prefix?`, `cursor?`                                                                                                                                                                                                                                                                                                                      |
| `resource_export`          | `c3 data resource export <resource-id> [prefix]`                              | Request an immutable file export while holding read ownership.                                                                                                                                   | `resource_id`, `prefix?`                                                                                                                                                                                                                                                                                                                                 |
| `resource_remove`          | `c3 data resource rm <resource-id> <relative-path> <expected-revision>`       | Delete an explicit relative path under exclusive ownership.                                                                                                                                      | `resource_id`, `path`, `expected_revision`                                                                                                                                                                                                                                                                                                               |
| `resource_upload`          | `c3 data resource upload <resource-id> <local-folder> <expected-revision>`    | Import explicit files against the current revision.                                                                                                                                              | `resource_id`, `expected_revision`, `files`                                                                                                                                                                                                                                                                                                              |
| `resource_operation`       | `c3 data resource operation <operation-id>`                                   | Inspect an import or read.                                                                                                                                                                       | `operation_id`                                                                                                                                                                                                                                                                                                                                           |
| `resource_download`        | `c3 data resource download <export-operation-id> <new-folder>`                | Get a signed URL and expected SHA256 for a completed immutable export manifest.                                                                                                                  | `operation_id`                                                                                                                                                                                                                                                                                                                                           |
| `prepare_upload`           | `c3 data cp <local-dir> <dest> (upload phase; c3 deploy for a workspace)`     | For shell-capable hosts without the CLI.                                                                                                                                                         | `storage?`, `target`, `transfer?`, `files?`, `script?`, `python_project_dir?`, `docker_image?`, `docker_requires_accelerator?`, `output?`                                                                                                                                                                                                                |
| `complete_upload`          | `c3 data cp <local-dir> <dest> (completion phase; c3 deploy for a workspace)` | Finish or check a retained owned upload prepared by prepare\_upload.                                                                                                                             | `target`, `transfer`, `parts?`                                                                                                                                                                                                                                                                                                                           |
| `ar_deploy`                | `c3 ar deploy <script> --json [-p <provider>]`                                | Start an autoresearch run from an experiment folder: `script` (run.py, which calls `autoresearch.run(...)` on the C3 research controller) plus the program being improved and its evaluator.     | `script`, `workspace?`, `files?`, `project?`, `name?`, `hardware_profile?`, `provider?`, `limits?`, `datasets?`, `python_project_dir?`, `docker_image?`, `docker_requires_accelerator?`                                                                                                                                                                  |
| `ar_list_runs`             | `c3 ar squeue --json [-n N]`                                                  | List the authenticated organisation's research runs, newest first, with cursor pagination.                                                                                                       | `limit?`, `cursor?`                                                                                                                                                                                                                                                                                                                                      |
| `ar_get_run`               | `c3 ar squeue <run-id> --json`                                                | Show one autoresearch run in full (status, engine, script, project, limits, usage, result, error) together with its progress steps and a count of steps by status.                               | `run_id`                                                                                                                                                                                                                                                                                                                                                 |
| `ar_cancel_run`            | `c3 ar cancel <run-id>`                                                       | Cancel an autoresearch run: queued evaluations are dropped and running evaluation jobs are stopped.                                                                                              | `run_id`                                                                                                                                                                                                                                                                                                                                                 |

Two read-only resources are also served in-band: `c3://docs/mcp` (this page) and `c3://docs/cli-reference` (the reference printed by `c3 docs`).

## Workspaces are data[​](#workspaces-are-data "Direct link to Workspaces are data")

File selection happens on the host. The server cannot read your `.c3ignore` or `.gitignore`, so apply them before sending contents or digests. With the CLI installed, `c3 deploy --list-files --json` returns the selected paths locally. The built-in exclusions still apply. See [What gets uploaded](https://docs.cthree.cloud/configuration.md#what-gets-uploaded).

The owned shell helper prepares private `.c3` copies using the CLI’s typed configuration rules, removes `api_key`, and hashes/uploads only the prepared bytes. Your originals remain unchanged. This step requires local PyYAML 6.0.3; install it explicitly in your Python environment before preparation. The helper never installs dependencies or sends configuration values through MCP. Missing YAML support or ambiguous configuration stops before uploading. Inline uploads reject `.c3` files containing `api_key`; legacy digest uploads still require you to prepare credential-free copies or omit them.

A workspace is the code and configuration a job needs: the submission script, a `.c3`, a `pyproject.toml`, your source files. C3 stores it the way it stores a dataset, as content-addressed blobs plus a manifest, and `c3 deploy` is that upload followed by a job that points at the manifest hash. Data belongs in datasets (mounted with `datasets:`), environments are rebuilt from `pyproject.toml` or a Docker image, and caches are excluded. Uploaded workspace versions are visible with `data_ls /projects/<project>/workspace/`.

There are two ways to get a workspace to C3 from an agent, chosen by what the host can do:

### Hosts with a shell (Claude Code, Cursor, Codex, VS Code)[​](#hosts-with-a-shell-claude-code-cursor-codex-vs-code "Direct link to Hosts with a shell (Claude Code, Cursor, Codex, VS Code)")

Never paste file contents into a tool call. Hash the files, send the digests, run the returned script, deploy the returned version:

```
# 1. digests only (paths, sha256, size); the model never sees the bytes
find . -type f -not -path './.git/*' -exec sh -c 'printf "%s %s %s\n" "$(sha256sum "$1" | cut -d" " -f1)" "$(stat -c %s "$1")" "${1#./}"' _ {} \;
```

Call `prepare_upload` with `target: /projects/<project>/workspace/`, `script: run.sh` and file digests. Datasets use `target: /datasets/<name>/`. The server selects the configured storage protocol.

When owned storage is enabled, the result contains `helper_script`, a Python 3 helper, and a `preparation` object. Workspace `.c3` preparation requires PyYAML 6.0.3 in that Python environment. Save the result privately as `preparation.json`, save the helper as `c3-owned-upload.py`, then run:

```
python3 c3-owned-upload.py build --plan preparation.json --state .c3-owned-upload.json
# For a large manifest, keep every {path, sha256, size_bytes, mode?} locally,
# one JSON object per line, and add: --digests all-digests.jsonl
```

The helper prints the next MCP call. Execute it and save each returned part window as `window.json`, then run `python3 c3-owned-upload.py upload --state .c3-owned-upload.json --plan window.json`. Repeat the emitted calls. The helper streams file ranges to presigned URLs, records each acknowledgement privately, and submits the original manifest after its files. API authentication stays in MCP; the helper takes no API, publisher or machine credential.

`complete_upload` submits the exact acknowledgements and checks platform verification. Keep the same transfer identity while the state is `publication_pending` or `manifest_pending`; neither state means the workspace is ready. Save a `published` file result or `committed` manifest result as `result.json`, then run `python3 c3-owned-upload.py record --state .c3-owned-upload.json --plan result.json`. Deploy only the final returned `workspace` together with `workspace_publication_id`. Dataset mounts can retain the exact `publication_id` alongside their reference.

After an interrupted PUT, repeat `prepare_upload` with the retained transfer to reconcile native part acknowledgements. The helper refuses blind replay of an uncertain part. For an expired or explicitly retried window, `python3 c3-owned-upload.py renew --state .c3-owned-upload.json` emits a new bounded window request for the same upload. Preserve the journal and original file bytes until publication completes. Configured server object, manifest and lifetime policies still apply; multipart transport does not raise release limits.

If the initial server capability selects legacy storage, the result instead contains the existing `shell` curl script. Run it before deploying the returned workspace reference. Legacy preparation supports at most 2000 files and 5 GiB per file. An owned transfer never falls back to this flow.

### Hosts without a shell (claude.ai, ChatGPT)[​](#hosts-without-a-shell-claudeai-chatgpt "Direct link to Hosts without a shell (claude.ai, ChatGPT)")

These hosts only have the small scripts the agent wrote, so `deploy` and `data_upload` accept the files inline: a list of `{ path, content }` entries, `encoding: "base64"` for binary files, `executable: true` for scripts. The standard exclusions apply. The limit is what a Worker request can hold:

| Limit                                        | Value                                                                                            |
| -------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| Decoded inline payload                       | 20 MiB                                                                                           |
| Inline files                                 | 500                                                                                              |
| Owned `prepare_upload` digest transport page | 2000 entries / 1 MiB; larger manifests use local JSONL, with total policy enforced by the server |
| Owned part window                            | At most 25 signed parts per call                                                                 |
| Legacy `prepare_upload`                      | 2000 files, up to 5 GiB each                                                                     |
| Inline artifact read                         | 1 MiB (larger files return a download URL)                                                       |

Whichever path is used, the workspace manifest hash is identical to what `c3 deploy` produces for the same prepared file bytes and metadata, including credential-free `.c3` copies.

## Worked examples[​](#worked-examples "Direct link to Worked examples")

### Run a script on an H100 on a named provider[​](#run-a-script-on-an-h100-on-a-named-provider "Direct link to Run a script on an H100 on a named provider")

Ask the agent to preview first, then deploy:

> Preview an h100 route on nebius, then deploy `train.py` from this directory with `run.sh` as the script, project `matmul`, and wait for it.

The agent calls `preview_route` with `hardware: "h100", provider: "nebius"`, then `deploy` with the files, `script: "run.sh"`, `project: "matmul"`, the same selectors, and finally `wait_for_job`. The deploy result carries the CLI form, for example:

```
cli_equivalent: c3 deploy run.sh --json -p nebius
c3_config:
  project: matmul
  script: run.sh
  hardware: h100
  provider: nebius
```

### Deploy a real repository from Claude Code without the CLI[​](#deploy-a-real-repository-from-claude-code-without-the-cli "Direct link to Deploy a real repository from Claude Code without the CLI")

> Hash this directory, prepare the upload for project `matmul`, run the upload script, then deploy the returned workspace on an h100 and wait for it.

The agent hashes the selected files, calls `prepare_upload`, and follows the returned protocol through publication. For owned storage, it retains the helper journal and uses `complete_upload`, then passes both `workspace` and `workspace_publication_id` to `deploy`. The lock file travels as bytes over HTTPS, never through the model; an existing hash alone never proves ownership.

### Follow a job and read its results[​](#follow-a-job-and-read-its-results "Direct link to Follow a job and read its results")

`wait_for_job` returns after at most 50 seconds (under the tool timeout hosts enforce) with `terminal: false` if the job is still running; the agent calls it again. `job_logs` returns a page of lines and a cursor; passing the cursor back returns only new lines. When the job succeeds, `list_artifacts` lists the output files with download URLs and `read_artifact` returns a small result file (a metrics JSON, say) inline.

### Upload a dataset and mount it[​](#upload-a-dataset-and-mount-it "Direct link to Upload a dataset and mount it")

`data_upload` with `dataset: "my-data"` and a few files creates a new version. A later `deploy` mounts it with `datasets: [{ ref: "/datasets/my-data", mount: "/data" }]`, exactly as `datasets:` in `.c3` would.

## Troubleshooting[​](#troubleshooting "Direct link to Troubleshooting")

| Symptom                                       | Meaning                                                             | Fix                                                                                               |
| --------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| Host opens a browser login you did not expect | No credential was sent. This is the OAuth path working as designed. | Complete the login, or configure an API key header if you want no browser.                        |
| `403 Invalid or revoked API key`              | The `c3_key_` header is wrong or the key was revoked.               | Create a new key with `c3 apikey create <name>` and update the host.                              |
| `EMAIL_VERIFICATION_REQUIRED`                 | The account's email is not verified.                                | Run `c3 verify-email`, click the link, retry.                                                     |
| `INSUFFICIENT_CREDITS`                        | The balance cannot cover the job's reservation.                     | Run `c3 topup <amount>` or top up on the dashboard. The agent cannot do this for you.             |
| `GPU_OUT_OF_STOCK` or `PROVIDER_UNAVAILABLE`  | The requested class or pinned provider has no capacity.             | Call `list_hardware`, choose another class or provider, or set `capacity.on_unavailable: "wait"`. |
| `CONCURRENCY_LIMIT`                           | Your plan's concurrent job limit is reached.                        | Wait, `cancel_job`, or `c3 upgrade`.                                                              |
| `429 RATE_LIMITED`                            | More than 120 tool calls in a minute from one identity.             | Slow the loop; retry after the `Retry-After` interval.                                            |
| `WORKSPACE_TOO_LARGE`                         | Inline payload over 20 MiB or 500 files.                            | With a shell, use `prepare_upload`; with the CLI, run `c3 deploy` from the project directory.     |

Tokens issued by the OAuth login expire; hosts holding a refresh token renew silently. If a host shows `401 invalid_token` and does not recover, remove and re-add the server to trigger a fresh login.

## Persistent deployments[​](#persistent-deployments "Direct link to Persistent deployments")

`deploy` and `preview_route` default to JuiceFS with Nydus. `deploy` requires explicit `runtime_storage.workspace` and `runtime_storage.data` revisions. Hosted tools do not infer a local synchronization baseline or overwrite a remote workspace implicitly.

For a new workspace, use `prepare_upload` and `complete_upload` to obtain an owned publication. Use `resource_create`, then `resource_import_manifest` with that publication, a stable operation ID and the expected resource revision. Wait for `resource_operation` to commit and read the revision with `resource_show`. Pass that revision, the workspace reference and exact publication ID to `deploy`. Use the same explicit revision checks for later edits.

`storage: legacy` remains an explicit compatibility choice. `environment_delivery: oci` retains JuiceFS while selecting ordinary image delivery.


---

# Pricing and plans

## Compute[​](#compute "Direct link to Compute")

You pay per second while a job is `RUNNING`, at the hourly rate of the machine it landed on. Queueing, provisioning and result upload are free. Rates are shown by `c3 list` and on the [status page](https://cthree.cloud/status); they differ by provider and change over time, and the job records the rate it was billed at.

When you submit, C3 reserves enough credit to cover the full `time` limit. When the job ends, the reserve is settled against actual use. If the job never ran, because it timed out in the queue or capacity was unavailable, the whole reserve is refunded. A job that would exceed your balance is refused with `INSUFFICIENT_CREDITS`.

## Credit[​](#credit "Direct link to Credit")

New accounts start at £0. Verify a card with `c3 topup --verify-card` or the Billing dashboard to claim £10 of welcome credits. Verification places a £1 hold that is released straight away, with no charge or subscription (your bank may show it as pending for a few days), and your bank confirms it with 3D Secure. Each account and card can receive the grant only once. Enter card details directly; digital wallets, prepaid cards and cards issued outside your billing country are not eligible.

```
c3 balance            # credit, plan and storage usage
c3 topup 25           # add £25; £10 minimum, £10,000 maximum
```

`c3 topup` and the [billing page](https://cthree.cloud/dashboard/billing) both open Stripe checkout.

## Plans[​](#plans "Direct link to Plans")

Plans set how many machines you can run at once. One running machine is one chip, GPU or CPU. Compute is billed the same on every plan.

| Plan | Price          | Seats     | Concurrent chips |
| ---- | -------------- | --------- | ---------------- |
| Free | £0             | 1         | 3                |
| Pro  | £45 per month  | 1         | 10               |
| Team | £185 per month | unlimited | 50               |

Submitting beyond your limit is refused with `CONCURRENCY_LIMIT`; the job is not queued. Team is not yet self-service. Ask C3 to enable it for your account.

```
c3 upgrade            # interactive picker
c3 upgrade pro        # opens checkout the first time
c3 upgrade free       # cancel at the end of the billing period
c3 upgrade free -y    # the same without confirmation, for scripts
```

Downgrades and cancellations take effect at the end of the current period. Running `c3 upgrade <current plan>` cancels a pending change. The [subscription page](https://cthree.cloud/dashboard/subscription) does the same.

## Storage[​](#storage "Direct link to Storage")

Datasets, uploaded workspaces and job artifacts count towards storage usage, measured on unique bytes after deduplication. `c3 balance` shows the current figure. No plan has a storage quota; storage is billed on usage.


---

# Telemetry and privacy

`c3 deploy` sends C3 one short summary per run so we can diagnose submission failures, latency and capacity problems. There is currently no opt-out.

## What is sent[​](#what-is-sent "Direct link to What is sent")

* CLI version and the command entrypoint.
* Outcome, a stable failure code and the stage it failed in.
* Timings for each phase: route preview, upload, submission.
* Job and journey identifiers, and the selected provider, region and hardware.
* A configuration snapshot: whether a provider was pinned, hardware constraints, capacity policy, `time`, environment kind, and the number of datasets.
* Workspace statistics: file count, total bytes, uploaded bytes and deduplicated bytes.

## What is never sent[​](#what-is-never-sent "Direct link to What is never sent")

File names, file contents, local paths, script text, dataset names, mount paths, environment variable values, credentials, the raw `.c3`, Docker image references, and free-text error messages. User, organisation and project identifiers are pseudonymised with an HMAC before storage.

## How it is sent[​](#how-it-is-sent "Direct link to How it is sent")

One request after submission, before any `-f` log following. It has a 750 ms timeout and a 16 KiB payload limit, is never retried and is never queued offline. A failed telemetry request does not change the deploy result. A dry run reports only the route preview timing.


---

