Use this file to discover all available pages before exploring further.
POSThttps://swarms.world/api/token/launch/batchCreates multiple tokenized agents in a single request. Each item in the batch is launched the same way as the single Token Launch endpoint: minimal agent listing plus token creation on Solana via Jupiter. You can use one private key for all tokens (top-level private_key) or a different key per token (or a mix of both).Use cases: Launch many agents from one wallet, or from multiple wallets in one call; bulk tokenization with consistent or per-item metadata.Content type: This endpoint accepts JSON only (application/json). For multipart or file uploads, use the single Token Launch endpoint per token.Batch size: Minimum 1 token, maximum 50 tokens per request.Execution: All tokens are processed in parallel. If some items fail (e.g. downstream Add Agent errors), the response uses HTTP 207 Multi-Status and includes both successes and failures in results.
Default private key for all tokens. Required if any token does not provide its own private_key.
tokens
array
Yes
Array of token definitions (1–50 items). See Token item below.
Token item (each element of tokens):
Field
Type
Required
Description
name
string
Yes
Display name of the agent. Minimum 2 characters.
description
string
Yes
Description of the agent. Cannot be empty.
ticker
string
Yes
Token symbol (e.g. MAG, SWARM). 1–10 characters; only letters and numbers. Automatically uppercased.
private_key
string
No
Overrides the top-level private_key for this token only. Use when different wallets create different tokens.
image
string
No
Agent/token image. URL (https://... or http://...): used as-is. Base64 (data URL or raw): uploaded to Supabase Storage, then the Supabase URL is sent to Jupiter. Omit for no image.
Private key rule: Every token must have a private key. Either set private_key at the top level (applies to all tokens that don’t set their own) or set private_key on each token, or mix: some tokens use the default, others override with their own.
When at least one token fails (e.g. Add Agent returns an error), the response status is 207 Multi-Status. The body has the same structure as above, with:
success: false
succeeded + failed: counts of successful and failed items
results: array of both successful and failed items, sorted by index
failures: optional array of only the failed items (for convenience)
Failure result item (entry in results when that token failed):
Field
Type
Description
success
boolean
Always false.
index
number
Zero-based index of the token in the request tokens array.
error
string
Error message (e.g. from Add Agent or tokenization).
Request-level errors (validation, invalid key, insufficient SOL, wrong content type, etc.) return a single error object, not a batch result.
Field
Type
Description
error
string
Short error category (e.g. Validation error, Invalid private key).
message
string
Human-readable error description.
details
string | object
Optional; validation details or other context.
status_code
number
HTTP status code.
token_index
number
Optional; present for per-token errors (e.g. invalid private key or insufficient SOL) to indicate which token in tokens caused the error.
Authentication errors (401) from the downstream Add Agent call are returned as failed items in results (HTTP 207), not as a single 401 response. The error message in the failed result will indicate authentication failure.Validation errors (400) for the whole request (e.g. missing private key for all tokens, invalid JSON, or validation failure) include:
Field
Type
Description
details
object
Often Zod-style fieldErrors for tokens or top-level fields.
Insufficient SOL (400) includes:
Field
Type
Description
token_index
number
Index of the token whose creator wallet has insufficient SOL.
Multi-Status: at least one token succeeded and at least one failed. Check results (or failures) for per-item outcome.
400
Bad request: invalid JSON, validation failed, invalid private key, insufficient SOL for a token, or unsupported content type (e.g. not application/json). Use token_index when present to identify the failing token.
401
Unauthorized: missing or invalid API key. (If Add Agent returns 401 for some items, those appear as failed entries in a 207 response.)
Private key formats
Same as the single Token Launch API:
JSON array: 64 integers, e.g. [1,2,3,...,64]
Base64: 64-byte key encoded as base64
Base58: 64-byte key encoded as base58 (e.g. Phantom export format)
Ticker
Per token: 1–10 characters, letters and numbers only. Stored and returned in uppercase.
Image
URL: https://... or http://... is used as-is.
Base64: data:image/...;base64,... or raw base64 is uploaded to Supabase Storage; the resulting URL is sent to Jupiter.
Batch endpoint does not support multipart file upload; use the single Token Launch endpoint for file uploads.
Authentication
Same API key as the rest of the Swarms Platform API. Create and manage keys at https://swarms.world/platform/api-keys. If Add Agent returns 401 for some items, those appear as failed entries in a 207 response with an authentication-related error message.
Rate limits
Subject to the same daily agent creation limits as Add Agent. Each token in the batch counts toward your limit. See the API Reference for limits and reset behavior.
Batch size
Minimum 1, maximum 50 tokens per request. For larger batches, send multiple requests.
Order and indexing results are sorted by index (the position in the request tokens array). Use index to correlate successes and failures with your input.
Pre-validation and early exit
Before launching any token, the endpoint validates all private keys and (when RPC is available) checks SOL balance for each creator wallet. If any of these checks fail, the entire request returns 400 with token_index so you can fix that item and retry.
Downstream behavior
Each token is created via the same Add Agent flow as the single Token Launch endpoint (placeholder agent, default metadata, tokenized_on: true). Failures (e.g. duplicate agent, tokenization error) are reported per item in results with HTTP 207.