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

# Marketplace Endpoints

> Complete reference of Swarms Marketplace endpoints for managing your agents, prompts, products, fees, token launches, and reviews

Reference for the Marketplace REST endpoints that require a **Swarms API key**.

* **Base URL:** `https://swarms.world`
* **Get an API key:** [swarms.world/platform/api-keys](https://swarms.world/platform/api-keys)

## Authentication

Send your API key in the `Authorization` header:

```text theme={null}
Authorization: Bearer YOUR_API_KEY
```

Every endpoint below requires a valid key (returns `401` otherwise). Endpoints marked *(API key or session)* also accept a logged-in session cookie, but the API key path is always available.

### Common status codes

| Code  | Meaning                                             |
| ----- | --------------------------------------------------- |
| `200` | Success                                             |
| `207` | Multi-status (partial success — batch token launch) |
| `400` | Bad request / validation error                      |
| `401` | Missing or invalid API key                          |
| `403` | Forbidden (e.g. paid content without access)        |
| `404` | Not found                                           |
| `405` | Method not allowed                                  |
| `409` | Conflict (e.g. already reviewed)                    |
| `429` | Rate limit exceeded                                 |
| `500` | Internal server error                               |

***

## Products & Fees

### `GET /api/product/list`

List every product the authenticated user has posted (agents, prompts, tools, bundles).

* **Query:** `type` — `agent` | `prompt` | `tool` | `bundle` | `all` (default `all`)
* **Returns:** `user_id`, `total`, `counts { agents, prompts, tools, bundles }`, `products[] { id, type, name, description, created_at, url }` (newest-first)

<Card title="Full reference" icon="list" href="/docs/marketplace/list-products-api">
  List Products API — request/response details and code examples
</Card>

### `GET /api/product/fees`

Creator fees (via the Jupiter partner API) generated by one of your **tokenized** products, in SOL.

* **Query (one of):** `ticker` · `id` (UUID) · `url` (full Swarms URL) · `product` (auto-detects which of the three)
* **Returns:** `name`, `uuid`, `claimedFees`, `unclaimedFees`, `totalFees`, `timestamp`
* **Notes:** Only tokenized agents/prompts have fees. If no fee data exists yet, amounts return `0`.

<Card title="Full reference" icon="coins" href="/docs/marketplace/product-fees-api">
  Product Fees API — request/response details and code examples
</Card>

### `POST /api/user-products`

Authenticated user's products across prompts/agents/tools with business-model + summary stats. *(API key or session)*

* **Body:** `page`, `limit`, `product_type` — `all` | `prompts` | `agents` | `tools`
* **Returns:** `prompts[]`, `agents[]`, `tools[]`, `pagination`, `summary`
* **Notes:** Superseded by `GET /api/product/list` (which also covers bundles + `created_at`).

### `GET|POST /api/get-tokenized-products`

Authenticated user's tokenized agents/prompts (those with a `token_address`). *(API key or session)*

* **Params (query or body):** `type` — `all` | `agent` | `prompt`; `page`, `limit`
* **Returns:** `data[] { id, name, type, token_address, listing_url }`, `counts`, `pagination`

***

## Agents

### `POST /api/add-agent`

Create a marketplace agent listing; optionally tokenize it and upload an image. *(API key or session)*

* **Body (core):** `name`, `agent` (code, nullable), `description`, `useCases[]`, `requirements[]`, `language`, `tags`, `is_free`, `price_usd`, `category`, `status`, `image_url` / `image_base64` / `file_path`, `links[]`, `seller_wallet_address`, `x402_url`, `mcp_url`
* **Body (tokenization):** `tokenized_on`, `ticker`, `creator_wallet`, `private_key`, `fee_selection` (`frenzy` | `market`), `quote_mint` (`SOL` | `USDC`), `vault_mode`
* **Returns:** `success`, `id`, `listing_url`, `tokenized`, `token_address`, `pool_address`
* **Limits:** Daily submission limit + fraud/quality validation.

### `POST /api/edit-agent`

Update an agent you own (scoped by `user_id`). *(API key or session)*

* **Body:** `id` (required) + any editable agent fields (name, agent, description, pricing, category, status, image, links, etc.)
* **Returns:** `success`, `id`, `listing_url`, `updated_data`

### `GET /api/get-agents/[id]/full`

Full agent content. `403` unless free / owner / purchased.

* **Returns:** full agent data + `access_granted`, `access_reason`

### `GET /api/get-agents/fetch-agent-count`

Count of the authenticated user's agents.

***

## Prompts

### `POST /api/add-prompt`

Create a marketplace prompt; optional tokenization + image. *(API key or session)*

* **Body:** `name`, `prompt`, `description`, `useCases[]`, `tags`, `is_free`, `price_usd`, `category`, `status`, `tokenized_on`, `ticker`, `image_url` / `image_base64` / `file_path`, `links[]`, `seller_wallet_address`, `creator_wallet`, `private_key`, `fee_selection`, `vault_mode`
* **Returns:** `success`, `id`, `listing_url`, `tokenized`, `token_address`, `pool_address`

### `POST /api/edit-prompt`

Update a prompt you own. *(API key or session)*

* **Body:** `id` (required) + editable prompt fields
* **Returns:** `success`, `id`, `listing_url`, `updated_data`

### `GET /api/get-prompts/[id]/full`

Full prompt content. `403` unless free / owner / purchased. Lookup by UUID or name.

### `GET /api/get-prompts/fetch-prompt-count`

Count of the authenticated user's prompts.

***

## Token Launch

### `POST /api/token/launch`

Launch a single tokenized agent (creates the agent + Solana token). Forwards your `Authorization` header to `add-agent`.

* **Content types:** JSON or `multipart/form-data` (image upload)
* **Body:** `name`, `description`, `ticker`, `private_key`, `image` (url / base64 / file), `fee_selection` (`frenzy` | `market`), `quote_mint` (`SOL` | `USDC`), `vault_mode`
* **Returns:** `success`, `id`, `listing_url`, `tokenized`, `token_address`, `pool_address`
* **Notes:** Requires ≥ \~0.04 SOL in the creator wallet.

### `POST /api/token/launch/batch`

Launch up to 50 tokenized agents in parallel. JSON only.

* **Body:** `private_key` (default, optional) + `tokens[] { name, description, ticker, private_key?, image?, fee_selection? }`
* **Returns:** `success`, `total`, `succeeded`, `failed`, `results[]`, `failures[]` (`207` on partial success)

***

## Reviews

### `POST /api/reviews`

Submit a review for an agent / prompt / tool (one per user per item).

* **Body:** `model_id`, `model_type` (`agent` | `prompt` | `tool`), `rating` (1–5), `comment`
* **Returns:** `success`, `review` (`409` if already reviewed)

***

## Endpoints at a glance

| Method   | Path                                  | Resource     |
| -------- | ------------------------------------- | ------------ |
| GET      | `/api/product/list`                   | Products     |
| GET      | `/api/product/fees`                   | Products     |
| POST     | `/api/user-products`                  | Products     |
| GET/POST | `/api/get-tokenized-products`         | Products     |
| POST     | `/api/add-agent`                      | Agents       |
| POST     | `/api/edit-agent`                     | Agents       |
| GET      | `/api/get-agents/[id]/full`           | Agents       |
| GET      | `/api/get-agents/fetch-agent-count`   | Agents       |
| POST     | `/api/add-prompt`                     | Prompts      |
| POST     | `/api/edit-prompt`                    | Prompts      |
| GET      | `/api/get-prompts/[id]/full`          | Prompts      |
| GET      | `/api/get-prompts/fetch-prompt-count` | Prompts      |
| POST     | `/api/token/launch`                   | Token Launch |
| POST     | `/api/token/launch/batch`             | Token Launch |
| POST     | `/api/reviews`                        | Reviews      |
