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

# Developer API

> Read Gabox from your own app, with no key and no sign-up

The Gabox public API lets your app read every machine, pack, draw and Mega Pack round. It also answers with totals, the program ID and the program's IDL. Reads need no key and no sign-up.

The API serves Solana mainnet. Every answer says which cluster it read in `meta.cluster`.

## Base URL

```text theme={null}
https://actions.gabox.fun/v1
```

Every route in these pages hangs off this base. The API is the same one that the [developers page](https://gabox.fun/developers) on the website documents. You can run every live request from that page.

## Your first request

Ask for the newest machines. You need no key and no headers.

```bash curl theme={null}
curl "https://actions.gabox.fun/v1/machines?limit=2"
```

```js JavaScript theme={null}
const API = "https://actions.gabox.fun/v1"

const res = await fetch(`${API}/machines?limit=2`)
const { data, meta, page } = await res.json()

console.log(meta.cluster)       // "mainnet-beta"
console.log(data[0].account)    // "Pool" or "TokenMachine"
console.log(page.nextCursor)    // send it back as `cursor` for the next page
```

The API allows calls from any website (CORS is open). You can call it from a browser, a server or a script.

## What you can build

> [card] [Machines](https://docs.gabox.fun/developer/machines.md)
>
> List machines of both kinds, read one machine, or get it as one Markdown file for an AI.

> [card] [Draws](https://docs.gabox.fun/developer/draws.md)
>
> Follow one pack's draw until MagicBlock's randomness settles it.

> [card] [Pulls](https://docs.gabox.fun/developer/pulls.md)
>
> Show the packs a machine opened, and the biggest recent wins.

> [card] [Mega Pack](https://docs.gabox.fun/developer/mega-pack.md)
>
> Show what a graduated launch machine's Mega Pack paid its holders.

> [card] [Stats and program](https://docs.gabox.fun/developer/stats-and-program.md)
>
> Totals, the program ID, the pack sizes, the OpenAPI document and the IDL.

> [card] [AI agent skill](https://docs.gabox.fun/developer/agent-skill.md)
>
> Install the whole API as a skill for your AI agent, in one command.

## Every route

These routes are **live**. They answer today.

| Route | What it answers |
| - | - |
| `GET /v1/machines` | Every live machine of both kinds, newest first. `?mint=` lists the machines on one coin. |
| `GET /v1/machines/{machine}` | One machine: its kind, packs, prize tiers, vault and seed lock. A launch machine also has its Machine recharge. |
| `GET /v1/machines/{machine}/brief.md` | One machine as Markdown, made for an AI. |
| `GET /v1/machines/{machine}/pulls` | One machine's packs, newest first. |
| `GET /v1/machines/{machine}/mega` | One launch machine's newest Mega Pack rounds. |
| `GET /v1/pulls/top` | The biggest recent wins on every machine. |
| `GET /v1/draws/{address}` | One draw: waiting, or settled with its result. |
| `GET /v1/stats` | Totals: machines, packs and volume. |
| `GET /v1/program` | The program ID, the pack sizes and the pack fee. |
| `GET /v1/openapi.json` | Every live route, as OpenAPI 3.1. |
| `GET /v1/idl.json` | The Gabox program's Anchor IDL. |

`{machine}` is the machine's own address. A coin's mint also works there, and it finds the coin's launch machine. See [Machines](https://docs.gabox.fun/developer/machines.md).

These routes are in **preview**. Gabox documents them with a sample answer, but the API does not serve them yet. Until it does, users take these steps on [gabox.fun](https://gabox.fun). See [Preview calls](https://docs.gabox.fun/developer/preview-calls.md).

| Route | What it will do |
| - | - |
| `POST /v1/machines/build` | Build a launch transaction. |
| `POST /v1/token-machines/build` | Build the transaction that opens a machine on a coin that already exists. |
| `POST /v1/packs/build` | Build a pack's buy transaction. |
| `GET /v1/fees/{wallet}` | Show a creator's claimable fees, Machine recharge parts included. |
| `POST /v1/fees/claim/build` | Build one transaction that claims every creator fee. |

## Your keys stay yours

The API only reads, and later it will also build transactions. Your user's wallet signs every transaction. Gabox never asks for a private key or a seed phrase, and it never holds one.

Figures from the API are for display. A pack's buy transaction carries signed limits for the coins and the top prize. The program refuses a result that is worse than those limits. See [Opening a pack](https://docs.gabox.fun/opening-a-pack.md#what-you-sign).

## Read next

* [Requests and answers](https://docs.gabox.fun/developer/requests-and-answers.md): the answer shape, amounts and pages.
* [Limits and errors](https://docs.gabox.fun/developer/limits-and-errors.md): rate limits, API keys and error codes.
* [Common tasks](https://docs.gabox.fun/developer/common-tasks.md): short recipes for the things most apps do.
* [AI agent skill](https://docs.gabox.fun/developer/agent-skill.md): let your AI agent use the API for you.

Is something in these pages wrong or hard to follow? [Message us on X](https://x.com/gabox_fun) or write to [hello@gabox.fun](mailto:hello@gabox.fun), and we will fix it.


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