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

# Sub-account Deployment API

> Endpoint reference for managing GPUhub resources through a sub-account developer token.

This reference lists the endpoints available to sub-account developers. All endpoints use the `/api/v1/dev/sub_user` path prefix.

## Authentication and Rate Limits

Send the sub-account developer token directly in the `Authorization` request header, as shown in the [API authentication guide](https://docs.gpuhub.com/api-reference/api-authentication.md). Do not add a `Bearer` prefix.

All requests are subject to both IP-level and sub-account-level rate limits. If the token has an IP allowlist configured, the request's source IP must be on that list.

## General Endpoints

These endpoints require a valid sub-account developer token. No additional role is required.

| Method | Path | Description |
| - | - | - |
| `POST` | `/api/v1/dev/sub_user/wallet/balance` | Get the sub-account's available balance for placing orders and its voucher balance for the corresponding billing method. |
| `POST` | `/api/v1/dev/sub_user/machine/region/gpu_stock` | Get total and schedulable GPU capacity for a GPU model in a specified region. |

## Image Endpoint

Requires the image permission (`RoleImage`).

| Method | Path | Description |
| - | - | - |
| `POST` | `/api/v1/dev/sub_user/image/private/list` | Paginate through private images visible to the sub-account. Returns image IDs, names, and UUIDs. |

## Elastic Deployment Endpoints

Require the deployment permission (`RoleDeployment`). The parent account must also have completed enterprise verification.

| Method | Path | Description |
| - | - | - |
| `POST` | `/api/v1/dev/sub_user/deployment` | Create a deployment and return its UUID. |
| `POST` | `/api/v1/dev/sub_user/deployment/overview` | Preview the schedulable container count and price range for a new deployment. |
| `PUT` | `/api/v1/dev/sub_user/deployment` | Update a deployment configuration and return its UUID. |
| `PUT` | `/api/v1/dev/sub_user/deployment/overview` | Preview the number of containers expected to stop after an update, grouped by GPU model. |
| `GET` | `/api/v1/dev/sub_user/deployment` | Get details for a specified deployment. |
| `GET` | `/api/v1/dev/sub_user/deployment/list` | Paginate through deployments using URL query parameters. Returns summary fields across the parent account. |
| `POST` | `/api/v1/dev/sub_user/deployment/list` | Filter and paginate deployments using a JSON request body. Results are filtered by the sub-account's deployment data permissions. |
| `GET` | `/api/v1/dev/sub_user/deployment/overview` | Get schedulable capacity and starting and running container counts, grouped by GPU model. |
| `DELETE` | `/api/v1/dev/sub_user/deployment` | Delete a specified deployment. |
| `POST` | `/api/v1/dev/sub_user/deployment/container/list` | Paginate through container instances in a specified deployment. |
| `POST` | `/api/v1/dev/sub_user/deployment/container/event/list` | Paginate through status-change events for container instances. |
| `PUT` | `/api/v1/dev/sub_user/deployment/container/stop` | Request shutdown of a specified container instance. |
| `PUT` | `/api/v1/dev/sub_user/deployment/operate` | Stop, lock, unlock, or perform another supported operation on a deployment. |
| `PUT` | `/api/v1/dev/sub_user/deployment/refresh` | Get the target replica count, starting and running replica counts, completed count, and estimated cost. |
| `PUT` | `/api/v1/dev/sub_user/deployment/replica_num` | Set the target replica count for a deployment. |
| `POST` | `/api/v1/dev/sub_user/deployment/blacklist` | Add the machine hosting a specified container to the parent account's scheduling blacklist. Set `expire_in_minutes` to `0` to remove it. |
| `GET` | `/api/v1/dev/sub_user/deployment/blacklist` | Get the parent account's machine scheduling blacklist, optionally filtered by `machine_id`. |
| `GET` | `/api/v1/dev/sub_user/deployment/ddp/overview` | Get an overview of the duration package currently applied to a specified deployment. |


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