Skip to main content
POST https://swarms.world/api/token/launch/batch Creates 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.

Request

Headers

Body Parameters

Token item (each element of tokens): 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.

Code examples by language

The following table lists the same batch launch request implemented in each language. Use the tabs below to view or copy the code.


Response

Success – All tokens launched (HTTP 200)

Success result item (each entry in results when that token succeeded):

Partial success – Some tokens failed (HTTP 207)

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):

Error response body (4xx / 5xx)

Request-level errors (validation, invalid key, insufficient SOL, wrong content type, etc.) return a single error object, not a batch result. 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: Insufficient SOL (400) includes:

HTTP Status Codes


Examples

Minimal request – one private key for all tokens

Response examples by status

Output JSON for each HTTP status. Use the tabs to switch between response types.

Mixed private keys – default plus overrides

Request with image URL and base64


Notes

  1. 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)
  2. Ticker
    Per token: 1–10 characters, letters and numbers only. Stored and returned in uppercase.
  3. 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.
  4. 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.
  5. 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.
  6. Batch size
    Minimum 1, maximum 50 tokens per request. For larger batches, send multiple requests.
  7. 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.
  8. 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.
  9. 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.

See also

  • Token Launch (single) – Create one token per request; supports JSON and multipart.
  • Agents API – Full agent creation API used internally by both launch endpoints.
  • API Reference – Overview, authentication, and other endpoints.