Swarms Marketplace Skill

Prompt

Swarms Marketplace Skill

Creator:

About this prompt

Comprehensive reference for the Swarms Marketplace APIs. Use when creating/editing/querying agents or prompts, tokenizing agents (single or batch), claiming fees, or integrating with swarms.world. Covers CRUD for agents and prompts, token launch, batch token launch, schemas, examples, and error handling.

Link: swarms.world/skill.md

Characters15,651
Words1,925
~Tokens3,913
Size15.3 KB

name: swarms-marketplace-api description: Comprehensive reference for the Swarms Marketplace APIs. Use when creating/editing/querying agents or prompts, tokenizing agents (single or batch), claiming fees, or integrating with swarms.world. Covers CRUD for agents and prompts, token launch, batch token launch, schemas, examples, and error handling.

Swarms Marketplace API – Skill Reference

Use this skill when working with the Swarms Marketplace: agents, prompts, tokenization (single and batch), and fee claims. All endpoints are under the marketplace base URL; authentication uses an API key or Supabase session.

Full documentation (for deeper detail):


Base URLs & authentication

ServiceBase URL
Marketplace APIhttps://swarms.world
Swarms APIhttps://api.swarms.world

Authentication: Send API key in the header: Authorization: Bearer YOUR_API_KEY.
Get keys at: https://swarms.world/platform/api-keys


1. Agents API (CRUD)

Create agent – POST /api/add-agent

Required: name (min 2 chars), description, useCases (array, at least one).
Optional: agent (code, min 5 chars if set), language, requirements, tags, is_free (default true), price_usd (if paid), category, status, tokenized_on, ticker/creator_wallet/private_key (if tokenized), image_url/file_path/image_base64, links, seller_wallet_address, x402_url, mcp_url.

Schema (input):

ParameterTypeRequiredDescription
namestringYesDisplay name, min 2 characters
agentstringNoAgent code; min 5 chars if provided
descriptionstringYesDescription of the agent
languagestringNoe.g. "python", "javascript"
requirementsarrayNo[{ "package": string, "installation": string }]
useCasesarrayYes[{ "title": string, "description": string }]
tagsstringNoComma-separated
is_freebooleanNoDefault true
price_usdnumberIf paidRequired when is_free is false; > 0
categorystringNoe.g. "data-science"
statusstringNopending | approved | rejected; default pending
tokenized_onbooleanNoEnable Solana tokenization
tickerstringIf tokenRequired when tokenized_on is true; uppercase alphanumeric, max 10
creator_walletstringIf tokenCreator wallet public key
private_keystringIf tokenJSON array of 64 bytes, base64, or base58
image_url / file_path / image_base64stringNoImage (one of these)
linksarrayNoStrings or { "name": string, "url": string }
seller_wallet_addressstringNoSeller wallet
x402_url / mcp_urlstringNoValid URL or empty string

Success (200):

{ "success": true, "id": "550e8400-e29b-41d4-a716-446655440000", "listing_url": "https://swarms.world/agent/550e8400-e29b-41d4-a716-446655440000", "tokenized": false, "token_address": null, "pool_address": null }

Example – create agent (cURL):

curl -X POST https://swarms.world/api/add-agent \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Data Analysis Agent", "agent": "from swarms import Agent\n\nclass DataAnalysisAgent(Agent):\n def analyze(self, data):\n pass", "description": "An AI agent for analyzing datasets", "language": "python", "requirements": [{"package": "pandas", "installation": "pip install pandas"}], "useCases": [{"title": "Financial Analysis", "description": "Analyze financial data"}], "tags": "data,analysis,python", "is_free": false, "price_usd": 19.99, "category": "data-science" }'

Update agent – POST /api/edit-agent

Same body as create, plus required id (agent UUID).

Example:

curl -X POST https://swarms.world/api/edit-agent \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Advanced Data Agent", "description": "Updated description", "price_usd": 24.99}'

Query agents – POST /api/query-agents

Auth: Optional.
Body: search, category, priceFilter ("all" | "free" | "paid"), userFilter, sortBy ("newest" | "oldest" | "popular" | "rating"), limit (1–100, default 6), offset (default 0).

Example:

