> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fortytwo.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Get access

> Create an API key on the Fortytwo platform and send it with each request.

## Create a key

1. Sign in at [platform.fortytwo.network](https://platform.fortytwo.network).
2. Open **Credits** and press **Buy credits**. Every request is charged to this balance — see [Pricing](/docs/pricing).
3. Open **API keys** and press **Create key** (**New key** if the account already has keys).
4. Copy the key. It is shown only once.

Use a separate key for each integration. Usage is reported per key, and a key can be disabled or revoked on its own.

## Send the key

Send the key in the `Authorization` header of every request. A request with a body also needs `Content-Type: application/json`. Keys start with `sk-ft-v1-`.

```bash theme={null}
curl https://api.fortytwo.network/v1/models \
  -H "Authorization: Bearer $FORTYTWO_API_KEY"
```

Keep the key in an environment variable. The examples in these docs read it from `FORTYTWO_API_KEY`.

```bash theme={null}
export FORTYTWO_API_KEY="<your key>"
```

The API does not accept cross-origin requests from a browser. Call it from your server, and keep the key there.

A missing, malformed, unknown, disabled, revoked or expired key returns `401 invalid_api_key`.

## Key and account settings

| Setting | Value |
| - | - |
| Active keys | 10 per account. Enabling a disabled key counts toward the limit |
| Key name | 1–160 characters |
| **Expiration** | **No expiration** (default), 1 hour, 1 day, 7 days, 30 days, 90 days, 180 days or 1 year. Set when the key is created |
| **Spend limit** | Per key, optional. **Limit resets**: Never, Daily, Weekly or Monthly, at 00:00 UTC (Weekly on Monday, Monthly on the 1st). The reset is set when the key is created |
| **Monthly spend limit** | Per account, optional. Set on **Credits** under **Usage limits**. Resets on the 1st of each month at 00:00 UTC |

## Spend limits

* Both limits are checked when a request starts. A request that is already running finishes and is charged, so spend can end above a limit by the cost of the requests in progress. Each running request can cost up to a maximum-length request for its model.
* A key over its **Spend limit** gets `429 billing_limit_exceeded`. Any key on an account over its **Monthly spend limit** gets `402 account_spend_limit_reached`.
* Buying credits does not clear either error. They clear when the limit resets, or when the limit is raised or removed.
* A **Monthly spend limit** of \$0 blocks all new requests. Changing the limit does not reset the month's spend.

## Track usage

| Page | Shows |
| - | - |
| **Usage** | Input, output and total tokens and **Spent**, by key or by model, for a selected period |
| **Logs** | One row per request: **Time (UTC)**, **Model**, **API key**, **Input tokens**, **Output tokens**, **Cost**. The details show the **Generation ID**, which is the request ID |

Both keep 12 months of history. Prompts and responses are not shown.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.