> ## Documentation Index
> Fetch the complete documentation index at: https://io-migration.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Started With CaaS API

> The  lets you programmatically deploy and manage high-performance containerized workloads on io.net’s decentralized GPU network. This guide walks you through the key steps to get started.

[Get Started with CaaS API](https://www.youtube.com/embed/o5bCqYcBPyc)

## Generate an API key

You can obtain an API key for IO Cloud in two ways:

1. Via the web interface
2. By using a two-step process (first generate a JWT token, then request the API key using curl)

### Option 1: Generate an API Key via Web Interface

IO Clouds APIs authenticate requests using API keys. You can [generate API keys from your user](https://ai.io.net/ai/api-keys) account. **Note: When generating an API key, make sure to specify the associated IO Cloud project.**

> [!WARNING]
>
> Always treat your API key as a secret! Do not share it or expose it in client-side code (e.g., browsers or mobile apps). Instead, store it securely in an environment variable or a key management service on your backend server.

### Option 2: Generate an API Key Using a JWT Token

#### Step 1. Get a JWT Token

IO's API is built around [RESTful](https://en.wikipedia.org/wiki/REST) principles. You can use IO's APIs to gain insights into different elements of our network.

To use IO's APIs, you must supply a JWT token in the header of your request. Follow the instructions below to generate a token:

1. Go to **IO.net** > **IO ID** > **IO Clouds** tab.
2. In the UI, right-click and select **Inspect**.
3. In the Inspect tool, click **Network**.
4. Refresh the **IO Clouds** page.
5. In the list of elements, click **Devices**.
6. Scroll down to the **Request Headers** section.
7. Copy and store the token.

> [!NOTE]
>
> The token is valid for 21 days.

![](https://mintcdn.com/io-migration/gNTVwsExumjDr_tJ/images/reference/7871c6217eaab2813019860f8f0eaca5e01ef4295838e14d50c9777e4272694b-45b951bf59c4a475d763f3679454767ef7ee1890203e9add65bf58bfde5e73ae-api1.jpg?fit=max\&auto=format\&n=gNTVwsExumjDr_tJ\&q=85\&s=1b8536d82e6be1e54381fe73a47280c8)

#### Step 2. Generate an API Key via `curl`

Use the **JWT token** to request your API key:

```curl curl theme={null}
curl -X POST 'https://api.io.solutions/v1/api-keys/' /
  -H 'accept: application/json' /
  -H 'token: $JWT_TOKEN' /
  -H 'Content-Type: application/json' /
  -d '{
    "description": "API Key Name",
    "expires_at": "2025-07-17T19:54:36.418Z",
    "project": "io-cloud",
    "scopes": ["all"]
}'
```

Use the returned key with the `X-API-KEY` header in your requests.

> [!WARNING]
>
> Always treat your API key as a secret! Do not share it or expose it in client-side code (e.g., browsers or mobile apps). Instead, store it securely in an environment variable or a key management service on your backend server.

![](https://mintcdn.com/io-migration/gNTVwsExumjDr_tJ/images/reference/89ab76409859c2f7bd75f88f932c24c7fa847bc0093c39a43e6efef78020266b-Containers6.jpg?fit=max\&auto=format\&n=gNTVwsExumjDr_tJ\&q=85\&s=595522d3309f6f662cca0e656418b6f3)

## Making requests

> [!CAUTION]
>
> **Note**: Accessing APIs requires IO credits. Please make sure to request IO credits before using any API endpoints. Contact support or visit the [IO Credits Request Page](https://io-migration.mintlify.site/docs/io-credits.md) for more details.

Include the API key in an `Authorization` HTTP header for all API requests:

```
Authorization: X-API-KEY \$IOCLOUD_API_KEY
```

Replace `$IOCLOUD_API_KEY` with your actual **API key.**

### Example: Check Available Replicas per Location

Here's an example `curl` command to check available replicas per location in IO Cloud:

```curl curl theme={null}
curl https://api.io.solutions/enterprise/v1/io-cloud/caas/available-replicas?hardware_id={hardawer_id}&hardware_qty={hardware_qty} /
  -H "X-API-KEY: \$IOCLOUD_API_KEY" 
```

![](https://mintcdn.com/io-migration/gNTVwsExumjDr_tJ/images/reference/53092fbca3b4f3a0eb6aa24faff77e70cb6d6f6f7519125d655babac48552ed9-Containers7.jpg?fit=max\&auto=format\&n=gNTVwsExumjDr_tJ\&q=85\&s=da9fabb5b8a931b7c843608ea5515332)

This request should return a response like this:

```json json theme={null}
{
  "data": [
    {
      "id": 0,
      "iso2": "string",
      "name": "string",
      "available_replicas": 0
    }
  ]
}
```


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