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

# API Overview

> ASG Agent Cloud API Reference

# API Overview

ASG Agent Cloud uses the **Model Context Protocol (MCP)** for all tool interactions.

## Endpoints

ASG exposes two endpoints — use whichever matches your integration:

| Endpoint             | Protocol               | Use case                      |
| :------------------- | :--------------------- | :---------------------------- |
| `/v1/mcp/tools/call` | **REST** (recommended) | Quickstart, most integrations |
| `/mcp`               | **JSON-RPC 2.0**       | MCP-native agent frameworks   |

Base URL:

```
https://agent.asgcompute.com
```

## Protocol

All requests use **JSON-RPC 2.0** over HTTP POST.

## Request Format

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "tool_name",
    "arguments": { ... },
    "_meta": {
      "payment": {
        "tx_signature": "optional-payment-proof"
      }
    }
  }
}
```

## Methods

| Method       | Description          |
| :----------- | :------------------- |
| `tools/list` | List available tools |
| `tools/call` | Execute a tool       |

## Authentication

All requests require an API key via Bearer token:

```bash theme={null}
Authorization: Bearer <api_key>
```

Create API keys in the [Console](https://agent.asgcompute.com/console). See [Authentication](/security/authentication) for details.

## Response Format

### Success (200)

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": "...",
    "_meta": {
      "receipt_id": "rcpt_abc123",
      "debited_usdc_microusd": 10000
    }
  }
}
```

### Payment Required (402)

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": 402,
    "message": "Payment Required",
    "data": {
      "quote_id": "quote_xyz",
      "amount_usdc_microusd": 10000,
      "expires_at": "2026-02-01T12:01:00Z"
    }
  }
}
```

## Active Tools

| Tool                   | Description                     | Billable | Status      |
| :--------------------- | :------------------------------ | :------- | :---------- |
| `inference_chat`       | AI completions with 100+ models | Yes      | ✅ Available |
| `optify_vram_estimate` | Estimate VRAM requirements      | Yes      | ✅ Available |
| `sandbox_execute`      | Execute code in isolation       | Yes      | ✅ Available |
| `sandbox_cancel`       | Cancel running sandbox          | No       | ✅ Available |
| `get_status`           | System status + balance         | No       | ✅ Available |
| `echo`                 | Validate auth + connectivity    | No       | ✅ Available |

<Note>
  See [Tool Availability](/guide/tool-availability) for the full catalog and roadmap.
</Note>

## Rate Limits

| Tier       | Requests/min | Requests/day |
| :--------- | :----------- | :----------- |
| Default    | 60           | 10,000       |
| Enterprise | Custom       | Custom       |

## Next Steps

<CardGroup cols={2}>
  <Card title="Error Codes" icon="triangle-exclamation" href="/api/errors">
    Full error code reference
  </Card>

  <Card title="SDK" icon="code" href="/sdk/typescript">
    Use our TypeScript SDK
  </Card>
</CardGroup>
