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

# Pin API & metadata

## Pin API & metadata

Host token branding before an Instant or external launch.

***

### `POST /api/pin`

Pins files or JSON through **Pinata** (server-side `PINATA_JWT`).

Base: `https://zardoz.fun/api/pin`

#### Multipart (logo + metadata)

```bash
curl -X POST "https://zardoz.fun/api/pin" \
  -F "logo=@./logo.png" \
  -F 'metadata={"name":"My Token","symbol":"MYT","description":"Launched on Zardoz"}'
```

| Field      | Type        | Notes                 |
| ---------- | ----------- | --------------------- |
| `logo`     | file        | PNG/JPG/WebP          |
| `metadata` | JSON string | Token metadata object |

#### JSON-only (metadata already hosted)

Send `Content-Type: application/json` with full metadata body.

***

### Metadata JSON shape

Required / recommended fields for Discover + pad compatibility:

```json
{
  "name": "My Token",
  "symbol": "MYT",
  "description": "Launched on Zardoz",
  "image": "https://ipfs.io/ipfs/Qm…",
  "logo": "https://ipfs.io/ipfs/Qm…",
  "logoURI": "https://ipfs.io/ipfs/Qm…",
  "external_url": "https://zardoz.fun/token/0x…",
  "website": "https://example.com",
  "twitter": "https://x.com/example",
  "telegram": "https://t.me/example"
}
```

| Field            | Used by                                   |
| ---------------- | ----------------------------------------- |
| `logoURI`        | Instant factory on-chain binding          |
| `image` / `logo` | Wallets, terminals, OpenSea-style viewers |
| `metadataURI`    | Points to this JSON (IPFS or HTTPS)       |

***

### Self-hosting (no Pin API)

You may host metadata anywhere reachable over **HTTPS** or **IPFS**:

```
https://your-cdn.com/token/meta.json
ipfs://Qm…/meta.json
```

Pass URIs directly into Instant `create(CreateParams)` — no `/api/pin` required.

***

### IPFS proxy

Read pinned content through the app gateway (CORS-safe):

```
GET https://zardoz.fun/api/ipfs/QmHash/path
```

***

### Launch form integration

The [/launch](https://zardoz.fun/launch) UI calls `/api/pin` automatically when you upload a logo. Returned URIs populate the factory calldata builder in `lib/launch-form.ts`.

***

### Errors

| Status | Cause                                 |
| ------ | ------------------------------------- |
| 400    | Missing logo/metadata                 |
| 502    | Pinata upstream failure               |
| 503    | `PINATA_JWT` not configured on server |

Next: Launching · Instant contracts


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://zardoz.gitbook.io/zardoz-docs-1/pin-api-and-metadata.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
