> For the complete documentation index, see [llms.txt](https://stonkfun.gitbook.io/stonkfun-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stonkfun.gitbook.io/stonkfun-docs/developer-api/openapi.md).

# OpenAPI spec

```
GET https://www.stonkfun.xyz/api/public/v1/openapi.json
```

An OpenAPI 3.1 document, generated at request time.

## Generate a client

```bash
npx @openapitools/openapi-generator-cli generate \
  -i https://www.stonkfun.xyz/api/public/v1/openapi.json \
  -g typescript-fetch \
  -o ./stonkfun-client
```

## Optional features are filtered out

A parameter behind a feature the platform is not currently offering disappears from this spec and from the reference pages together.

That matters most for generated clients: one should never be handed a parameter the server would refuse, because you would write the call, sign a payment, and only then find out.

| Feature unavailable  | What is missing from the spec                                                               |
| -------------------- | ------------------------------------------------------------------------------------------- |
| Dev buys             | `devBuyPercent`, `devBuySol`                                                                |
| Current reward model | `rewardTaxBps`, and `mode`'s reward description changes                                     |
| Airdrops             | `airdropPercent`, `airdropTier`, `airdropSource`, and `GET /tokens/{mint}/airdrop` entirely |

## No security schemes

The document carries no security schemes and no security requirement on any operation.

This API has no keys. A launch is authorised by the creator's signature on the fee payment, which travels in the request body rather than a header, so there is nothing for OpenAPI's auth model to describe. Generated clients come out with no credential parameter, which is correct.

## Response schemas are deliberately shallow

Successful responses are documented as:

```json
{ "data": { "type": "object" }, "meta": { "type": "object" } }
```

That is on purpose. The value of the spec here is discoverability and client scaffolding, and hand-written response schemas for twenty endpoints would be a second thing to keep in sync that would quietly rot. These docs describe the shapes with real examples instead.

Error responses are fully enumerated, since clients branch on them:

```json
{
  "error": {
    "code": { "enum": ["invalid_request", "forbidden", "not_found",
                       "method_not_allowed", "conflict", "rate_limited",
                       "internal", "service_unavailable"] },
    "message": { "type": "string" },
    "retryable": { "type": "boolean" },
    "retryAfterSeconds": { "type": "integer" }
  }
}
```

## Tags

| Tag      | Contents                                     |
| -------- | -------------------------------------------- |
| `Data`   | Tokens, launches, pairs, rewards and revenue |
| `Launch` | Create tokens programmatically               |
| `Fees`   | The creator fee read and the two claim steps |

`Fees` holds the read and both claim steps together, because the read is only useful as the thing you check before claiming.

## Servers

The `servers` entry is derived from the request's own origin, so the spec is correct wherever you fetch it from.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://stonkfun.gitbook.io/stonkfun-docs/developer-api/openapi.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
