# Agents and API resources

Give your tools the same kit information and guides that power the website.

Public discovery endpoints are account-free. Use the dashboard or @spawnkit/cli for publishing.

<a id="resource-map"></a>

## Find the right resource

| Resource | Use it for |
| --- | --- |
| [llms.txt](https://spawnkit.cloud/llms.txt) | An index of the maintained guides and discovery files. |
| [Kit catalog](https://spawnkit.cloud/catalog/v1.json) | Kit IDs, supported combinations, dependencies, scripts, and download URLs. |
| [OpenAPI document](https://spawnkit.cloud/openapi.json) | The public catalog and curated download endpoint contracts. |
| [auth.md](https://spawnkit.cloud/auth.md) | Supported sign-in behavior and current limitations. |
| [Agent skill ZIP](https://spawnkit.cloud/downloads/skills/spawnkit.zip) | A reusable skill with create, extend, publish, and authentication references. |

Every guide also has a Markdown version. Use **Copy as Markdown** at the top of a guide, or choose **View Markdown** to open the plain-text source. HTML and Markdown are generated from the same maintained content.

<a id="catalog"></a>

## Read the kit catalog

**HTTP · public catalog**

```http
GET https://spawnkit.cloud/catalog/v1.json
```

The response uses `schemaVersion: 1` and describes rendering engines, physics, UI, telemetry, component requirements, and curated kits. Each kit includes its ID, download URL, and resolved scripts and dependencies.

Resolve supported combinations before generating or changing a project. Use IDs returned by the catalog; do not assume that any arbitrary combination of engines and modules is supported.

**JavaScript · find a kit download**

```js
const response = await fetch('https://spawnkit.cloud/catalog/v1.json')
if (!response.ok) throw new Error(`Catalog request failed: ${response.status}`)

const catalog = await response.json()
const kit = catalog.kits.find((kit) => kit.id === 'phaser')
if (!kit) throw new Error('Kit unavailable')

console.log(kit.downloadUrl)
console.log(kit.scripts)
```

Run this example in Node.js 24 or in your agent's tooling. Downloaded archives contain standalone source projects; downloading one does not install dependencies or run the game.

<a id="agent-skill"></a>

## Use the SpawnKit skill

Download the [SpawnKit skill ZIP](https://spawnkit.cloud/downloads/skills/spawnkit.zip), extract the `spawnkit` folder, and add it using your agent's documented skill-installation mechanism.

**Skill package**

```text
spawnkit/
├── SKILL.md
└── references/
    ├── create.md
    ├── extend.md
    ├── publish.md
    └── authentication.md
```

The skill directs your agent to the relevant guide. The project's `AGENTS.md` adds its own setup and validation instructions. Read and preserve any instructions already present in an existing game.

> **Account access stays explicit**
>
> A skill describes a workflow; it does not grant permission to access an account or deploy a game. Publishing still requires the user's authorization and access to the target project.

<a id="api-scope"></a>

## API coverage and responses

The [OpenAPI document](https://spawnkit.cloud/openapi.json) covers the public catalog and curated kit downloads. Authenticated project, billing, and administrative APIs are outside its scope. For the implemented command interface, see the [CLI reference](https://spawnkit.cloud/docs/cli).

| Response | Meaning |
| --- | --- |
| `200` | The requested resource is available. |
| `404` | The kit or resource does not exist. Refresh the catalog before retrying an old kit ID. |
| `405` | The HTTP method is unsupported. Read the `Allow` header; downloads support `GET` and `HEAD`. |

Catalog v1 changes are additive. Clients should ignore unknown fields; breaking changes require a new versioned path. Prefer the URLs returned by the catalog over constructing download paths.

<a id="cli-output"></a>

## Automating an existing CLI

`@spawnkit/cli` supports `--json` for machine output. See [CLI installation](https://spawnkit.cloud/docs/cli#installation) for package-runner and global installation commands.

- Successful commands write their JSON result to stdout.
- Login writes newline-delimited authorization and completion records.
- Live build progress goes to stderr; a failure returns a JSON error there and exits nonzero.
- Use `--dry-run --json` to inspect a mutation. JSON mode is noninteractive; mutations require `--yes`.
- Check returned status fields and preserve operation IDs when resuming or retrying.

See [CLI deployment and recovery](https://spawnkit.cloud/docs/publishing#cli-deployment) for the command sequence, and [Accounts and access](https://spawnkit.cloud/docs/authentication) for local sign-in behavior.
