> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.conductorquantum.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.conductorquantum.com/_mcp/server.

# API tokens

> Create a Control API token and use it to list labs, submit jobs, and read results from your own scripts.

A Control API token lets your scripts [list labs](/api-reference/control/labs/list), discover experiments, submit and cancel jobs, and read results without a browser session. It acts as you, within the lab and scopes you give it.

Control API tokens start with `cqk_`. The deprecated Models product uses [Models API keys](/control/getting-started/api-keys) for the `conductorquantum` SDK and hosted analysis models. The Conductor CLI uses a separate login to connect your instrument client or `qm-qua` to your lab.

## Create a token

1. Open [API tokens in Control](https://control.conductorquantum.com/settings/tokens) and sign in.
2. Under **Create API token**, enter a **Name** that says where the token will be used.
3. Choose the **Lab** the token may use.
4. Select its **Scopes**. For lab and job operations, choose only what your script needs:

   | Scope                                  | Allows                                                  |
   | -------------------------------------- | ------------------------------------------------------- |
   | Read labs (`labs:read`)                | List the token's labs                                   |
   | Read jobs (`jobs:read`)                | List the experiment catalog, list jobs, and read a job  |
   | Submit and cancel jobs (`jobs:submit`) | Submit and cancel jobs, and list the experiment catalog |

   To list labs only, select **Read labs** and clear the other scopes.
5. Choose an **Expiry**: 30 days, 90 days, or never.
6. Select **Create API token**, then copy the token. It is shown only once; Control stores only its hash.

![Create API token form for North Hall Qubit Lab with Read labs, Read jobs, and Submit and cancel jobs selected. The token list is empty.](https://files.buildwithfern.com/conductor-quantum.docs.buildwithfern.com/29ca5acd19ac54ceb4fdb2b18c41499f9c3bcf65f12a9aba3f66e4885bd6ff24/assets/control-desktop-api-token-create.png)

Store the token in a secret manager or an environment variable, never in code or a notebook you share. A token can do only what you can: if you lose access to its lab, the token loses it too.

## Use the token

Set `CONTROL_API_TOKEN` securely in your shell environment. Send it as a bearer token. For example, list your labs:

```sh
curl -H "Authorization: Bearer $CONTROL_API_TOKEN" \
  https://control.conductorquantum.com/api/v1/labs
```

Look up the experiments you can run and their parameters:

```sh
curl -H "Authorization: Bearer $CONTROL_API_TOKEN" \
  https://control.conductorquantum.com/api/v1/experiments
```

Before you [submit a job](/api-reference/control/jobs/submit), check the lab, targets, and parameters against your approved hardware limits. Set `LAB_ID` to the lab's ID. Generate one key for this submission:

```sh
JOB_KEY="$(python3 -c 'import uuid; print(uuid.uuid4())')"
```

Run the request only when authorized. For a retry within 24 hours, use the same key and identical request body. Do not regenerate the key for that retry.

```sh
curl -X POST \
  -H "Authorization: Bearer $CONTROL_API_TOKEN" \
  -H "Idempotency-Key: $JOB_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind":"workflow","procedure":"single_qubit_bringup","targets":["Q0"]}' \
  "https://control.conductorquantum.com/api/v1/labs/$LAB_ID/jobs"
```

Set `JOB_ID` to the returned job's `id`. To check its status, run:

```sh
curl -H "Authorization: Bearer $CONTROL_API_TOKEN" \
  "https://control.conductorquantum.com/api/v1/jobs/$JOB_ID"
```

A job's `status` says whether it finished running; `scientific_success` says whether its result passed acceptance. See [Get a job](/api-reference/control/jobs/get) for scopes and responses.

> **Warning**
>
> A submitted job can operate real hardware. Check its targets and parameters before submitting, and inspect a job's recorded outcome before retrying it.

## Revoke a token

Open **API tokens**, find the token in the list, and select **Revoke**. Requests with it fail at once with `401`. The list also shows when each token was last used and when it expires; revoke any token you no longer use, and replace a token you think was exposed.