# API keys

Source: https://bflops.com/docs/api-keys

Make a key so scripts and AI agents can rent machines for you, within a daily limit you set.



An API key lets code act on your account: list machines, start and stop them, and read your balance. Each key has its own ceiling, so an agent never spends more than you allow.

## Make a key [#make-a-key]

<Steps>
  <Step>
    ### Open API keys [#open-api-keys]

    Go to [API keys](/keys) and sign in.
  </Step>

  <Step>
    ### Name it and set what it may do [#name-it-and-set-what-it-may-do]

    Give it a name you will recognise, such as `training-bot`. Under **What it may do**, pick:

    * **Read only**: lists, prices and reads. It starts nothing.
    * **Rent machines**: also starts, stops and extends machines, up to a **GPU daily limit** of $1 to $10,000.
  </Step>

  <Step>
    ### Copy it now [#copy-it-now]

    Select **Create key**. The key starts with `bf_` and is shown **once**. Copy it into your password manager or your agent's secrets, then select **I copied it**.
  </Step>
</Steps>

<Callout kind="warning">
  Treat a key like a password. Anyone who has it can spend up to its daily limit from
  your balance. Never put it in a public repository or a web page.
</Callout>

## The ceilings on every key [#the-ceilings-on-every-key]

* **Its daily limit**: what its machines may cost in a UTC day. When it is reached, its machines stop.
* **4 machines or 1 cluster** at once.
* **Machines stop by themselves** after 24 hours unless the key asked for 1 to 168, and never run past 7 days.
* **Your balance** still applies: a key spends from it like you do.

## Change or revoke a key [#change-or-revoke-a-key]

* **Change limit** sets a new daily limit. A limit below what its machines already cost today stops them within a minute.
* **Revoke** ends the key for good. Calls with it fail at once, and **every machine it started stops**.

You can hold up to 20 keys.

## Use the key [#use-the-key]

* For an AI agent such as Claude Code: [Connect an AI agent (MCP)](/docs/mcp).
* From your own code: [REST API](/docs/api).
