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

# Agents API (Control Plane)

> Manage the full ModelsLab account lifecycle via API: signup, auth, training, billing, wallet, subscriptions, servers, and more.

The Agents API is the control plane for programmatic account management. It supports a fully headless workflow from signup to API key creation with no browser required. For content generation, use the existing generation APIs (`/api/v6`, `/api/v7`, `/api/v8`) with your API key.

## Base URL

```text theme={null}
https://modelslab.com/api/agents/v1
```

## Authentication Model Split

* **Agents API (`/api/agents/v1`)**: Bearer token (Sanctum personal access token)
* **Generation APIs (`/api/v6`, `/api/v7`, `/api/v8`)**: existing API key flow continues

Token issuance supports `token_expiry` on login:

* `1_week`
* `1_month` (default)
* `3_months`
* `never`

<Note>
  Use a Bearer token to manage account and billing operations.
  Use API keys for generation requests via `/api/v6`, `/api/v7`, `/api/v8`.
</Note>

## Standard Response Envelope (Agents API)

```json theme={null}
{
  "data": {},
  "error": null,
  "meta": {
    "request_id": "<request-id>"
  }
}
```

Error shape:

```json theme={null}
{
  "data": null,
  "error": {
    "code": "validation_error",
    "message": "Human readable message",
    "details": {}
  },
  "meta": {
    "request_id": "<request-id>"
  }
}
```

## Rate Limiting

Agents API uses dedicated limiters. All responses include `X-RateLimit-Remaining` and `X-RateLimit-Reset` headers.

* `agent-auth`: signup/login/forgot/reset/resend verification
* `agent-billing`: payment methods, wallet funding, coupon redemption, subscription mutations, server deployment
* `agent-general`: authenticated control-plane endpoints

## Endpoint Groups

<CardGroup cols={2}>
  <Card title="Authentication" href="/agents-api/authentication">
    Signup, login, logout, headless email verification, token refresh, and password reset.
  </Card>

  <Card title="Profile & API Keys" href="/agents-api/profile-and-api-keys">
    Read/update profile and manage API keys.
  </Card>

  <Card title="Usage & Models" href="/agents-api/usage-and-models">
    Usage summaries/history and model discovery APIs.
  </Card>

  <Card title="Billing & Wallet" href="/agents-api/billing-and-wallet">
    Payment methods, SetupIntent for headless card tokenization, billing info, invoices, wallet transactions, and wallet funding.
  </Card>

  <Card title="Subscriptions" href="/agents-api/subscriptions">
    Discover plans, pay-as-you-go options, direct headless subscriptions, and manage subscription lifecycle.
  </Card>

  <Card title="Training" href="/agents-api/training">
    Start and monitor model training and fine-tuning jobs.
  </Card>

  <Card title="Servers" href="/agents-api/servers">
    Deploy and manage custom/enterprise dedicated servers.
  </Card>

  <Card title="Uploads" href="/agents-api/uploads">
    Presigned URL and base64 file uploads for training and generation.
  </Card>

  <Card title="Teams" href="/agents-api/teams">
    Team members, invites, and invitation acceptance.
  </Card>

  <Card title="Headless Agent Flow" href="/agents-api/headless-flow">
    Complete account-to-generation walkthrough in 6 steps with no browser.
  </Card>

  <Card title="Compatibility Notes" href="/agents-api/compatibility-notes">
    Verification compatibility route and removed legacy endpoints.
  </Card>
</CardGroup>