curl -X POST https://swarms.world/api/query-agents \ -H "Content-Type: application/json" \ -d '{"search": "data analysis", "category": "data-science", "sortBy": "newest", "limit": 10, "offset": 0}'

Response: Array of agent objects (id, name, agent, description, language, requirements, use_cases, tags, is_free, price_usd, category, status, image_url, user_id, created_at, updated_at, etc.).


2. Prompts API (CRUD)

Create prompt – POST /api/add-prompt

Required: name (min 2 chars), prompt (min 5 chars), useCases (at least one), tags (min 2 chars).
Optional: description, is_free, price_usd, category, status, tokenized_on, ticker/creator_wallet/private_key (if tokenized), image_url/file_path/image_base64, links, seller_wallet_address.

Schema (input): Same pattern as agents for pricing, tokenization, and images; content field is prompt instead of agent.

Success (200):

{ "success": true, "id": "550e8400-e29b-41d4-a716-446655440000", "listing_url": "https://swarms.world/prompt/550e8400-e29b-41d4-a716-446655440000", "tokenized": false, "token_address": null, "pool_address": null }

Example – create prompt:

curl -X POST https://swarms.world/api/add-prompt \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Technical Blog Writer", "prompt": "You are an expert technical writer. Topic: {topic}", "description": "Prompt for technical blog posts", "useCases": [{"title": "Tutorial Creation", "description": "Step-by-step tutorials"}], "tags": "writing,technical,blog", "is_free": false, "price_usd": 4.99, "category": "content" }'

Update prompt – POST /api/edit-prompt

Same as create plus required id (prompt UUID).

Query prompts – POST /api/query-prompts

Body: search, category, priceFilter, userFilter, sortBy, limit (1–100), offset.
Response: Array of prompt objects.

Using a marketplace prompt with an agent: Set marketplace_prompt_id in agent config (e.g. Swarms API completions); the system fetches the prompt from the marketplace. See https://docs.swarms.ai/docs/marketplace/prompts-api#using-marketplace-prompts-with-agents.


3. Token Launch (single) – create agent + token in one call

Endpoint: POST https://swarms.world/api/token/launch
Content-Type: application/json or multipart/form-data (for image file).

Body (JSON):

ParameterTypeRequiredDescription
namestringYesMin 2 characters
descriptionstringYesNon-empty
tickerstringYes1–10 chars, letters/numbers only; uppercased
private_keystringYesJSON array, base64, or base58 (64 bytes)
imagestring/fileNoURL, base64, or multipart file

Creates a minimal agent listing and mints a token on Solana. Cost ~0.04 SOL (from wallet tied to private_key).

Success (200):

{ "success": true, "id": "550e8400-e29b-41d4-a716-446655440000", "listing_url": "https://swarms.world/agent/550e8400-e29b-41d4-a716-446655440000", "tokenized": true, "token_address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU", "pool_address": "9yZ...configKey" }

Example (JSON):

curl -X POST https://swarms.world/api/token/launch \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "My Token Agent", "description": "Agent launched and tokenized via API.", "ticker": "MAG", "private_key": "[1,2,3,...]" }'

Multipart (image): Use -F "image=@/path/to/icon.png" with other fields as form fields.


4. Token Launch Batch – multiple tokens in one request

Endpoint: POST https://swarms.world/api/token/launch/batch
Content-Type: application/json only (no multipart).
Batch size: 1–50 tokens per request. Tokens are processed in parallel.

Body:

ParameterTypeRequiredDescription
private_keystringConditionalDefault key for all tokens; required if any token has no own private_key
tokensarrayYes1–50 token items (see below)

Token item:

FieldTypeRequiredDescription
namestringYesMin 2 characters
descriptionstringYesNon-empty
tickerstringYes1–10 chars, letters/numbers only
private_keystringNoOverride top-level key for this token
imagestringNoURL or base64 (no multipart in batch)

Success – all succeeded (200):

{ "success": true, "total": 2, "succeeded": 2, "failed": 0, "results": [ {"success": true, "index": 0, "id": "uuid", "listing_url": "https://swarms.world/agent/...", "token_address": "...", "pool_address": "..."}, {"success": true, "index": 1, "id": "uuid", "listing_url": "...", "token_address": "...", "pool_address": "..."} ] }

