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

# Overview

> GPU cloud for AI - serverless LLM, image, video, and audio inference, the GMI Router, GPU containers and bare-metal servers, and code sandboxes.

Use **GMI Cloud** through Corsair: one client, typed API calls, local DB sync.

GMI Cloud API keys have a scope. An `ie_model` key calls inference (models, chat, router, media requests, uploads) and `apiKeys.getCurrent`. A `ce_resource` key calls GPU compute (containers, bare metal, elastic IPs, firewalls, images, templates, VPCs) and sandboxes. `idcs.list` works with either. Create the key that matches what you need under Organization Settings, API Keys.

**What you get:**

* 72 typed API operations
* 8 synced entities (`baremetals`, `containers`, `elasticIps`, `firewalls`, `mediaRequests`, `models`, and 2 more) for fast `.search()` / `.list()`

## Setup

**1. Install**

```bash npm theme={null}
npm install corsair @corsair-dev/gmicloud
```

```bash yarn theme={null}
yarn add corsair @corsair-dev/gmicloud
```

```bash pnpm theme={null}
pnpm install corsair @corsair-dev/gmicloud
```

```bash bun theme={null}
bun add corsair @corsair-dev/gmicloud
```

**2. Add the plugin**

```ts corsair.ts theme={null}
import Database from 'better-sqlite3';
import { createCorsair } from 'corsair';
import { gmicloud } from '@corsair-dev/gmicloud';

export const corsair = createCorsair({
	plugins: [
		gmicloud(),
	],
	database: new Database('corsair.db'),
	kek: process.env.CORSAIR_KEK!,
	hub: {
		projectApiKey: process.env.CORSAIR_API_KEY!,
		signingSecret: process.env.CORSAIR_SIGNING_SECRET!,
	},
});
```

Multi-tenancy is the default — scope calls with `corsair.withTenant(id)`. See [Quick start](https://docs.corsair.dev/quick-start.md) for KEK + Hub keys, and [Multi-tenancy](https://docs.corsair.dev/concepts/multi-tenancy.md) for account isolation.

**3. Choose authentication**

**API Key (Recommended)**

No setup required yet. When you make your first request as a tenant, Corsair prompts for the API key.

```ts theme={null}
gmicloud()
```

More: [API Key](https://docs.corsair.dev/concepts/api-key)

**4. Connect a tenant**

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see [Connect / OAuth](https://docs.corsair.dev/management/connect).

```ts theme={null}
const { connectUrl } = await corsair.manage.connect.createLink({
	plugin: 'gmicloud',
	tenantId: 'acme',
});
// redirect the user's browser to connectUrl
```

## Example API calls

**List LLMs**

```ts theme={null}
const tenant = corsair.withTenant('acme');
await tenant.gmicloud.api.models.list({});
```

**Create a chat completion**

```ts theme={null}
const tenant = corsair.withTenant('acme');
await tenant.gmicloud.api.chat.createCompletion({
	model: 'deepseek-ai/DeepSeek-V4-Flash',
	messages: [{ role: 'user', content: 'Summarize this ticket in one sentence.' }],
});
```

See the full list on the [API](https://docs.corsair.dev/plugins/gmicloud/api.md) page.

## Query synced data

Look up queued and finished media jobs without calling GMI Cloud.

```ts theme={null}
const tenant = corsair.withTenant('acme');
const rows = await tenant.gmicloud.db.mediaRequests.search({
	data: { status: 'success' },
	limit: 20,
});
```

Synced entities: `baremetals`, `containers`, `elasticIps`, `firewalls`, `mediaRequests`, `models`, `sandboxes`, `sandboxTemplates`. See [Database](https://docs.corsair.dev/plugins/gmicloud/database.md) for filters and operators.

## What's next

> **[API reference](https://docs.corsair.dev/plugins/gmicloud/api.md)**
>
> Every `gmicloud.api.*` operation with input and output types.

> **[Database](https://docs.corsair.dev/plugins/gmicloud/database.md)**
>
> Synced entities, search filters, and operators.

> **[Connect / OAuth](https://docs.corsair.dev/management/connect)**
>
> createLink, Hub delivery, and tenant connect flows.

> **[Use with agents](https://docs.corsair.dev/mcp-adapters/mcp-adapters)**
>
> Expose this plugin's operations as MCP tools.


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