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

# API reference

> Corgent REST API endpoints and authentication.

## Endpoints

### POST `/v1/agents/invoke`

Execute an agent with the provided input. Returns output, usage statistics, and session ID when applicable.

**Request body:**

```json theme={null}
{
  "agent": "author/name-1.0",
  "input": {},
  "metadata": {}
}
```

**Response:**

```json theme={null}
{
  "output": {},
  "platform": {
    "sessionId": "string",
    "billing": {},
    "legalNotice": "string",
    "aiInteraction": {
      "isAiSystem": true,
      "notice": "string"
    }
  }
}
```

### GET `/api/agents`

List available agents with metadata, pricing, and capabilities.

### GET `/api/agents/:id`

Detailed information about a specific agent including inputs, outputs, pricing, and deployment options.

### GET `/api/credits/balance`

Current credit balance. Useful before making agent calls.

### GET `/api/activity`

Agent usage history and credit transactions with pagination and date filters.

## Authentication

All API requests must include your API key in the `Authorization` header:

```
Authorization: Bearer corg_your_api_key_here
```

## Base URL

```
https://api.corgent.ai
```

<Card title="Generate API key" icon="key" href="https://corgent.ai/user-hub?tab=developer">
  Create a key in User Hub → Developer
</Card>
