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

# GeneralCompute API

> Reference for the OpenAI-compatible GeneralCompute API surface.

The GeneralCompute API mirrors the OpenAI platform while adding routing, observability, and ultra-low-latency infrastructure. All SDKs (OpenAI, Vercel AI SDK, LangChain, LlamaIndex, or the official GeneralCompute clients) interact with the same schema documented here.

## OpenAPI specification

This reference uses the live OpenAPI document exported from the router. It includes every available path, schema, and security definition:

<Card title="Download openapi.json" icon="code" href="/api-reference/openapi.json">
  View the exact schema that powers the API playground.
</Card>

Key endpoints today:

| Path                        | Description                                           |
| --------------------------- | ----------------------------------------------------- |
| `POST /v1/chat/completions` | Create chat completions with optional streaming       |
| `POST /v1/models/list`      | List models available to your organization            |
| `GET /v1/public/models`     | Fetch the curated list of public models shown in docs |

### POST /v1/chat/completions

Create chat completions with optional streaming. The body mirrors OpenAI’s schema, including tool calling and JSON mode fields.

```bash theme={null}
curl https://api.generalcompute.com/v1/chat/completions \
  -H "Authorization: Bearer $GENERALCOMPUTE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
        "model": "minimax-m2.7",
        "messages": [
          {"role": "system", "content": "You are a helpful assistant."},
          {"role": "user", "content": "Summarize this paragraph"}
        ],
        "stream": false
      }'
```

Streaming uses the same payload with `"stream": true` and returns `chat.completion.chunk` events over `text/event-stream`.

### POST /v1/models/list

Returns the models enabled for your org (including private checkpoints). Use this instead of OpenAI’s `GET /v1/models`.

```bash theme={null}
curl https://api.generalcompute.com/v1/models/list \
  -H "Authorization: Bearer $GENERALCOMPUTE_API_KEY"
```

Each object contains `id`, `created`, and ownership metadata so you can dynamically populate dropdowns or perform health checks.

### GET /v1/public/models

Unauthenticated endpoint that powers the [Models & Pricing](/models) page.

```bash theme={null}
curl https://api.generalcompute.com/v1/public/models
```

Use this feed to keep your marketing site synchronized with the live catalog or to build in-product selectors that don’t rely on secrets.

## Authentication

All requests require a bearer token generated in the dashboard. Set the `Authorization` header to `Bearer <GENERALCOMPUTE_API_KEY>` and target the correct base URL for your environment. See [API Keys & Base URLs](/api-keys) for details.

The schema exposes the `ApiKeyAuth` security scheme, so Mintlify's API Explorer will automatically prompt you for a key.