Partial success (207): Some items failed. Same structure; success: false, succeeded + failed counts; failed entries in results have success: false, index, error. Optional failures array lists only failed items.

Example – batch launch:

curl -X POST https://swarms.world/api/token/launch/batch \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "private_key": "[1,2,3,...]", "tokens": [ {"name": "Agent One", "description": "First.", "ticker": "ONE"}, {"name": "Agent Two", "description": "Second.", "ticker": "TWO"} ] }'

Mixed keys: Set top-level private_key and override per token with private_key on individual items.


5. Tokenization details (costs & bonding curve)

  • Creation fee: 0.04 SOL per token (~$4 USD equivalent; varies with SOL price). One-time, paid when launching the token.
  • Initial market cap: 18 SOL equivalent.
  • Graduation market cap: 400 SOL equivalent; after that the token graduates from the virtual pool and is tradeable on DEXs.
  • Ticker: 1–10 characters, letters and numbers only; stored uppercase (e.g. AGENT, MYBOT).

Full details: https://docs.swarms.ai/docs/marketplace/tokenization_details


6. Claim Fees API

Endpoint: POST https://swarms.world/api/product/claimfees
Auth: No API key; wallet identity via privateKey in body.

Body:

ParameterTypeRequiredDescription
castringYesToken mint/contract address (32–44 chars)
privateKeystringYesBase58 wallet private key (fee-owner)

Success (200):

{ "success": true, "signature": "5V7x...", "amountClaimedSol": 0.42, "fees": { "unclaimedSol": 0.42, "claimedSol": 1.08, "totalSol": 1.5 } }

7. Error responses & status codes

Common error body fields: error, message, details, status_code. Optional: errors (validation), existingId (duplicate), how_to_get_key (401), currentUsage, limits, resetTime (429), token_index (batch/per-token errors), required_sol, current_balance_sol (insufficient SOL).

CodeMeaning
200Success
207Multi-Status (batch: partial success; check results)
400Bad request (validation, invalid key, insufficient SOL, etc.)
401Unauthorized (missing/invalid API key)
403Forbidden (content validation failed)
404Not found
405Method not allowed
429Too many requests (rate limit)
500Internal server error

401 example: Response includes how_to_get_key: "https://swarms.world/platform/api-keys".


8. Rate limits

  • Paid agents / Paid prompts / Free content: 500 per user per day each; reset at midnight UTC.
  • Batch token launch: each token in the batch counts toward the agent creation limit.

429 responses include currentUsage, limits, and resetTime.


9. Validation & content rules

  • Agents: Duplicate = same name + same agent content for same user → 400 with existingId. Content validation can return trustworthiness, contentQuality.
  • Prompts: Duplicate = same content for same user → 400 with existingId.
  • Tokenization: When tokenized_on is true (or using token launch), ticker + creator_wallet + private_key required for add-agent/add-prompt; for token launch only private_key (and name, description, ticker) required.
  • Private key formats: JSON array of 64 integers, base64, or base58 (e.g. Phantom export).

10. Quick reference – endpoints

APIEndpointMethodAuthPurpose
Agents/api/add-agentPOSTYesCreate agent
Agents/api/edit-agentPOSTYesUpdate agent
Agents/api/query-agentsPOSTNoSearch/filter agents
Prompts/api/add-promptPOSTYesCreate prompt
Prompts/api/edit-promptPOSTYesUpdate prompt
Prompts/api/query-promptsPOSTNoSearch/filter prompts
Token/api/token/launchPOSTYesSingle agent + token
Token/api/token/launch/batchPOSTYesBatch agent + token (1–50)
Fees/api/product/claimfeesPOSTNo*Claim SOL fees (*wallet via body)

When in doubt or when you need full request/response schemas, code samples in multiple languages, or edge-case behavior, use the full documentation URLs listed at the top of this skill.

Comments & Discussion

Scroll to load comments...

Tags

Claude Code
Skill dot md
Developer agent

Share

Chat

Chat
Related Links
Tokenization

This item is not available for tokenization.

Loading recommendations...

Yuki

Your Marketplace Companion

Prompt

Hey, I'm Yuki 👋

Ask me about specific products, customer support, or anything about the Swarms Marketplace.