{"openapi":"3.1.0","info":{"title":"Swarms Marketplace API","version":"1.0.0","description":"Public API of the swarms.world marketplace, generated from the route files at build time. Authenticate with an API key from https://swarms.world/platform/api-keys via `Authorization: Bearer <SWARMS_API_KEY>`. Read endpoints are public (a key is optional); write and account endpoints require a key."},"servers":[{"url":"https://swarms.world"}],"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"}},"required":["error"],"additionalProperties":true,"description":"Error body"},"Pagination":{"type":"object","properties":{"total":{"type":"integer","description":"Matching items across all pages"},"page":{"type":"integer"},"limit":{"type":"integer"},"has_more":{"type":"boolean"}},"required":["total","page","limit","has_more"],"additionalProperties":true,"description":"Page position of a list response"},"UseCase":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}},"additionalProperties":true,"description":"A use case of an agent or prompt"},"Requirement":{"type":"object","properties":{"package":{"type":"string"},"installation":{"type":"string"}},"additionalProperties":true,"description":"A package an agent needs"}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Swarms API key"}}},"paths":{"/api/add-agent":{"post":{"summary":"Publish an agent","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2},"agent":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","minLength":5}]},{"type":"null"}]},"language":{"type":"string"},"description":{"type":"string","minLength":1},"requirements":{"anyOf":[{"anyOf":[{"not":{}},{"type":"array","items":{"type":"object","properties":{"package":{"type":"string"},"installation":{"type":"string"}},"required":["package","installation"],"additionalProperties":false}}]},{"type":"null"}]},"useCases":{"anyOf":[{"anyOf":[{"not":{}},{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}},"required":["title","description"],"additionalProperties":false}}]},{"type":"null"}]},"tags":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","minLength":2}]},{"type":"null"}]},"is_free":{"type":"boolean","default":true},"price_usd":{"type":"number","minimum":0},"category":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"status":{"type":"string","enum":["pending","approved","rejected"],"default":"pending"},"tokenized_on":{"type":"boolean"},"ticker":{"type":"string"},"image_url":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"uri"}]},{"type":"string","const":""}]},"file_path":{"type":"string"},"image_base64":{"type":"string"},"links":{"anyOf":[{"anyOf":[{"not":{}},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"}},"required":["name","url"],"additionalProperties":false},{"type":"string","format":"uri"}]}}]},{"type":"null"}]},"seller_wallet_address":{"type":"string"},"payment_method":{"type":"string","enum":["crypto","stripe"]},"x402_url":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"uri"}]},{"type":"string","const":""}]},"mcp_url":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"uri"}]},{"type":"string","const":""}]},"creator_wallet":{"type":"string"},"private_key":{"type":"string"},"fee_selection":{"type":"string","enum":["frenzy","market"]},"quote_mint":{"type":"string","enum":["SOL","USDC"]},"vault_mode":{"type":"boolean"}},"required":["name","description"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"id":{"type":"string","description":"ID (UUID) of the new listing"},"listing_url":{"type":"string","format":"uri","description":"https://swarms.world/agent/<id> or https://swarms.world/prompt/<id>"},"tokenized":{"type":"boolean","description":"Echoes the request `tokenized_on` (false when omitted). When true a token was launched and `token_address` is set."},"token_address":{"type":["string","null"],"description":"Mint of the launched token; null unless `tokenized` is true"},"pool_address":{"type":["string","null"],"description":"What the launcher returned as the pool: the Jupiter DBC config key when present, else the pool address/id. Null when not tokenized, and may be null even when tokenized."}},"required":["success","id","listing_url","tokenized","token_address","pool_address"],"additionalProperties":true,"description":"The listing that was published"}}}},"400":{"description":"Body failed validation, agent code failed the content checks, the same name and agent code already exist, or the token launch failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["code","path","message"],"additionalProperties":true,"description":"One zod validation issue"}},"status_code":{"type":"integer"}},"required":["error","errors","status_code"],"additionalProperties":true,"description":"Error body"},{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"errors":{"type":"array","items":{"type":"string"},"description":"Why the submission was rejected"},"trustworthiness":{"type":"object","properties":{"isEligible":{"type":"boolean"},"reason":{"type":"string"},"publishedCount":{"type":"integer"},"averageRating":{"type":"number"},"isBypassUser":{"type":"boolean"}},"required":["isEligible","publishedCount","averageRating","isBypassUser"],"additionalProperties":true},"contentQuality":{"type":"object","properties":{"isValid":{"type":"boolean"},"score":{"type":"number","description":"0–5"},"reason":{"type":"string"},"apiResponse":{"description":"Model rationale or fallback note"},"usedFallback":{"type":"boolean"}},"required":["isValid"],"additionalProperties":true},"status_code":{"type":"integer"}},"required":["error","errors","trustworthiness","contentQuality"],"additionalProperties":true,"description":"Error body"},{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"existingId":{"type":"string","description":"ID of the listing that already exists"},"status_code":{"type":"integer"}},"required":["error","existingId","status_code"],"additionalProperties":true,"description":"Error body"}]}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method other than POST","content":{"text/plain":{"schema":{"type":"string"}}}},"413":{"description":"Body over the 1 MB Next.js limit (e.g. a large image_base64)","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"Daily publishing limit reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"currentUsage":{"type":"object","properties":{"paidPrompts":{"type":"integer"},"paidAgents":{"type":"integer"},"freeContent":{"type":"integer"},"date":{"type":"string","description":"YYYY-MM-DD"}},"required":["paidPrompts","paidAgents","freeContent","date"],"additionalProperties":true},"limits":{"type":"object","properties":{"paidPrompts":{"type":"integer"},"paidAgents":{"type":"integer"},"freeContent":{"type":"integer"}},"required":["paidPrompts","paidAgents","freeContent"],"additionalProperties":true},"resetTime":{"type":"string","description":"ISO 8601 time the counters reset"},"status_code":{"type":"integer"}},"required":["error","currentUsage","limits","resetTime","status_code"],"additionalProperties":true,"description":"Error body"}}}},"500":{"description":"SOL price lookup, database, or token launch error (database errors may add `hint` and `code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/add-prompt":{"post":{"summary":"Publish a prompt","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2},"prompt":{"type":"string","minLength":5},"description":{"type":"string","minLength":1},"useCases":{"anyOf":[{"anyOf":[{"not":{}},{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}},"required":["title","description"],"additionalProperties":false}}]},{"type":"null"}]},"tags":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","minLength":2}]},{"type":"null"}]},"is_free":{"type":"boolean","default":true},"price_usd":{"type":"number","minimum":0},"category":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"status":{"type":"string","enum":["pending","approved","rejected"],"default":"pending"},"tokenized_on":{"type":"boolean"},"ticker":{"type":"string"},"image_url":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"uri"}]},{"type":"string","const":""}]},"file_path":{"type":"string"},"image_base64":{"type":"string"},"links":{"anyOf":[{"anyOf":[{"not":{}},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"}},"required":["name","url"],"additionalProperties":false},{"type":"string","format":"uri"}]}}]},{"type":"null"}]},"payment_method":{"type":"string","enum":["crypto","stripe"]},"seller_wallet_address":{"type":"string"},"creator_wallet":{"type":"string"},"private_key":{"type":"string"},"fee_selection":{"type":"string"},"vault_mode":{"type":"boolean"}},"required":["name","prompt","description"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"id":{"type":"string","description":"ID (UUID) of the new listing"},"listing_url":{"type":"string","format":"uri","description":"https://swarms.world/agent/<id> or https://swarms.world/prompt/<id>"},"tokenized":{"type":"boolean","description":"Echoes the request `tokenized_on` (false when omitted). When true a token was launched and `token_address` is set."},"token_address":{"type":["string","null"],"description":"Mint of the launched token; null unless `tokenized` is true"},"pool_address":{"type":["string","null"],"description":"What the launcher returned as the pool: the Jupiter DBC config key when present, else the pool address/id. Null when not tokenized, and may be null even when tokenized."}},"required":["success","id","listing_url","tokenized","token_address","pool_address"],"additionalProperties":true,"description":"The listing that was published"}}}},"400":{"description":"Body failed validation, prompt failed the content checks, the same name and prompt already exist, or the token launch failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["code","path","message"],"additionalProperties":true,"description":"One zod validation issue"}},"status_code":{"type":"integer"}},"required":["error","errors","status_code"],"additionalProperties":true,"description":"Error body"},{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"errors":{"type":"array","items":{"type":"string"},"description":"Why the submission was rejected"},"trustworthiness":{"type":"object","properties":{"isEligible":{"type":"boolean"},"reason":{"type":"string"},"publishedCount":{"type":"integer"},"averageRating":{"type":"number"},"isBypassUser":{"type":"boolean"}},"required":["isEligible","publishedCount","averageRating","isBypassUser"],"additionalProperties":true},"contentQuality":{"type":"object","properties":{"isValid":{"type":"boolean"},"score":{"type":"number","description":"0–5"},"reason":{"type":"string"},"apiResponse":{"description":"Model rationale or fallback note"},"usedFallback":{"type":"boolean"}},"required":["isValid"],"additionalProperties":true},"status_code":{"type":"integer"}},"required":["error","errors","trustworthiness","contentQuality"],"additionalProperties":true,"description":"Error body"},{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"existingId":{"type":"string","description":"ID of the listing that already exists"},"status_code":{"type":"integer"}},"required":["error","existingId","status_code"],"additionalProperties":true,"description":"Error body"}]}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method other than POST","content":{"text/plain":{"schema":{"type":"string"}}}},"413":{"description":"Body over the 1 MB Next.js limit (e.g. a large image_base64)","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"Daily publishing limit reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"currentUsage":{"type":"object","properties":{"paidPrompts":{"type":"integer"},"paidAgents":{"type":"integer"},"freeContent":{"type":"integer"},"date":{"type":"string","description":"YYYY-MM-DD"}},"required":["paidPrompts","paidAgents","freeContent","date"],"additionalProperties":true},"limits":{"type":"object","properties":{"paidPrompts":{"type":"integer"},"paidAgents":{"type":"integer"},"freeContent":{"type":"integer"}},"required":["paidPrompts","paidAgents","freeContent"],"additionalProperties":true},"resetTime":{"type":"string","description":"ISO 8601 time the counters reset"},"status_code":{"type":"integer"}},"required":["error","currentUsage","limits","resetTime","status_code"],"additionalProperties":true,"description":"Error body"}}}},"500":{"description":"SOL price lookup, database, or token launch error (database errors may add `hint` and `code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/edit-agent":{"post":{"summary":"Edit an agent you own","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":2},"agent":{"type":"string","minLength":5},"language":{"type":"string"},"description":{"type":"string","minLength":1},"requirements":{"anyOf":[{"anyOf":[{"not":{}},{"type":"array","items":{"type":"object","properties":{"package":{"type":"string"},"installation":{"type":"string"}},"required":["package","installation"],"additionalProperties":false}}]},{"type":"null"}]},"useCases":{"anyOf":[{"anyOf":[{"not":{}},{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}},"required":["title","description"],"additionalProperties":false}}]},{"type":"null"}]},"tags":{"type":"string"},"is_free":{"type":"boolean"},"price_usd":{"type":"number","minimum":0},"category":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["pending","approved","rejected"]},"image_url":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"uri"}]},{"type":"string","const":""}]},"file_path":{"type":"string"},"links":{"anyOf":[{"anyOf":[{"not":{}},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"}},"required":["name","url"],"additionalProperties":false},{"type":"string","format":"uri"}]}}]},{"type":"null"}]},"payment_method":{"type":"string","enum":["crypto","stripe"]},"seller_wallet_address":{"type":"string"},"tokenized_on":{"type":"boolean"}},"required":["id","name","agent","description"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"id":{"type":"string"},"listing_url":{"type":"string","format":"uri","description":"https://swarms.world/agent/<id>"},"updated_data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"UUID"},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"use_cases":{"description":"jsonb; usually an array of { title, description }, or null"},"tags":{"type":["string","null"],"description":"Comma-separated"},"category":{"description":"jsonb; usually an array of category slugs, or null"},"links":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}},"required":["name","url"],"additionalProperties":true,"description":"A link on a listing"}},{"type":"null"}]},"image_url":{"type":["string","null"]},"file_path":{"type":["string","null"]},"is_free":{"type":"boolean"},"price_usd":{"type":["number","null"]},"price":{"type":["number","null"],"description":"Price in SOL at the time of saving"},"payment_method":{"type":["string","null"],"description":"'crypto' | 'stripe'"},"seller_wallet_address":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["approved","pending","rejected"],"description":"Moderation status"},{"type":"null"}],"description":"Moderation status"},"tokenized_on":{"type":["boolean","null"]},"token_address":{"type":["string","null"]},"token_symbol":{"type":["string","null"]},"pool_address":{"type":["string","null"]},"summary":{"type":["string","null"]},"search_type":{"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp"},"ticker":{"type":["string","null"]},"fee_selection":{"type":["string","null"],"description":"'frenzy' | 'market'"},"vault_mode":{"type":["boolean","null"],"description":"Holders-only view gating"},"user_id":{"type":["string","null"]},"agent":{"type":["string","null"],"description":"Agent source code"},"language":{"type":["string","null"]},"requirements":{"description":"jsonb; usually an array of { package, installation }"},"x402_url":{"type":["string","null"]},"mcp_url":{"type":["string","null"]},"mcp_manifest":{},"mcp_auth":{}},"required":["id","name","description","tags","links","image_url","file_path","is_free","price_usd","price","payment_method","seller_wallet_address","status","tokenized_on","token_address","token_symbol","pool_address","summary","search_type","created_at","user_id","agent","language"],"additionalProperties":true,"description":"A swarms_cloud_agents row"},"description":"The updated row, as a one-element array"}},"required":["success","id","listing_url","updated_data"],"additionalProperties":true}}}},"400":{"description":"Body failed validation, or changed content of a paid agent failed the content checks","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Dot-joined field path"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":true}},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"}},"required":["error","details"],"additionalProperties":true,"description":"Error body"},{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"errors":{"type":"array","items":{"type":"string"},"description":"Why the submission was rejected"},"trustworthiness":{"type":"object","properties":{"isEligible":{"type":"boolean"},"reason":{"type":"string"},"publishedCount":{"type":"integer"},"averageRating":{"type":"number"},"isBypassUser":{"type":"boolean"}},"required":["isEligible","publishedCount","averageRating","isBypassUser"],"additionalProperties":true},"contentQuality":{"type":"object","properties":{"isValid":{"type":"boolean"},"score":{"type":"number","description":"0–5"},"reason":{"type":"string"},"apiResponse":{"description":"Model rationale or fallback note"},"usedFallback":{"type":"boolean"}},"required":["isValid"],"additionalProperties":true},"status_code":{"type":"integer"}},"required":["error","errors","trustworthiness","contentQuality"],"additionalProperties":true,"description":"Error body"}]}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`id` is an empty string","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method other than POST (plain-text body)","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"SOL price lookup failed, or any database error, including an `id` that does not exist or is not yours","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/edit-prompt":{"post":{"summary":"Edit a prompt you own","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":2},"prompt":{"type":"string","minLength":5},"description":{"type":"string"},"useCases":{"anyOf":[{"anyOf":[{"not":{}},{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}},"required":["title","description"],"additionalProperties":false}}]},{"type":"null"}]},"tags":{"type":"string"},"is_free":{"type":"boolean"},"price_usd":{"type":"number","minimum":0},"category":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["pending","approved","rejected"]},"image_url":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"uri"}]},{"type":"string","const":""}]},"file_path":{"type":"string"},"links":{"anyOf":[{"anyOf":[{"not":{}},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"}},"required":["name","url"],"additionalProperties":false},{"type":"string","format":"uri"}]}}]},{"type":"null"}]},"payment_method":{"type":"string","enum":["crypto","stripe"]},"seller_wallet_address":{"type":"string"},"tokenized_on":{"type":"boolean"}},"required":["id","name","prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"id":{"type":"string"},"listing_url":{"type":"string","format":"uri","description":"https://swarms.world/prompt/<id>"},"updated_data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"UUID"},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"use_cases":{"description":"jsonb; usually an array of { title, description }, or null"},"tags":{"type":["string","null"],"description":"Comma-separated"},"category":{"description":"jsonb; usually an array of category slugs, or null"},"links":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}},"required":["name","url"],"additionalProperties":true,"description":"A link on a listing"}},{"type":"null"}]},"image_url":{"type":["string","null"]},"file_path":{"type":["string","null"]},"is_free":{"type":"boolean"},"price_usd":{"type":["number","null"]},"price":{"type":["number","null"],"description":"Price in SOL at the time of saving"},"payment_method":{"type":["string","null"],"description":"'crypto' | 'stripe'"},"seller_wallet_address":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["approved","pending","rejected"],"description":"Moderation status"},{"type":"null"}],"description":"Moderation status"},"tokenized_on":{"type":["boolean","null"]},"token_address":{"type":["string","null"]},"token_symbol":{"type":["string","null"]},"pool_address":{"type":["string","null"]},"summary":{"type":["string","null"]},"search_type":{"type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp"},"ticker":{"type":["string","null"]},"fee_selection":{"type":["string","null"],"description":"'frenzy' | 'market'"},"vault_mode":{"type":["boolean","null"],"description":"Holders-only view gating"},"user_id":{"type":"string"},"prompt":{"type":["string","null"],"description":"Prompt text"},"security":{}},"required":["id","name","description","tags","links","image_url","file_path","is_free","price_usd","price","payment_method","seller_wallet_address","status","tokenized_on","token_address","token_symbol","pool_address","summary","search_type","created_at","user_id","prompt"],"additionalProperties":true,"description":"A swarms_cloud_prompts row"},"description":"The updated row, as a one-element array"}},"required":["success","id","listing_url","updated_data"],"additionalProperties":true}}}},"400":{"description":"Body failed validation, or changed content of a paid prompt failed the content checks","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Dot-joined field path"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":true}},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"}},"required":["error","details"],"additionalProperties":true,"description":"Error body"},{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"errors":{"type":"array","items":{"type":"string"},"description":"Why the submission was rejected"},"trustworthiness":{"type":"object","properties":{"isEligible":{"type":"boolean"},"reason":{"type":"string"},"publishedCount":{"type":"integer"},"averageRating":{"type":"number"},"isBypassUser":{"type":"boolean"}},"required":["isEligible","publishedCount","averageRating","isBypassUser"],"additionalProperties":true},"contentQuality":{"type":"object","properties":{"isValid":{"type":"boolean"},"score":{"type":"number","description":"0–5"},"reason":{"type":"string"},"apiResponse":{"description":"Model rationale or fallback note"},"usedFallback":{"type":"boolean"}},"required":["isValid"],"additionalProperties":true},"status_code":{"type":"integer"}},"required":["error","errors","trustworthiness","contentQuality"],"additionalProperties":true,"description":"Error body"}]}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`id` is an empty string","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method other than POST (plain-text body)","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"SOL price lookup failed, or any database error, including an `id` that does not exist or is not yours","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/get-agents":{"get":{"summary":"List marketplace agents","security":[{"bearerAuth":[]},{}],"parameters":[{"name":"name","in":"query","required":false,"description":"Case-insensitive substring match on name","schema":{"type":"string"}},{"name":"tag","in":"query","required":false,"description":"Filter by tag (comma-separated)","schema":{"type":"string"}},{"name":"use_case","in":"query","required":false,"description":"Filter by use case title","schema":{"type":"string"}},{"name":"category","in":"query","required":false,"description":"Filter by category","schema":{"type":"string"}},{"name":"is_free","in":"query","required":false,"description":"true | false","schema":{"type":"string"}},{"name":"min_price","in":"query","required":false,"description":"Minimum price in USD","schema":{"type":"string"}},{"name":"max_price","in":"query","required":false,"description":"Maximum price in USD","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number, default 1","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Items per page, default 20, max 100","schema":{"type":"string"}},{"name":"req_package","in":"query","required":false,"description":"Filter by required package","schema":{"type":"string"}},{"name":"language","in":"query","required":false,"description":"Filter by implementation language","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Agent ID (UUID)"},"name":{"type":"string","description":"Empty string when unset"},"description":{"type":"string","description":"Empty string when unset"},"use_cases":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/UseCase"}},{"type":"null"}],"description":"Use cases; null when unset"},"tags":{"type":"string","description":"Comma-separated tags; empty string when unset"},"requirements":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Requirement"}},{"type":"null"}],"description":"Packages the product needs; null when unset"},"language":{"type":"string","description":"Absent when unset"},"is_free":{"type":"boolean"},"price":{"type":"number","description":"Legacy SOL price; 0 when unset"},"price_usd":{"type":"number","description":"USD price (primary); 0 when unset"},"category":{"anyOf":[{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]},{"type":"null"}],"description":"Category slugs, passed through raw: an array on current rows, a single string on legacy rows, null when unset"},"status":{"type":"string","enum":["approved","pending","rejected"],"description":"Review status; a null status in the database is reported as pending"},"user_id":{"type":"string","description":"Owner user ID; empty string when unset"},"created_at":{"type":"string","description":"Creation time, ISO 8601 with UTC offset"}},"required":["id","name","description","use_cases","tags","requirements","is_free","price","price_usd","category","status","user_id","created_at"],"additionalProperties":true,"description":"An agent listing"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"filters_applied":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"},"language":{"type":"string"},"category":{"type":"string"},"is_free":{"type":"boolean","description":"true only for is_free=true; any other value echoes false"},"price_range":{"type":"string","description":"\"<min_price>-<max_price>\" with \"0\" / \"∞\" for a missing bound; present when either is given. The bounds filter the legacy SOL `price`, not `price_usd`"}},"additionalProperties":true,"description":"Echo of the filters given; use_case and req_package are not echoed"}},"required":["data","pagination","filters_applied"],"additionalProperties":true,"description":"Agents of every review status, newest first. use_case and req_package filter only the fetched page in memory, so pagination.total and has_more ignore them"}}}},"405":{"description":"Method other than GET (text/plain body, not JSON)","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"More than 300 /api requests in 60 s from one IP (production only)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Database error; also any `category` filter and a `page` past the last page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/get-agents/{id}":{"get":{"summary":"Get one agent (public fields)","security":[{"bearerAuth":[]},{}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Agent ID (UUID)"},"name":{"type":"string","description":"Empty string when unset"},"description":{"type":"string","description":"Empty string when unset"},"use_cases":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/UseCase"}},{"type":"null"}],"description":"Use cases; null when unset"},"tags":{"type":"string","description":"Comma-separated tags; empty string when unset"},"requirements":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Requirement"}},{"type":"null"}],"description":"Packages the product needs; null when unset"},"language":{"type":"string","description":"Absent when unset"},"is_free":{"type":"boolean"},"price":{"type":"number","description":"Legacy SOL price; 0 when unset"},"price_usd":{"type":"number","description":"USD price (primary); 0 when unset"},"category":{"anyOf":[{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]},{"type":"null"}],"description":"Category slugs, passed through raw: an array on current rows, a single string on legacy rows, null when unset"},"status":{"type":"string","enum":["approved","pending","rejected"],"description":"Review status; a null status in the database is reported as pending"},"user_id":{"type":"string","description":"Owner user ID; empty string when unset"},"created_at":{"type":"string","description":"Creation time, ISO 8601 with UTC offset"},"image_url":{"type":"string","description":"Absent when unset"},"file_path":{"type":"string","description":"Storage path of the image; absent when unset"},"agent":{"type":"string","description":"Agent source code; present only when access_info.has_access is true"},"access_info":{"type":"object","properties":{"has_access":{"type":"boolean"},"is_owner":{"type":["boolean","null"],"description":"null for an anonymous caller on a free item"},"is_free":{"type":"boolean"},"has_purchased":{"type":"boolean","description":"Absent for an anonymous caller on a paid item"},"requires_purchase":{"type":"boolean"}},"required":["has_access","is_owner","is_free","requires_purchase"],"additionalProperties":true,"description":"What the caller may see of the item"}},"required":["id","name","description","use_cases","tags","requirements","is_free","price","price_usd","category","status","user_id","created_at","access_info"],"additionalProperties":true,"description":"One agent of any review status"}}}},"404":{"description":"No agent with this UUID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method other than GET (text/plain body, not JSON)","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"More than 300 /api requests in 60 s from one IP (production only)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Database error, including an id that is not a UUID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/get-agents/{id}/full":{"get":{"summary":"Get one agent including source code","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Agent ID (UUID)"},"name":{"type":"string","description":"Empty string when unset"},"description":{"type":"string","description":"Empty string when unset"},"use_cases":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/UseCase"}},{"type":"null"}],"description":"Use cases; null when unset"},"tags":{"type":"string","description":"Comma-separated tags; empty string when unset"},"requirements":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Requirement"}},{"type":"null"}],"description":"Packages the product needs; null when unset"},"language":{"type":"string","description":"Absent when unset"},"is_free":{"type":"boolean"},"price":{"type":"number","description":"Legacy SOL price; 0 when unset"},"price_usd":{"type":"number","description":"USD price (primary); 0 when unset"},"category":{"anyOf":[{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]},{"type":"null"}],"description":"Category slugs, passed through raw: an array on current rows, a single string on legacy rows, null when unset"},"status":{"type":"string","enum":["approved","pending","rejected"],"description":"Review status; a null status in the database is reported as pending"},"user_id":{"type":"string","description":"Owner user ID; empty string when unset"},"created_at":{"type":"string","description":"Creation time, ISO 8601 with UTC offset"},"file_path":{"type":"string","description":"Storage path of the image; absent when unset"},"agent":{"type":"string","description":"Agent source code; empty string when unset"},"access_granted":{"type":"boolean","const":true},"access_reason":{"type":"string","enum":["author","free","paid"],"description":"author: the caller owns it; free: the item is free; paid: the caller has a completed purchase"}},"required":["id","name","description","use_cases","tags","requirements","is_free","price","price_usd","category","status","user_id","created_at","agent","access_granted","access_reason"],"additionalProperties":true,"description":"One agent with its source code (no image_url)"}}}},"401":{"description":"No valid API key or session; body adds hint and auth_methods","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"hint":{"type":"string"},"auth_methods":{"type":"array","items":{"type":"string"}}},"required":["error","message","hint","auth_methods"],"additionalProperties":true,"description":"Authentication required"}}}},"403":{"description":"Paid agent the caller neither owns nor bought; body adds agent_info","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"agent_info":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"price":{"type":["number","null"],"description":"Legacy SOL price, raw"},"is_free":{"type":"boolean"}},"required":["id","name","price","is_free"],"additionalProperties":true}},"required":["error","message","agent_info"],"additionalProperties":true,"description":"Agent must be purchased"}}}},"404":{"description":"No agent with this UUID (approval is not actually checked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method other than GET (text/plain body, not JSON)","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"More than 300 /api requests in 60 s from one IP (production only)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Database error, including an id that is not a UUID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/get-agents/fetch-agent-count":{"get":{"summary":"Count the authenticated user’s agents","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"agentCount":{"type":"integer","description":"Number of agents the caller owns, any review status"},"user_id":{"type":"string","description":"The caller’s user ID"},"auth_method":{"type":"string","enum":["api_key","supabase"],"description":"How the caller authenticated"}},"required":["agentCount","user_id","auth_method"],"additionalProperties":true}}}},"401":{"description":"No valid API key or session; body adds hint and auth_methods","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"hint":{"type":"string"},"auth_methods":{"type":"array","items":{"type":"string"}}},"required":["error","message","hint","auth_methods"],"additionalProperties":true,"description":"Authentication required"}}}},"405":{"description":"Method other than GET (text/plain body, not JSON)","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"More than 300 /api requests in 60 s from one IP (production only)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/get-agents/log-agents":{"post":{"summary":"Log agent usage telemetry","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"data":{"description":"The request body’s `data`, echoed back; absent when omitted"}},"required":["message"],"additionalProperties":true}}}},"401":{"description":"No valid API key or session; body adds hint and auth_methods","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"hint":{"type":"string"},"auth_methods":{"type":"array","items":{"type":"string"}}},"required":["error","message","hint","auth_methods"],"additionalProperties":true,"description":"Authentication required"}}}},"405":{"description":"Method other than POST (text/plain body, not JSON)","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"More than 300 /api requests in 60 s from one IP (production only)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Body is not a JSON object, or the insert failed; `details` holds the message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/get-prompts":{"get":{"summary":"List marketplace prompts","security":[{"bearerAuth":[]},{}],"parameters":[{"name":"name","in":"query","required":false,"description":"Case-insensitive substring match on name","schema":{"type":"string"}},{"name":"tag","in":"query","required":false,"description":"Filter by tag (comma-separated)","schema":{"type":"string"}},{"name":"use_case","in":"query","required":false,"description":"Filter by use case title","schema":{"type":"string"}},{"name":"category","in":"query","required":false,"description":"Filter by category","schema":{"type":"string"}},{"name":"is_free","in":"query","required":false,"description":"true | false","schema":{"type":"string"}},{"name":"min_price","in":"query","required":false,"description":"Minimum price in USD","schema":{"type":"string"}},{"name":"max_price","in":"query","required":false,"description":"Maximum price in USD","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number, default 1","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Items per page, default 20, max 100","schema":{"type":"string"}},{"name":"id","in":"query","required":false,"description":"Direct lookup by prompt ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Prompt ID (UUID)"},"name":{"type":"string","description":"Empty string when unset"},"description":{"type":"string","description":"Empty string when unset"},"use_cases":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/UseCase"}},{"type":"null"}],"description":"Use cases; null when unset"},"tags":{"type":"string","description":"Comma-separated tags; empty string when unset"},"is_free":{"type":"boolean"},"price":{"type":"number","description":"Legacy SOL price; 0 when unset"},"price_usd":{"type":"number","description":"USD price (primary); 0 when unset"},"category":{"anyOf":[{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]},{"type":"null"}],"description":"Category slugs, passed through raw: an array on current rows, a single string on legacy rows, null when unset"},"status":{"type":"string","enum":["approved","pending","rejected"],"description":"Review status; a null status in the database is reported as pending"},"user_id":{"type":"string","description":"Owner user ID"},"created_at":{"type":"string","description":"Creation time, ISO 8601 with UTC offset"}},"required":["id","name","description","use_cases","tags","is_free","price","price_usd","category","status","user_id","created_at"],"additionalProperties":true,"description":"A prompt listing"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"filters_applied":{"type":"object","properties":{"id":{"type":"string","description":"Trimmed `id` of a direct lookup"},"name":{"type":"string"},"tag":{"type":"string"},"category":{"type":"string"},"is_free":{"type":"boolean","description":"true only for is_free=true; any other value echoes false"},"price_range":{"type":"string","description":"\"<min_price>-<max_price>\" with \"0\" / \"∞\" for a missing bound; present when either is given. The bounds filter the legacy SOL `price`, not `price_usd`"}},"additionalProperties":true,"description":"Echo of the filters given; use_case and use_case_description are not echoed"}},"required":["data","pagination","filters_applied"],"additionalProperties":true,"description":"Prompts of every review status, newest first. With `id`, page and limit are forced to 1. use_case and use_case_description filter only the fetched page in memory, so pagination.total and has_more ignore them"}}}},"405":{"description":"Method other than GET (text/plain body, not JSON)","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"More than 300 /api requests in 60 s from one IP (production only)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Database error; also any `category` filter, an `id` that is not a UUID, and a `page` past the last page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/get-prompts/{id}":{"get":{"summary":"Get one prompt (public fields)","security":[{"bearerAuth":[]},{}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Prompt ID (UUID)"},"name":{"type":"string","description":"Empty string when unset"},"description":{"type":"string","description":"Empty string when unset"},"use_cases":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/UseCase"}},{"type":"null"}],"description":"Use cases; null when unset"},"tags":{"type":"string","description":"Comma-separated tags; empty string when unset"},"is_free":{"type":"boolean"},"price":{"type":"number","description":"Legacy SOL price; 0 when unset"},"price_usd":{"type":"number","description":"USD price (primary); 0 when unset"},"category":{"anyOf":[{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]},{"type":"null"}],"description":"Category slugs, passed through raw: an array on current rows, a single string on legacy rows, null when unset"},"status":{"type":"string","enum":["approved","pending","rejected"],"description":"Review status; a null status in the database is reported as pending"},"user_id":{"type":"string","description":"Owner user ID"},"created_at":{"type":"string","description":"Creation time, ISO 8601 with UTC offset"},"image_url":{"type":"string","description":"Absent when unset"},"file_path":{"type":"string","description":"Storage path of the image; absent when unset"},"prompt":{"type":"string","description":"Prompt body; present only when access_info.has_access is true"},"access_info":{"type":"object","properties":{"has_access":{"type":"boolean"},"is_owner":{"type":["boolean","null"],"description":"null for an anonymous caller on a free item"},"is_free":{"type":"boolean"},"has_purchased":{"type":"boolean","description":"Absent for an anonymous caller on a paid item"},"requires_purchase":{"type":"boolean"}},"required":["has_access","is_owner","is_free","requires_purchase"],"additionalProperties":true,"description":"What the caller may see of the item"}},"required":["id","name","description","use_cases","tags","is_free","price","price_usd","category","status","user_id","created_at","access_info"],"additionalProperties":true,"description":"One prompt, looked up by UUID or else by case-insensitive exact name (newest match)"}}}},"404":{"description":"No prompt with this UUID or name, or the id looks like a static asset file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method other than GET (text/plain body, not JSON)","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"More than 300 /api requests in 60 s from one IP (production only)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/get-prompts/{id}/full":{"get":{"summary":"Get one prompt including full body","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Prompt ID (UUID)"},"name":{"type":"string","description":"Empty string when unset"},"description":{"type":"string","description":"Empty string when unset"},"use_cases":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/UseCase"}},{"type":"null"}],"description":"Use cases; null when unset"},"tags":{"type":"string","description":"Comma-separated tags; empty string when unset"},"is_free":{"type":"boolean"},"price":{"type":"number","description":"Legacy SOL price; 0 when unset"},"price_usd":{"type":"number","description":"USD price (primary); 0 when unset"},"category":{"anyOf":[{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]},{"type":"null"}],"description":"Category slugs, passed through raw: an array on current rows, a single string on legacy rows, null when unset"},"status":{"type":"string","enum":["approved","pending","rejected"],"description":"Review status; a null status in the database is reported as pending"},"user_id":{"type":"string","description":"Owner user ID"},"created_at":{"type":"string","description":"Creation time, ISO 8601 with UTC offset"},"file_path":{"type":"string","description":"Storage path of the image; absent when unset"},"prompt":{"type":"string","description":"Prompt body; empty string when unset"},"access_granted":{"type":"boolean","const":true},"access_reason":{"type":"string","enum":["author","free","paid"],"description":"author: the caller owns it; free: the item is free; paid: the caller has a completed purchase"}},"required":["id","name","description","use_cases","tags","is_free","price","price_usd","category","status","user_id","created_at","prompt","access_granted","access_reason"],"additionalProperties":true,"description":"One prompt with its body (no image_url), by UUID or name"}}}},"401":{"description":"No valid API key or session; body adds hint and auth_methods","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"hint":{"type":"string"},"auth_methods":{"type":"array","items":{"type":"string"}}},"required":["error","message","hint","auth_methods"],"additionalProperties":true,"description":"Authentication required"}}}},"403":{"description":"Paid prompt the caller neither owns nor bought; body adds prompt_info","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"prompt_info":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"price":{"type":["number","null"],"description":"Legacy SOL price, raw"},"is_free":{"type":"boolean"}},"required":["id","name","price","is_free"],"additionalProperties":true}},"required":["error","message","prompt_info"],"additionalProperties":true,"description":"Prompt must be purchased"}}}},"404":{"description":"No prompt with this UUID or name (approval is not actually checked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method other than GET (text/plain body, not JSON)","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"More than 300 /api requests in 60 s from one IP (production only)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/get-prompts/fetch-prompt-count":{"get":{"summary":"Count the authenticated user’s prompts","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"promptCount":{"type":"integer","description":"Number of prompts the caller owns, any review status"},"user_id":{"type":"string","description":"The caller’s user ID"},"auth_method":{"type":"string","enum":["api_key","supabase"],"description":"How the caller authenticated"}},"required":["promptCount","user_id","auth_method"],"additionalProperties":true}}}},"401":{"description":"No valid API key or session; body adds hint and auth_methods","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"hint":{"type":"string"},"auth_methods":{"type":"array","items":{"type":"string"}}},"required":["error","message","hint","auth_methods"],"additionalProperties":true,"description":"Authentication required"}}}},"405":{"description":"Method other than GET (text/plain body, not JSON)","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"More than 300 /api requests in 60 s from one IP (production only)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/get-tokenized-products":{"get":{"summary":"List tokenized products","security":[{"bearerAuth":[]}],"parameters":[{"name":"type","in":"query","required":false,"description":"Product type filter (default all)","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number, default 1","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Items per page, default 100, max 500","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string"},"username":{"type":"string","description":"Empty string when the user has none"},"total":{"type":"integer","description":"Products of the requested type(s)"},"counts":{"type":"object","properties":{"agents":{"type":"integer"},"prompts":{"type":"integer"}},"required":["agents","prompts"],"additionalProperties":true,"description":"Per-type counts within the requested type(s)"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"type":{"type":"string","enum":["agent","prompt"]},"token_address":{"type":"string","description":"Token mint address"},"created_at":{"type":"string"},"listing_url":{"type":"string","description":"https://swarms.world/{type}/{id}"}},"required":["id","name","type","token_address","created_at","listing_url"],"additionalProperties":true,"description":"A tokenized product owned by the caller"},"description":"This page, newest first"},"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total_pages":{"type":"integer","description":"At least 1"},"has_next":{"type":"boolean"},"has_prev":{"type":"boolean"}},"required":["page","limit","total_pages","has_next","has_prev"],"additionalProperties":true,"description":"Page position (differs from the shared Pagination shape)"}},"required":["user_id","username","total","counts","data","pagination"],"additionalProperties":true}}}},"400":{"description":"`type` is not all, agent(s) or prompt(s)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No valid API key or session; always `Supabase authentication failed`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The authenticated user has no users row","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Database error (`details` carries the raw error message)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"List tokenized products (same fields in the JSON body)","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Product type filter (default all)","default":"all"},"page":{"type":"number","description":"Page number, default 1","default":1},"limit":{"type":"number","description":"Items per page, default 100, max 500","default":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string"},"username":{"type":"string","description":"Empty string when the user has none"},"total":{"type":"integer","description":"Products of the requested type(s)"},"counts":{"type":"object","properties":{"agents":{"type":"integer"},"prompts":{"type":"integer"}},"required":["agents","prompts"],"additionalProperties":true,"description":"Per-type counts within the requested type(s)"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"type":{"type":"string","enum":["agent","prompt"]},"token_address":{"type":"string","description":"Token mint address"},"created_at":{"type":"string"},"listing_url":{"type":"string","description":"https://swarms.world/{type}/{id}"}},"required":["id","name","type","token_address","created_at","listing_url"],"additionalProperties":true,"description":"A tokenized product owned by the caller"},"description":"This page, newest first"},"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total_pages":{"type":"integer","description":"At least 1"},"has_next":{"type":"boolean"},"has_prev":{"type":"boolean"}},"required":["page","limit","total_pages","has_next","has_prev"],"additionalProperties":true,"description":"Page position (differs from the shared Pagination shape)"}},"required":["user_id","username","total","counts","data","pagination"],"additionalProperties":true}}}},"400":{"description":"`type` is not all, agent(s) or prompt(s)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No valid API key or session; always `Supabase authentication failed`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The authenticated user has no users row","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Database error (`details` carries the raw error message)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/get-tools":{"get":{"summary":"List marketplace tools","security":[{"bearerAuth":[]},{}],"parameters":[{"name":"name","in":"query","required":false,"description":"Case-insensitive substring match on name","schema":{"type":"string"}},{"name":"tag","in":"query","required":false,"description":"Filter by tag (comma-separated)","schema":{"type":"string"}},{"name":"use_case","in":"query","required":false,"description":"Filter by use case title","schema":{"type":"string"}},{"name":"category","in":"query","required":false,"description":"Filter by category","schema":{"type":"string"}},{"name":"is_free","in":"query","required":false,"description":"true | false","schema":{"type":"string"}},{"name":"min_price","in":"query","required":false,"description":"Minimum price in USD","schema":{"type":"string"}},{"name":"max_price","in":"query","required":false,"description":"Maximum price in USD","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number, default 1","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Items per page, default 20, max 100","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"tools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Tool ID (UUID)"},"name":{"type":"string","description":"Empty string when unset"},"description":{"type":"string","description":"Empty string when unset"},"use_cases":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/UseCase"}},{"type":"null"}],"description":"Use cases; null when unset"},"tags":{"type":"string","description":"Comma-separated tags; empty string when unset"},"requirements":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Requirement"}},{"type":"null"}],"description":"Packages the product needs; null when unset"},"language":{"type":"string","description":"Absent when unset"},"is_free":{"type":"boolean"},"file_path":{"type":"string","description":"Storage path of the image; absent when unset"},"category":{"anyOf":[{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]},{"type":"null"}],"description":"Category slugs, passed through raw: an array on current rows, a single string on legacy rows, null when unset"},"status":{"type":"string","enum":["approved","pending","rejected"],"description":"Review status; a null status in the database is reported as pending"},"user_id":{"type":"string","description":"Owner user ID; empty string when unset"},"created_at":{"type":"string","description":"Creation time, ISO 8601 with UTC offset"}},"required":["id","name","description","use_cases","tags","requirements","is_free","category","status","user_id","created_at"],"additionalProperties":true,"description":"A tool listing (tools carry no price)"}},"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer","description":"Matching tools across all pages"},"total_pages":{"type":"integer"},"has_next":{"type":"boolean"},"has_prev":{"type":"boolean"}},"required":["page","limit","total","total_pages","has_next","has_prev"],"additionalProperties":true,"description":"Page position; differs from the agent and prompt lists"}},"required":["tools","pagination"],"additionalProperties":true,"description":"Tools of every review status, newest first"}}}},"405":{"description":"Method other than GET (text/plain body, not JSON)","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"More than 300 /api requests in 60 s from one IP (production only)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Database error; also any `use_case`, `req_package` or `category` filter, and a `page` past the last page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/get-tools/{id}":{"get":{"summary":"Get one tool","security":[{"bearerAuth":[]},{}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Tool ID (UUID)"},"name":{"type":"string","description":"Empty string when unset"},"description":{"type":"string","description":"Empty string when unset"},"use_cases":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/UseCase"}},{"type":"null"}],"description":"Use cases; null when unset"},"tags":{"type":"string","description":"Comma-separated tags; empty string when unset"},"requirements":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Requirement"}},{"type":"null"}],"description":"Packages the product needs; null when unset"},"language":{"type":"string","description":"Absent when unset"},"is_free":{"type":"boolean"},"file_path":{"type":"string","description":"Storage path of the image; absent when unset"},"category":{"anyOf":[{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]},{"type":"null"}],"description":"Category slugs, passed through raw: an array on current rows, a single string on legacy rows, null when unset"},"status":{"type":"string","enum":["approved","pending","rejected"],"description":"Review status; a null status in the database is reported as pending"},"user_id":{"type":"string","description":"Owner user ID; empty string when unset"},"created_at":{"type":"string","description":"Creation time, ISO 8601 with UTC offset"},"image_url":{"type":"string","description":"Absent when unset"},"tool":{"type":"string","description":"Tool source code; present only for a free tool or the tool’s owner"},"access_info":{"type":"object","properties":{"has_access":{"type":["boolean","null"],"description":"null for an anonymous caller on a paid tool"},"is_owner":{"type":["boolean","null"],"description":"null for an anonymous caller"},"is_free":{"type":"boolean"},"requires_purchase":{"type":"boolean","const":false,"description":"Always false, even when the code is withheld"}},"required":["has_access","is_owner","is_free","requires_purchase"],"additionalProperties":true}},"required":["id","name","description","use_cases","tags","requirements","is_free","category","status","user_id","created_at","access_info"],"additionalProperties":true,"description":"One tool of any review status; no purchase check"}}}},"404":{"description":"No tool with this UUID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method other than GET (text/plain body, not JSON)","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"More than 300 /api requests in 60 s from one IP (production only)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Database error, including an id that is not a UUID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp":{"get":{"summary":"mcp","security":[{"bearerAuth":[]}],"responses":{"401":{"description":"-32001 with `WWW-Authenticate: Bearer`: no key, an unknown or deleted key, or a key with no user","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"],"description":"The request id, or null when there was none. On a 400 for an invalid message, whatever `id` the body carried is echoed"},"error":{"type":"object","properties":{"code":{"type":"integer","description":"-32700 parse error, -32600 invalid request, -32601 method not found, -32602 invalid params, -32603 internal error, -32001 unauthorized"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":true}},"required":["jsonrpc","id","error"],"additionalProperties":true,"description":"JSON-RPC 2.0 error response"}}}},"405":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"],"description":"The request id, or null when there was none. On a 400 for an invalid message, whatever `id` the body carried is echoed"},"error":{"type":"object","properties":{"code":{"type":"integer","description":"-32700 parse error, -32600 invalid request, -32601 method not found, -32602 invalid params, -32603 internal error, -32001 unauthorized"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":true}},"required":["jsonrpc","id","error"],"additionalProperties":true,"description":"JSON-RPC 2.0 error response"}}}},"429":{"description":"Rate limited by swarms.world (plain { error }, not JSON-RPC)","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"],"description":"The request id, or null when there was none. On a 400 for an invalid message, whatever `id` the body carried is echoed"},"error":{"type":"object","properties":{"code":{"type":"integer","description":"-32700 parse error, -32600 invalid request, -32601 method not found, -32602 invalid params, -32603 internal error, -32001 unauthorized"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":true}},"required":["jsonrpc","id","error"],"additionalProperties":true,"description":"JSON-RPC 2.0 error response"}}}}},"parameters":[{"name":"authorization","in":"header","required":false,"description":"`Bearer <SWARMS_API_KEY>`; the scheme is case-insensitive","schema":{"anyOf":[{"not":{}},{"type":"string","pattern":"^Bearer\\s+.+$"}],"description":"`Bearer <SWARMS_API_KEY>`; the scheme is case-insensitive"}},{"name":"x-api-key","in":"header","required":false,"description":"The key on its own; used only when there is no Bearer token","schema":{"anyOf":[{"not":{}},{"type":"string"}],"description":"The key on its own; used only when there is no Bearer token"}}]},"delete":{"summary":"mcp","security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Success"},"401":{"description":"-32001 with `WWW-Authenticate: Bearer`: no key, an unknown or deleted key, or a key with no user","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"],"description":"The request id, or null when there was none. On a 400 for an invalid message, whatever `id` the body carried is echoed"},"error":{"type":"object","properties":{"code":{"type":"integer","description":"-32700 parse error, -32600 invalid request, -32601 method not found, -32602 invalid params, -32603 internal error, -32001 unauthorized"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":true}},"required":["jsonrpc","id","error"],"additionalProperties":true,"description":"JSON-RPC 2.0 error response"}}}},"429":{"description":"Rate limited by swarms.world (plain { error }, not JSON-RPC)","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"],"description":"The request id, or null when there was none. On a 400 for an invalid message, whatever `id` the body carried is echoed"},"error":{"type":"object","properties":{"code":{"type":"integer","description":"-32700 parse error, -32600 invalid request, -32601 method not found, -32602 invalid params, -32603 internal error, -32001 unauthorized"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":true}},"required":["jsonrpc","id","error"],"additionalProperties":true,"description":"JSON-RPC 2.0 error response"}}}}},"parameters":[{"name":"authorization","in":"header","required":false,"description":"`Bearer <SWARMS_API_KEY>`; the scheme is case-insensitive","schema":{"anyOf":[{"not":{}},{"type":"string","pattern":"^Bearer\\s+.+$"}],"description":"`Bearer <SWARMS_API_KEY>`; the scheme is case-insensitive"}},{"name":"x-api-key","in":"header","required":false,"description":"The key on its own; used only when there is no Bearer token","schema":{"anyOf":[{"not":{}},{"type":"string"}],"description":"The key on its own; used only when there is no Bearer token"}}]},"post":{"summary":"mcp","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number"]},"result":{"anyOf":[{"type":"object","properties":{"protocolVersion":{"type":"string","enum":["2025-06-18","2025-03-26","2024-11-05"]},"capabilities":{"type":"object","properties":{"tools":{"type":"object","properties":{"listChanged":{"type":"boolean","const":false}},"required":["listChanged"],"additionalProperties":true}},"required":["tools"],"additionalProperties":true},"serverInfo":{"type":"object","properties":{"name":{"type":"string","description":"swarms-marketplace"},"title":{"type":"string","description":"Swarms Marketplace"},"version":{"type":"string","description":"1.0.0"}},"required":["name","title","version"],"additionalProperties":true},"instructions":{"type":"string"}},"required":["protocolVersion","capabilities","serverInfo","instructions"],"additionalProperties":true,"description":"initialize result"},{"type":"object","properties":{"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64,"description":"<method>_<path without /api/>, e.g. get_get-prompts_id; matches ^[a-zA-Z0-9_-]{1,64}$"},"title":{"type":"string","description":"The operation summary"},"description":{"type":"string"},"inputSchema":{"type":"object","additionalProperties":{},"description":"JSON Schema object (additionalProperties false) built from the operation’s path, query and body in /openapi.json. A JSON body is flattened into it, or taken whole as `body` when it is not a plain object or its keys clash with parameters"},"annotations":{"type":"object","properties":{"title":{"type":"string"},"readOnlyHint":{"type":"boolean","description":"true for GET"},"destructiveHint":{"type":"boolean","description":"true for DELETE"},"idempotentHint":{"type":"boolean","description":"true for GET and PUT"},"openWorldHint":{"type":"boolean","const":false}},"required":["title","readOnlyHint","destructiveHint","idempotentHint","openWorldHint"],"additionalProperties":true}},"required":["name","title","description","inputSchema","annotations"],"additionalProperties":true,"description":"One MCP tool: a REST operation of /openapi.json"}}},"required":["tools"],"additionalProperties":true,"description":"tools/list result: one tool per operation of /openapi.json except /api/mcp itself, sorted by name. The spec is cached for an hour"},{"type":"object","properties":{"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","description":"The REST response body: pretty-printed JSON, or raw text. On failure, JSON { status, tool, error } with the REST status and body, or \"Could not reach <path>: <reason>\" (including the 30 s timeout)"}},"required":["type","text"],"additionalProperties":true},"minItems":1,"maxItems":1},"isError":{"type":"boolean","const":true,"description":"Set when the REST call failed or could not be made"}},"required":["content"],"additionalProperties":true,"description":"tools/call result. A failed REST call is still a JSON-RPC success"},{"type":"object","properties":{},"additionalProperties":true,"description":"ping result"}]}},"required":["jsonrpc","id","result"],"additionalProperties":true,"description":"JSON-RPC 2.0 success response"},{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"],"description":"The request id, or null when there was none. On a 400 for an invalid message, whatever `id` the body carried is echoed"},"error":{"type":"object","properties":{"code":{"type":"integer","description":"-32700 parse error, -32600 invalid request, -32601 method not found, -32602 invalid params, -32603 internal error, -32001 unauthorized"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":true}},"required":["jsonrpc","id","error"],"additionalProperties":true,"description":"JSON-RPC 2.0 error response"}],"description":"HTTP 200 carries either a result or a JSON-RPC error: -32601 for an unknown method; -32602 for tools/call without a name, with an unknown tool, or missing a path argument; -32603 when the server fails, e.g. cannot load /openapi.json"}}}},"202":{"description":"Notification (no `id`) from an authenticated caller: accepted, empty body"},"400":{"description":"Checked before auth. -32700: body is not JSON. -32600: a batch (JSON array), or not a JSON-RPC 2.0 message (jsonrpc not \"2.0\", method missing or empty, id neither string nor number)","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"],"description":"The request id, or null when there was none. On a 400 for an invalid message, whatever `id` the body carried is echoed"},"error":{"type":"object","properties":{"code":{"type":"integer","description":"-32700 parse error, -32600 invalid request, -32601 method not found, -32602 invalid params, -32603 internal error, -32001 unauthorized"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":true}},"required":["jsonrpc","id","error"],"additionalProperties":true,"description":"JSON-RPC 2.0 error response"}}}},"401":{"description":"-32001 with `WWW-Authenticate: Bearer`: no key, an unknown or deleted key, or a key with no user","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"],"description":"The request id, or null when there was none. On a 400 for an invalid message, whatever `id` the body carried is echoed"},"error":{"type":"object","properties":{"code":{"type":"integer","description":"-32700 parse error, -32600 invalid request, -32601 method not found, -32602 invalid params, -32603 internal error, -32001 unauthorized"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":true}},"required":["jsonrpc","id","error"],"additionalProperties":true,"description":"JSON-RPC 2.0 error response"}}}},"403":{"description":"-32001. In the code but unreachable: the key check never returns 403","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"],"description":"The request id, or null when there was none. On a 400 for an invalid message, whatever `id` the body carried is echoed"},"error":{"type":"object","properties":{"code":{"type":"integer","description":"-32700 parse error, -32600 invalid request, -32601 method not found, -32602 invalid params, -32603 internal error, -32001 unauthorized"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":true}},"required":["jsonrpc","id","error"],"additionalProperties":true,"description":"JSON-RPC 2.0 error response"}}}},"429":{"description":"Rate limited by swarms.world: plain { error: \"Too many requests\" }, not JSON-RPC","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"],"description":"The request id, or null when there was none. On a 400 for an invalid message, whatever `id` the body carried is echoed"},"error":{"type":"object","properties":{"code":{"type":"integer","description":"-32700 parse error, -32600 invalid request, -32601 method not found, -32602 invalid params, -32603 internal error, -32001 unauthorized"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":true}},"required":["jsonrpc","id","error"],"additionalProperties":true,"description":"JSON-RPC 2.0 error response"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number"],"description":"Omit for a notification: answered 202 with no body. null is rejected (400)"},"method":{"type":"string","minLength":1,"description":"Handled: initialize, ping, tools/list, tools/call. Any other method with an id gets JSON-RPC error -32601 (HTTP 200); any notification (no id, e.g. notifications/initialized) gets 202"},"params":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"A tool name from tools/list"},"arguments":{"type":"object","additionalProperties":{},"description":"Path, query and body fields of the wrapped REST operation, as in the tool’s inputSchema. Path arguments are required"}},"required":["name"],"additionalProperties":false,"description":"tools/call params"},{"type":"object","properties":{"protocolVersion":{"type":"string","description":"Echoed back when it is 2025-06-18, 2025-03-26 or 2024-11-05; otherwise the server answers 2025-06-18"}},"additionalProperties":false,"description":"initialize params. capabilities and clientInfo are accepted and ignored"},{"type":"object","additionalProperties":{}}],"description":"tools/call: { name, arguments }. initialize: { protocolVersion }. Ignored by ping and tools/list (no cursor: the list is not paged)"}},"required":["jsonrpc","method"],"additionalProperties":false,"description":"One JSON-RPC 2.0 message. Batches (a JSON array) are rejected with 400"}}}},"parameters":[{"name":"authorization","in":"header","required":false,"description":"`Bearer <SWARMS_API_KEY>`; the scheme is case-insensitive","schema":{"anyOf":[{"not":{}},{"type":"string","pattern":"^Bearer\\s+.+$"}],"description":"`Bearer <SWARMS_API_KEY>`; the scheme is case-insensitive"}},{"name":"x-api-key","in":"header","required":false,"description":"The key on its own; used only when there is no Bearer token","schema":{"anyOf":[{"not":{}},{"type":"string"}],"description":"The key on its own; used only when there is no Bearer token"}}]}},"/api/product/claimfees":{"post":{"summary":"Claim the creator fees on a token you own","security":[{"bearerAuth":[]}],"description":"Signs Jupiter’s claim transaction with `privateKey` in memory and submits it. `ca` must be the token of one of your products, and `privateKey` must be that token’s fee wallet. The key is never stored or logged.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ca","privateKey"],"properties":{"ca":{"type":"string","description":"Token mint address"},"privateKey":{"type":"string","description":"Fee wallet secret key: base58, base64, or a JSON array of 64 numbers"}}}}}},"responses":{"200":{"description":"`success`, `signature`, `amountClaimedSol`, `fees`","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"signature":{"type":"string","description":"Solana transaction signature of the claim"},"ca":{"type":"string","description":"Token mint address"},"ticker":{"type":["string","null"]},"amountClaimedSol":{"type":["number","null"],"description":"Unclaimed fees read just before claiming, in quote-currency units (USDC for USDC-quoted tokens despite the name); null when the read failed"},"fees":{"anyOf":[{"type":"object","properties":{"unclaimedSol":{"type":"number"},"claimedSol":{"type":"number"},"totalSol":{"type":"number"}},"required":["unclaimedSol","claimedSol","totalSol"],"additionalProperties":true},{"type":"null"}],"description":"Fee totals read before claiming, in quote-currency units; null when the read failed"}},"required":["success","signature","ca","ticker","amountClaimedSol","fees"],"additionalProperties":true}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"fees":{"type":"object","properties":{"quoteMint":{"type":"string","description":"Quote currency mint; an empty string means SOL"},"totalFees":{"type":"number"},"unclaimedFees":{"type":"number"},"claimedFees":{"type":"number"},"sharePercentage":{"type":"string"},"isAvailable":{"type":"boolean","description":"True when any fee amount is above 0"},"poolBreakdown":{"type":"object","properties":{"dbc":{"type":"object","properties":{"unclaimed":{"type":"number"},"total":{"type":"number"}},"required":["unclaimed","total"],"additionalProperties":true},"damm":{"type":"object","properties":{"unclaimed":{"type":"number"},"total":{"type":"number"}},"required":["unclaimed","total"],"additionalProperties":true}},"additionalProperties":true,"description":"Present only when Jupiter reports per-pool amounts"}},"required":["quoteMint","totalFees","unclaimedFees","claimedFees","sharePercentage","isAvailable"],"additionalProperties":true,"description":"Creator fees as Jupiter reports them, in quote-currency units"}},"required":["error","fees"],"additionalProperties":true,"description":"Error body"}}},"description":"Missing or invalid ca or privateKey, or no fees"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"privateKey is not the token’s fee wallet"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No product with this ca owned by the caller"},"500":{"description":"Database error, Jupiter not configured, or the claim failed on every Jupiter URL (`error` is the upstream message)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/product/fees":{"get":{"summary":"Claimable fees for a tokenized product you own","security":[{"bearerAuth":[]}],"description":"Identify the product by exactly one of the parameters; `ca` / `tokenAddress` accept the token contract address.","parameters":[{"name":"url","in":"query","required":false,"description":"Marketplace product URL","schema":{"type":"string"}},{"name":"id","in":"query","required":false,"description":"Product ID","schema":{"type":"string"}},{"name":"ca","in":"query","required":false,"description":"Token contract (mint) address","schema":{"type":"string"}},{"name":"tokenAddress","in":"query","required":false,"description":"Alias of ca","schema":{"type":"string"}},{"name":"ticker","in":"query","required":false,"description":"Token ticker","schema":{"type":"string"}},{"name":"product","in":"query","required":false,"description":"Generic identifier — URL, ID, mint, or ticker","schema":{"type":"string"}}],"responses":{"200":{"description":"Claimable fees with USDC equivalent","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":["string","null"]},"uuid":{"type":"string","description":"Product ID"},"ca":{"type":"string","description":"Token mint address"},"ticker":{"type":["string","null"]},"quoteMint":{"type":"string","description":"Mint the fee amounts are denominated in (SOL by default)"},"claimedFees":{"type":"number","description":"In quote-currency units"},"unclaimedFees":{"type":"number","description":"In quote-currency units"},"totalFees":{"type":"number","description":"In quote-currency units"},"usdcEquivalent":{"anyOf":[{"type":"object","properties":{"claimedFees":{"type":"number"},"unclaimedFees":{"type":"number"},"totalFees":{"type":"number"},"quotePriceUsd":{"type":"number","description":"USD price of one quote unit"}},"required":["claimedFees","unclaimedFees","totalFees","quotePriceUsd"],"additionalProperties":true},{"type":"null"}],"description":"USD values; null when no price for the quote currency"},"isAvailable":{"type":"boolean","description":"False when Jupiter has no fee data yet (amounts read 0)"},"timestamp":{"type":"string","description":"ISO 8601 time of this response"}},"required":["name","uuid","ca","ticker","quoteMint","claimedFees","unclaimedFees","totalFees","usdcEquivalent","isAvailable","timestamp"],"additionalProperties":true}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No product parameter given"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No matching product owned by the caller"},"500":{"description":"Database error, or Jupiter is not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/product/list":{"get":{"summary":"List the authenticated user’s products by type","security":[{"bearerAuth":[]}],"parameters":[{"name":"type","in":"query","required":false,"description":"all | agent | prompt | tool | bundle (default all)","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string"},"total":{"type":"integer","description":"Length of `products`"},"counts":{"type":"object","properties":{"agents":{"type":"integer"},"prompts":{"type":"integer"},"tools":{"type":"integer"},"bundles":{"type":"integer"}},"required":["agents","prompts","tools","bundles"],"additionalProperties":true},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"UUID; for a bundle its product_id, or its numeric id as text"},"type":{"type":"string","enum":["agent","prompt","tool","bundle"]},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"created_at":{"type":"string","description":"ISO 8601 timestamp"},"url":{"type":"string","format":"uri","description":"https://swarms.world/<type>/<id>"}},"required":["id","type","name","description","created_at","url"],"additionalProperties":true},"description":"Every product of the requested types, newest first; no paging"}},"required":["user_id","total","counts","products"],"additionalProperties":true}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The API key has no user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/prompt-raw/{id}":{"get":{"summary":"prompt raw {id}","security":[{"bearerAuth":[]},{}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"text/markdown; charset=utf-8":{"schema":{"type":"string","description":"Markdown: a front-matter block (---, id, name, description if set, created_at, source URL, ---), a blank line, then the prompt body. Sent with ETag, Content-Disposition inline; filename=\"<slug>_prompt.md\", and CORS *"}}}},"304":{"description":"If-None-Match equals the ETag; empty body"},"400":{"description":"id is not a UUID (plain text `Invalid prompt ID`)","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Paid prompt and no valid API key or session (plain text)","content":{"text/plain":{"schema":{"type":"string"}}}},"403":{"description":"Paid prompt the caller neither owns nor bought (plain text)","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"No such prompt, or a paid unapproved prompt the caller does not own (plain text `Prompt not found`)","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/api/query-agents":{"post":{"summary":"Query agents by ID, owner username, or name","security":[{"bearerAuth":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"Agent ID"},"username":{"type":"string","description":"Owner username"},"agent_name":{"type":"string","description":"Agent name (substring match)"},"limit":{"type":"number","description":"Max results, default 20, max 100","default":20}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"use_cases":{"description":"Stored JSON, usually UseCase[]"},"tags":{"type":["string","null"],"description":"Comma-separated"},"is_free":{"type":"boolean"},"price":{"type":["number","null"],"description":"Legacy price field"},"price_usd":{"type":["number","null"]},"category":{"description":"Stored JSON: a string or an array"},"status":{"type":"string","const":"approved","description":"Only approved products are listed"},"image_url":{"type":["string","null"]},"file_path":{"type":["string","null"]},"links":{"description":"Stored JSON, usually an array of links"},"seller_wallet_address":{"type":["string","null"]},"created_at":{"type":"string"},"listing_url":{"type":"string","description":"https://swarms.world/agent/{id}"},"requirements":{"description":"Stored JSON, usually Requirement[]"},"language":{"type":["string","null"]},"user_id":{"type":["string","null"]}},"required":["id","name","description","tags","is_free","price","price_usd","status","image_url","file_path","seller_wallet_address","created_at","listing_url","language","user_id"],"additionalProperties":true,"description":"An approved agent (no source code)"}},"query_type":{"type":"string","enum":["id","username","slug","search"],"description":"Which filter was applied: id, username, slug (name substring) or search (no filter, newest approved products)"},"query_value":{"type":"string","description":"The id, username or name you sent; empty for search"},"total":{"type":"integer","description":"All matching approved products; data holds at most `limit`"}},"required":["data","query_type","query_value","total"],"additionalProperties":true}}}},"404":{"description":"No user with that `username`; body also carries the empty envelope (data, query_type, query_value, total)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"data":{"type":"array","items":{},"maxItems":0},"query_type":{"type":"string","const":"username"},"query_value":{"type":"string"},"total":{"type":"number","const":0}},"required":["error","data","query_type","query_value","total"],"additionalProperties":true,"description":"Error body"}}}},"500":{"description":"Database error, including an agent_id that is not a UUID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/query-prompts":{"post":{"summary":"Query prompts by ID, owner username, or name","security":[{"bearerAuth":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt_id":{"type":"string","description":"Prompt ID"},"username":{"type":"string","description":"Owner username"},"prompt_name":{"type":"string","description":"Prompt name (substring match)"},"limit":{"type":"number","description":"Max results, default 20, max 100","default":20}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"use_cases":{"description":"Stored JSON, usually UseCase[]"},"tags":{"type":["string","null"],"description":"Comma-separated"},"is_free":{"type":"boolean"},"price":{"type":["number","null"],"description":"Legacy price field"},"price_usd":{"type":["number","null"]},"category":{"description":"Stored JSON: a string or an array"},"status":{"type":"string","const":"approved","description":"Only approved products are listed"},"image_url":{"type":["string","null"]},"file_path":{"type":["string","null"]},"links":{"description":"Stored JSON, usually an array of links"},"seller_wallet_address":{"type":["string","null"]},"created_at":{"type":"string"},"listing_url":{"type":"string","description":"https://swarms.world/prompt/{id}"},"user_id":{"type":"string"}},"required":["id","name","description","tags","is_free","price","price_usd","status","image_url","file_path","seller_wallet_address","created_at","listing_url","user_id"],"additionalProperties":true,"description":"An approved prompt (no prompt body)"}},"query_type":{"type":"string","enum":["id","username","slug","search"],"description":"Which filter was applied: id, username, slug (name substring) or search (no filter, newest approved products)"},"query_value":{"type":"string","description":"The id, username or name you sent; empty for search"},"total":{"type":"integer","description":"All matching approved products; data holds at most `limit`"}},"required":["data","query_type","query_value","total"],"additionalProperties":true}}}},"404":{"description":"No user with that `username`; body also carries the empty envelope (data, query_type, query_value, total)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"data":{"type":"array","items":{},"maxItems":0},"query_type":{"type":"string","const":"username"},"query_value":{"type":"string"},"total":{"type":"number","const":0}},"required":["error","data","query_type","query_value","total"],"additionalProperties":true,"description":"Error body"}}}},"500":{"description":"Database error, including a prompt_id that is not a UUID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/reviews":{"post":{"summary":"Submit a 1–5 star review for an agent, prompt, or tool","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model_id":{"type":"string","minLength":1,"description":"ID of the agent/prompt/tool"},"model_type":{"type":"string","enum":["agent","prompt","tool"]},"rating":{"type":"integer","minimum":1,"maximum":5,"description":"Star rating, integer 1–5"},"comment":{"type":"string","minLength":2,"description":"Review text (min 2 characters)"}},"required":["model_id","model_type","rating","comment"],"additionalProperties":false}}}},"responses":{"201":{"description":"Review created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"review":{"type":"object","properties":{"id":{"type":"string"},"model_id":{"type":"string"},"model_type":{"type":"string","enum":["agent","prompt","tool"]},"rating":{"type":"integer","description":"1–5"},"comment":{"type":"string","description":"Trimmed"},"created_at":{"type":"string"}},"required":["id","model_id","model_type","rating","comment","created_at"],"additionalProperties":true}},"required":["success","review"],"additionalProperties":true}}}},"400":{"description":"Body is not JSON, or fails validation (`error` is the first issue)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Already reviewed this item"},"500":{"description":"Insert failed, including a model_id that is not a UUID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List reviews for a product","security":[],"parameters":[{"name":"model_id","in":"query","required":true,"description":"Agent/prompt/tool ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"reviews":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"model_id":{"type":"string"},"model_type":{"type":["string","null"],"description":"agent, prompt or tool"},"rating":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"1–5"},"comment":{"type":["string","null"]},"created_at":{"type":"string"},"users":{"anyOf":[{"type":"object","properties":{"full_name":{"type":["string","null"]},"username":{"type":["string","null"]},"avatar_url":{"type":["string","null"]}},"required":["full_name","username","avatar_url"],"additionalProperties":true},{"type":"null"}],"description":"The reviewer"}},"required":["id","model_id","model_type","rating","comment","created_at","users"],"additionalProperties":true,"description":"A review"},"description":"Newest first"},"average_rating":{"type":["number","null"],"description":"Mean rating to one decimal; null when there are no reviews"},"total":{"type":"integer","description":"Number of reviews (no pagination)"}},"required":["reviews","average_rating","total"],"additionalProperties":true}}}},"400":{"description":"model_id query parameter missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Database error, including a model_id that is not a UUID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/search":{"get":{"summary":"Search agents, prompts, tools and bundles, or look one up by id. Content is returned only for products you own, free products, and completed purchases; vault products are never unlocked here.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":false,"description":"Exact product id (UUID; bundles also accept their numeric id). Use instead of `q`.","schema":{"type":"string"}},{"name":"q","in":"query","required":false,"description":"Search text, 2–200 characters. Use instead of `id`.","schema":{"type":"string"}},{"name":"types","in":"query","required":false,"description":"Comma list of agent, prompt, tool, bundle. Default: all","schema":{"type":"string"}},{"name":"semantic","in":"query","required":false,"description":"true | false. Expand `q` into related terms with a model (default true)","schema":{"type":"string"}},{"name":"include_content","in":"query","required":false,"description":"true | false. Include content you can access (default true for `id`, false for `q`)","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Results per page, default 20, max 50","schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"description":"Results to skip, default 0, max 150","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","const":"id"},"id":{"type":"string","description":"The `id` you sent, trimmed"},"types":{"type":"array","items":{"type":"string","enum":["agent","prompt","tool","bundle"]},"description":"Types searched"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product UUID; for bundles the product_id, else the numeric id"},"type":{"type":"string","enum":["agent","prompt","tool","bundle"]},"name":{"type":["string","null"]},"description":{"type":["string","null"],"description":"Truncated to 500 characters plus an ellipsis"},"listing_url":{"type":"string","description":"https://swarms.world/{type}/{id}"},"image_url":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"},"description":"Split from the stored comma list"},"category":{"description":"Stored JSON: a string or an array; null for bundles"},"created_at":{"type":"string"},"is_free":{"type":"boolean"},"price_usd":{"type":["number","null"],"description":"Always null for tools and bundles (column not selected)"},"tokenized":{"type":"boolean"},"vault_mode":{"type":"boolean"},"owner_id":{"type":["string","null"],"description":"user_id of the publisher"},"score":{"type":"number","description":"Relevance score; present in search mode only"},"access":{"type":"object","properties":{"has_access":{"type":"boolean"},"reason":{"type":"string","enum":["owner","free","purchased","purchase_required","vault_locked"],"description":"owner: you published it; free: no charge; purchased: completed purchase; purchase_required: paid and not bought; vault_locked: tokenized vault product, never unlocked through the API"}},"required":["has_access","reason"],"additionalProperties":true,"description":"Whether the API key’s user can read the product content"},"content":{"anyOf":[{"anyOf":[{"type":"object","properties":{"prompt":{"type":["string","null"]}},"required":["prompt"],"additionalProperties":true,"description":"Content of a prompt"},{"type":"object","properties":{"agent":{"type":["string","null"],"description":"Agent source code"},"language":{"type":["string","null"]},"requirements":{"description":"Stored JSON, usually Requirement[]"}},"required":["agent","language"],"additionalProperties":true,"description":"Content of an agent"},{"type":"object","properties":{"tool":{"type":["string","null"],"description":"Tool source code"},"language":{"type":["string","null"]},"requirements":{"description":"Stored JSON, usually Requirement[]"}},"required":["tool","language"],"additionalProperties":true,"description":"Content of a tool"},{"type":"object","properties":{"items":{"description":"Stored JSON list of bundle items"}},"additionalProperties":true,"description":"Content of a bundle"}]},{"type":"null"}],"description":"Product body, keyed by type. Absent unless content was requested (by default with `id`, only with include_content=true for `q`); null when access.has_access is false"}},"required":["id","type","name","description","listing_url","image_url","tags","created_at","is_free","price_usd","tokenized","vault_mode","owner_id","access"],"additionalProperties":true,"description":"A product returned by /api/search"},"description":"The matching product (at least one; 404 otherwise)"}},"required":["mode","id","types","results"],"additionalProperties":true,"description":"Lookup by `id`"},{"type":"object","properties":{"mode":{"type":"string","const":"search"},"query":{"type":"string","description":"The `q` you sent, trimmed"},"types":{"type":"array","items":{"type":"string","enum":["agent","prompt","tool","bundle"]},"description":"Types searched"},"semantic":{"type":"object","properties":{"requested":{"type":"boolean","description":"false only when semantic=false"},"used":{"type":"boolean","description":"Whether model expansion succeeded"},"terms":{"type":"array","items":{"type":"string"},"description":"Expansion keywords used; empty when not used"},"reason":{"type":"string","description":"Present only when used is false: disabled, not_configured, upstream_<status>, unparseable, timeout or request_failed"}},"required":["requested","used","terms"],"additionalProperties":true},"total_matches":{"type":"integer","description":"Rows matching the query in name, description or tags, summed across types"},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product UUID; for bundles the product_id, else the numeric id"},"type":{"type":"string","enum":["agent","prompt","tool","bundle"]},"name":{"type":["string","null"]},"description":{"type":["string","null"],"description":"Truncated to 500 characters plus an ellipsis"},"listing_url":{"type":"string","description":"https://swarms.world/{type}/{id}"},"image_url":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"},"description":"Split from the stored comma list"},"category":{"description":"Stored JSON: a string or an array; null for bundles"},"created_at":{"type":"string"},"is_free":{"type":"boolean"},"price_usd":{"type":["number","null"],"description":"Always null for tools and bundles (column not selected)"},"tokenized":{"type":"boolean"},"vault_mode":{"type":"boolean"},"owner_id":{"type":["string","null"],"description":"user_id of the publisher"},"score":{"type":"number","description":"Relevance score; present in search mode only"},"access":{"type":"object","properties":{"has_access":{"type":"boolean"},"reason":{"type":"string","enum":["owner","free","purchased","purchase_required","vault_locked"],"description":"owner: you published it; free: no charge; purchased: completed purchase; purchase_required: paid and not bought; vault_locked: tokenized vault product, never unlocked through the API"}},"required":["has_access","reason"],"additionalProperties":true,"description":"Whether the API key’s user can read the product content"},"content":{"anyOf":[{"anyOf":[{"type":"object","properties":{"prompt":{"type":["string","null"]}},"required":["prompt"],"additionalProperties":true,"description":"Content of a prompt"},{"type":"object","properties":{"agent":{"type":["string","null"],"description":"Agent source code"},"language":{"type":["string","null"]},"requirements":{"description":"Stored JSON, usually Requirement[]"}},"required":["agent","language"],"additionalProperties":true,"description":"Content of an agent"},{"type":"object","properties":{"tool":{"type":["string","null"],"description":"Tool source code"},"language":{"type":["string","null"]},"requirements":{"description":"Stored JSON, usually Requirement[]"}},"required":["tool","language"],"additionalProperties":true,"description":"Content of a tool"},{"type":"object","properties":{"items":{"description":"Stored JSON list of bundle items"}},"additionalProperties":true,"description":"Content of a bundle"}]},{"type":"null"}],"description":"Product body, keyed by type. Absent unless content was requested (by default with `id`, only with include_content=true for `q`); null when access.has_access is false"}},"required":["id","type","name","description","listing_url","image_url","tags","created_at","is_free","price_usd","tokenized","vault_mode","owner_id","access"],"additionalProperties":true,"description":"A product returned by /api/search"},"description":"Best match first"}},"required":["mode","query","types","semantic","total_matches","limit","offset","has_more","results"],"additionalProperties":true,"description":"Search by `q`"}]}}}},"400":{"description":"Invalid query parameters (with `details`), neither or both of id and q, bad `types`, `id` not a UUID or number, or `q` with fewer than 2 letters or digits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"API key missing or invalid (with `how_to_get_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No product with that `id`, or the key has no user (`User is missing`, with `how_to_get_key`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Search failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/swarms-chat":{"post":{"summary":"swarms chat","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"text/event-stream":{"schema":{"type":"object","properties":{"event":{"type":"string","description":"chunk (a text delta), usage, error, end, or another Swarms API lifecycle event, which clients should ignore"},"data":{"type":"object","properties":{"content":{"type":"string","description":"chunk: the text delta"},"search":{"type":"boolean","const":true,"description":"chunk: set on the single chunk of a web-search reply"},"fallback":{"type":"string","const":"non-streaming","description":"chunk: set when the stream carried no text and the route re-ran the completion without streaming"},"output_tokens":{"type":"integer","description":"usage: tokens generated; other usage keys may appear"},"error":{"type":"string","description":"error: what went wrong"}},"additionalProperties":true,"description":"JSON on the `data:` line"}},"required":["event","data"],"additionalProperties":true,"description":"One server-sent event. Without search the route opens with an SSE comment of 2048 spaces (to flush proxies), then relays the Swarms API stream byte for byte (events seen: chunk, usage, end, error). If that stream had no text, one more `chunk` with `fallback` follows. With search_enabled the body is a single `chunk` with `search: true` and no primer, or EMPTY when the model returned no text. A failure mid-stream aborts the connection"}}}},"400":{"description":"Body is not JSON (\"Invalid JSON payload\"); agent_settings fails validation (\"Invalid agent settings\", with `issues`); message, systemPrompt or promptId missing (\"Missing required parameters\", with `required`); or the model is neither in the chat list nor available upstream (\"Unsupported model\", with `model`)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"code":{"type":"string","const":"insufficient_credits","description":"402 only: the account is out of credits"},"required":{"type":"array","items":{"type":"string"},"description":"400 \"Missing required parameters\": the required fields"},"model":{"type":"string","description":"400 \"Unsupported model\": the model that was refused"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":true},"description":"400 \"Invalid agent settings\": one entry per failed field"}},"required":["error"],"additionalProperties":true,"description":"Error body. Upstream failures put the Swarms API error body in `details`. Served without a JSON content type (text/plain)"}}}},"401":{"description":"No signed-in session cookie (a Bearer API key is not accepted), or the Swarms API rejected the user’s stored key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"code":{"type":"string","const":"insufficient_credits","description":"402 only: the account is out of credits"},"required":{"type":"array","items":{"type":"string"},"description":"400 \"Missing required parameters\": the required fields"},"model":{"type":"string","description":"400 \"Unsupported model\": the model that was refused"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":true},"description":"400 \"Invalid agent settings\": one entry per failed field"}},"required":["error"],"additionalProperties":true,"description":"Error body. Upstream failures put the Swarms API error body in `details`. Served without a JSON content type (text/plain)"}}}},"402":{"description":"Out of Swarms credits: `code: \"insufficient_credits\"`, Swarms API body in `details`","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"code":{"type":"string","const":"insufficient_credits","description":"402 only: the account is out of credits"},"required":{"type":"array","items":{"type":"string"},"description":"400 \"Missing required parameters\": the required fields"},"model":{"type":"string","description":"400 \"Unsupported model\": the model that was refused"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":true},"description":"400 \"Invalid agent settings\": one entry per failed field"}},"required":["error"],"additionalProperties":true,"description":"Error body. Upstream failures put the Swarms API error body in `details`. Served without a JSON content type (text/plain)"}}}},"429":{"description":"Rate limited by swarms.world (\"Too many requests\") or by the Swarms API (\"Swarms API rate limit exceeded\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"code":{"type":"string","const":"insufficient_credits","description":"402 only: the account is out of credits"},"required":{"type":"array","items":{"type":"string"},"description":"400 \"Missing required parameters\": the required fields"},"model":{"type":"string","description":"400 \"Unsupported model\": the model that was refused"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":true},"description":"400 \"Invalid agent settings\": one entry per failed field"}},"required":["error"],"additionalProperties":true,"description":"Error body. Upstream failures put the Swarms API error body in `details`. Served without a JSON content type (text/plain)"}}}},"500":{"description":"Could not find or create the user’s API key, could not reach the Swarms API, or an unexpected failure (a non-string promptName or promptDescription crashes it with Next.js’s default 500)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"code":{"type":"string","const":"insufficient_credits","description":"402 only: the account is out of credits"},"required":{"type":"array","items":{"type":"string"},"description":"400 \"Missing required parameters\": the required fields"},"model":{"type":"string","description":"400 \"Unsupported model\": the model that was refused"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":true},"description":"400 \"Invalid agent settings\": one entry per failed field"}},"required":["error"],"additionalProperties":true,"description":"Error body. Upstream failures put the Swarms API error body in `details`. Served without a JSON content type (text/plain)"}}}},"default":{"description":"Any other Swarms API error status (e.g. 403, 404, 422, 502, 503) is passed through as { error, details }","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"code":{"type":"string","const":"insufficient_credits","description":"402 only: the account is out of credits"},"required":{"type":"array","items":{"type":"string"},"description":"400 \"Missing required parameters\": the required fields"},"model":{"type":"string","description":"400 \"Unsupported model\": the model that was refused"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":true},"description":"400 \"Invalid agent settings\": one entry per failed field"}},"required":["error"],"additionalProperties":true,"description":"Error body. Upstream failures put the Swarms API error body in `details`. Served without a JSON content type (text/plain)"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"description":"The user turn, sent to the Swarms API as `task`"},"systemPrompt":{"type":"string","minLength":1,"description":"The prompt body. The route prefixes an identity block built from `promptName` / `promptDescription` and sends it as the agent system prompt"},"promptId":{"type":"string","minLength":1,"description":"Id of the marketplace prompt being chatted with. Must be non-empty; not otherwise read or checked"},"promptName":{"type":"string","default":"Agent","description":"Agent name the model answers to. Blank falls back to \"Agent\". Must be a string: another type crashes the route with a 500"},"promptDescription":{"type":"string","default":"","description":"Agent description; also the agent `description` (falls back to the name). Must be a string: another type crashes the route"},"model":{"type":"string","default":"gpt-5.4","description":"One of gpt-5.4, claude-haiku-4-5-20251001, gemini-2.0-flash, gpt-5, gemini-2.5-pro, claude-4-opus-20250514, claude-4-sonnet-20250514, claude-haiku-4-5, claude-opus-4-1, claude-sonnet-4-5, xai/grok-4, xai/grok-4-fast-reasoning, xai/grok-4-fast-non-reasoning, xai/grok-4-latest, or any chat model the Swarms API lists at GET /v1/models/available (cached for an hour). An empty string falls back to the default"},"history":{"anyOf":[{"type":"object","additionalProperties":{"type":"object","properties":{"role":{"type":"string","description":"user | assistant"},"content":{"type":"string"}},"required":["role","content"],"additionalProperties":false}},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","description":"user | assistant"},"content":{"type":"string"}},"required":["role","content"],"additionalProperties":false}}],"description":"Earlier turns, forwarded unchecked to the Swarms API. The web client sends an object keyed message1, message2, …; an empty object is dropped"},"img":{"type":"string","description":"One base64 image without the data: prefix"},"imgs":{"type":"array","items":{"type":"string"},"description":"Every attached base64 image. Non-string entries are dropped; sent only when non-empty. The web client sends both img and imgs"},"search_enabled":{"type":"boolean","default":false,"description":"Only the literal `true` enables web search. The agent then runs 2 loops and the whole reply arrives as one `chunk` event instead of token by token"},"agent_settings":{"anyOf":[{"type":"object","properties":{"fallback_models":{"type":"array","items":{"type":"string","maxLength":200,"minLength":1},"maxItems":20},"fallback_model_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"auto_generate_prompt":{"type":"boolean"},"max_tokens":{"type":"integer","minimum":1,"maximum":1000000},"temperature":{"anyOf":[{"type":"number","minimum":0,"maximum":2},{"type":"null"}]},"role":{"type":"string","maxLength":100},"max_loops":{"anyOf":[{"type":"integer","minimum":1,"maximum":50},{"type":"string","const":"auto"}]},"tools_list_dictionary":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}},"maxItems":100},{"type":"null"}]},"selected_tools":{"anyOf":[{"type":"array","items":{"type":"string","enum":["create_plan","think","subtask_done","complete_task","respond_to_user","create_file","update_file","read_file","list_directory","delete_file","create_sub_agent","assign_task"]}},{"type":"null"}]},"mcp_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"streaming_on":{"type":"boolean"},"llm_args":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"top_p":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1},{"type":"null"}]},"dynamic_temperature_enabled":{"type":"boolean"},"mcp_config":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"mcp_configs":{"anyOf":[{"type":"object","properties":{"connections":{"type":"array","items":{"type":"object","additionalProperties":{}},"maxItems":50}},"required":["connections"],"additionalProperties":false},{"type":"null"}]},"tool_call_summary":{"type":"boolean"},"reasoning_effort":{"anyOf":[{"type":"string","enum":["minimal","low","medium","high","none","xhigh","ultra","max"]},{"type":"null"}]},"thinking_tokens":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}]},"reasoning_enabled":{"type":"boolean"},"publish_to_marketplace":{"type":"boolean"},"use_cases":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}},"maxItems":50},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":50},"capabilities":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":50},"category":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"is_free":{"type":"boolean"},"price_usd":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"handoffs":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}},"maxItems":20},{"type":"null"}]}},"required":["fallback_models","fallback_model_name","auto_generate_prompt","max_tokens","temperature","role","max_loops","tools_list_dictionary","selected_tools","mcp_url","streaming_on","llm_args","top_p","dynamic_temperature_enabled","mcp_config","mcp_configs","tool_call_summary","reasoning_effort","thinking_tokens","reasoning_enabled","publish_to_marketplace","use_cases","tags","capabilities","category","is_free","price_usd","handoffs"],"additionalProperties":false},{"type":"null"}],"description":"Swarms AgentSpec overrides. When present, EVERY field is required (it is the full settings object the web client stores, not a partial); a failing object is a 400 with `issues`. Nulls and empty arrays are dropped, and agent_name, description, system_prompt, model_name, streaming_on and publish_to_marketplace are always set by the route. Without it the agent runs with max_tokens 32000, role worker, max_loops 1, reasoning_effort low"}},"required":["message","systemPrompt","promptId"],"additionalProperties":false,"description":"Prompt chat turn. Billed to the signed-in user’s own Swarms API key, which the route finds or creates"}}}}}},"/api/swarms/agent-completions":{"post":{"summary":"swarms agent completions","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":["string","null"]},"success":{"type":["boolean","null"]},"name":{"type":["string","null"],"description":"Agent name"},"description":{"type":["string","null"]},"temperature":{"type":["number","null"]},"outputs":{"description":"The agent’s output: a string, or a list of { role, content } messages, depending on the Swarms API output type"},"usage":{"anyOf":[{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"total_cost":{"type":"number","description":"Credits charged"}},"additionalProperties":true,"description":"Token and credit usage reported by the Swarms API"},{"type":"null"}],"description":"Token and credit usage reported by the Swarms API"},"timestamp":{"type":["string","null"]}},"additionalProperties":true,"description":"The Swarms API AgentCompletionOutput, passed through unchanged with status 200. The route reads none of it"}}}},"400":{"description":"agent_config or task missing (\"agent_config and task are required\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Usually a string. On an upstream error it is the upstream body’s `error`, else `message`, else `detail`, else its raw text, copied as is, so it can be an object ({ type, message, detail, status_code }) or, on a 422, the FastAPI validation array"},"success":{"type":"boolean","const":false},"status":{"type":"integer","description":"The Swarms API status; present on upstream errors only"}},"required":["error","success"],"additionalProperties":true,"description":"Error body. Not the shared Error shape: `error` is not always a string"}}}},"401":{"description":"No `Authorization: Bearer` header (\"API key is required\"), or the Swarms API rejected the key, which is not checked locally","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Usually a string. On an upstream error it is the upstream body’s `error`, else `message`, else `detail`, else its raw text, copied as is, so it can be an object ({ type, message, detail, status_code }) or, on a 422, the FastAPI validation array"},"success":{"type":"boolean","const":false},"status":{"type":"integer","description":"The Swarms API status; present on upstream errors only"}},"required":["error","success"],"additionalProperties":true,"description":"Error body. Not the shared Error shape: `error` is not always a string"}}}},"402":{"description":"Out of Swarms credits (passed through from the Swarms API)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Usually a string. On an upstream error it is the upstream body’s `error`, else `message`, else `detail`, else its raw text, copied as is, so it can be an object ({ type, message, detail, status_code }) or, on a 422, the FastAPI validation array"},"success":{"type":"boolean","const":false},"status":{"type":"integer","description":"The Swarms API status; present on upstream errors only"}},"required":["error","success"],"additionalProperties":true,"description":"Error body. Not the shared Error shape: `error` is not always a string"}}}},"422":{"description":"Swarms API validation failed; `error` is the FastAPI detail list","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Usually a string. On an upstream error it is the upstream body’s `error`, else `message`, else `detail`, else its raw text, copied as is, so it can be an object ({ type, message, detail, status_code }) or, on a 422, the FastAPI validation array"},"success":{"type":"boolean","const":false},"status":{"type":"integer","description":"The Swarms API status; present on upstream errors only"}},"required":["error","success"],"additionalProperties":true,"description":"Error body. Not the shared Error shape: `error` is not always a string"}}}},"429":{"description":"Rate limited by swarms.world or by the Swarms API","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Usually a string. On an upstream error it is the upstream body’s `error`, else `message`, else `detail`, else its raw text, copied as is, so it can be an object ({ type, message, detail, status_code }) or, on a 422, the FastAPI validation array"},"success":{"type":"boolean","const":false},"status":{"type":"integer","description":"The Swarms API status; present on upstream errors only"}},"required":["error","success"],"additionalProperties":true,"description":"Error body. Not the shared Error shape: `error` is not always a string"}}}},"500":{"description":"Body is not JSON (should be 400), the Swarms API answered 2xx with a non-JSON (e.g. streamed) body, it could not be reached, or it returned 500","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Usually a string. On an upstream error it is the upstream body’s `error`, else `message`, else `detail`, else its raw text, copied as is, so it can be an object ({ type, message, detail, status_code }) or, on a 422, the FastAPI validation array"},"success":{"type":"boolean","const":false},"status":{"type":"integer","description":"The Swarms API status; present on upstream errors only"}},"required":["error","success"],"additionalProperties":true,"description":"Error body. Not the shared Error shape: `error` is not always a string"}}}},"default":{"description":"Any other Swarms API error status is passed through as { error, success: false, status }","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Usually a string. On an upstream error it is the upstream body’s `error`, else `message`, else `detail`, else its raw text, copied as is, so it can be an object ({ type, message, detail, status_code }) or, on a 422, the FastAPI validation array"},"success":{"type":"boolean","const":false},"status":{"type":"integer","description":"The Swarms API status; present on upstream errors only"}},"required":["error","success"],"additionalProperties":true,"description":"Error body. Not the shared Error shape: `error` is not always a string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_config":{"type":"object","properties":{"agent_name":{"type":["string","null"]},"description":{"type":["string","null"]},"system_prompt":{"type":["string","null"]},"model_name":{"type":["string","null"],"description":"Swarms API default: claude-sonnet-5"},"marketplace_prompt_id":{"type":["string","null"],"description":"Use a swarms.world prompt as the system prompt"},"auto_generate_prompt":{"type":["boolean","null"]},"max_tokens":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Swarms API default: 16000"},"temperature":{"anyOf":[{"type":"number","minimum":0,"maximum":2},{"type":"null"}]},"role":{"type":["string","null"],"description":"Swarms API default: worker"},"max_loops":{"anyOf":[{"anyOf":[{"type":"integer","minimum":1,"maximum":50},{"type":"string","const":"auto"}]},{"type":"null"}],"description":"Swarms API default: 1"},"reasoning_effort":{"type":["string","null"]},"fallback_models":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"mcp_url":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}}]},{"type":"null"}]},"tools_list_dictionary":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"llm_args":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"streaming_on":{"type":["boolean","null"],"description":"Leave false. The route parses the Swarms API reply as JSON, so a streamed reply fails with a 500"}},"additionalProperties":false,"description":"Required: a missing or empty agent_config is a 400. Only its presence is checked here"},"task":{"type":"string","minLength":1,"description":"Required: a missing or empty task is a 400"},"history":{"anyOf":[{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}]},{"type":"null"}],"description":"Earlier turns: an object, or a list of { role, content }"},"img":{"type":["string","null"],"description":"One base64 image"},"imgs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Several base64 images"},"tools_enabled":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"search_enabled":{"type":"boolean","description":"Web search. Accepted by the Swarms API (the prompt chat relies on it) though absent from its published schema"}},"required":["agent_config","task"],"additionalProperties":false,"description":"Forwarded unchanged to the Swarms API POST /v1/agent/completions (AgentCompletion); this route only checks that agent_config and task are present. The route never streams"}}}}}},"/api/swarms/swarm-completions":{"post":{"summary":"swarms swarm completions","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":["string","null"]},"status":{"type":["string","null"]},"swarm_name":{"type":["string","null"]},"description":{"type":["string","null"]},"swarm_type":{"type":["string","null"]},"output":{"description":"The swarm’s output; shape varies by type"},"number_of_agents":{"anyOf":[{"type":"integer"},{"type":"null"}]},"execution_time":{"type":["number","null"],"description":"Seconds"},"usage":{"anyOf":[{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"total_cost":{"type":"number","description":"Credits charged"},"cost_per_agent":{"type":"number"}},"additionalProperties":true,"description":"Token and credit usage reported by the Swarms API"},{"type":"null"}],"description":"Token and credit usage reported by the Swarms API"},"tasks":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Echo of the request’s tasks"},"messages":{"anyOf":[{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"object","additionalProperties":{}}]},{"type":"null"}],"description":"Echo of the request’s messages"}},"required":["job_id","status","swarm_name","description","swarm_type","number_of_agents","execution_time","usage"],"additionalProperties":true,"description":"The Swarms API SwarmCompletion, passed through unchanged with status 200. Required keys follow the Swarms API schema; the route reads none of it"}}}},"400":{"description":"agents missing or empty (\"agents array is required and must not be empty\"), or task missing (\"task is required\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Usually a string. On an upstream error it is the upstream body’s `error`, else `message`, else `detail`, else its raw text, copied as is, so it can be an object ({ type, message, detail, status_code }) or, on a 422, the FastAPI validation array"},"success":{"type":"boolean","const":false},"status":{"type":"integer","description":"The Swarms API status; present on upstream errors only"}},"required":["error","success"],"additionalProperties":true,"description":"Error body. Not the shared Error shape: `error` is not always a string"}}}},"401":{"description":"No `Authorization: Bearer` header (\"API key is required\"), or the Swarms API rejected the key, which is not checked locally","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Usually a string. On an upstream error it is the upstream body’s `error`, else `message`, else `detail`, else its raw text, copied as is, so it can be an object ({ type, message, detail, status_code }) or, on a 422, the FastAPI validation array"},"success":{"type":"boolean","const":false},"status":{"type":"integer","description":"The Swarms API status; present on upstream errors only"}},"required":["error","success"],"additionalProperties":true,"description":"Error body. Not the shared Error shape: `error` is not always a string"}}}},"402":{"description":"Out of Swarms credits (passed through from the Swarms API)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Usually a string. On an upstream error it is the upstream body’s `error`, else `message`, else `detail`, else its raw text, copied as is, so it can be an object ({ type, message, detail, status_code }) or, on a 422, the FastAPI validation array"},"success":{"type":"boolean","const":false},"status":{"type":"integer","description":"The Swarms API status; present on upstream errors only"}},"required":["error","success"],"additionalProperties":true,"description":"Error body. Not the shared Error shape: `error` is not always a string"}}}},"422":{"description":"Swarms API validation failed; `error` is the FastAPI detail list","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Usually a string. On an upstream error it is the upstream body’s `error`, else `message`, else `detail`, else its raw text, copied as is, so it can be an object ({ type, message, detail, status_code }) or, on a 422, the FastAPI validation array"},"success":{"type":"boolean","const":false},"status":{"type":"integer","description":"The Swarms API status; present on upstream errors only"}},"required":["error","success"],"additionalProperties":true,"description":"Error body. Not the shared Error shape: `error` is not always a string"}}}},"429":{"description":"Rate limited by swarms.world or by the Swarms API","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Usually a string. On an upstream error it is the upstream body’s `error`, else `message`, else `detail`, else its raw text, copied as is, so it can be an object ({ type, message, detail, status_code }) or, on a 422, the FastAPI validation array"},"success":{"type":"boolean","const":false},"status":{"type":"integer","description":"The Swarms API status; present on upstream errors only"}},"required":["error","success"],"additionalProperties":true,"description":"Error body. Not the shared Error shape: `error` is not always a string"}}}},"500":{"description":"Body is not JSON (should be 400), the Swarms API answered 2xx with a non-JSON (e.g. streamed) body, it could not be reached, or it returned 500","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Usually a string. On an upstream error it is the upstream body’s `error`, else `message`, else `detail`, else its raw text, copied as is, so it can be an object ({ type, message, detail, status_code }) or, on a 422, the FastAPI validation array"},"success":{"type":"boolean","const":false},"status":{"type":"integer","description":"The Swarms API status; present on upstream errors only"}},"required":["error","success"],"additionalProperties":true,"description":"Error body. Not the shared Error shape: `error` is not always a string"}}}},"default":{"description":"Any other Swarms API error status is passed through as { error, success: false, status }","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Usually a string. On an upstream error it is the upstream body’s `error`, else `message`, else `detail`, else its raw text, copied as is, so it can be an object ({ type, message, detail, status_code }) or, on a 422, the FastAPI validation array"},"success":{"type":"boolean","const":false},"status":{"type":"integer","description":"The Swarms API status; present on upstream errors only"}},"required":["error","success"],"additionalProperties":true,"description":"Error body. Not the shared Error shape: `error` is not always a string"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agents":{"type":"array","items":{"type":"object","properties":{"agent_name":{"type":["string","null"]},"description":{"type":["string","null"]},"system_prompt":{"type":["string","null"]},"model_name":{"type":["string","null"],"description":"Swarms API default: claude-sonnet-5"},"marketplace_prompt_id":{"type":["string","null"],"description":"Use a swarms.world prompt as the system prompt"},"auto_generate_prompt":{"type":["boolean","null"]},"max_tokens":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Swarms API default: 16000"},"temperature":{"anyOf":[{"type":"number","minimum":0,"maximum":2},{"type":"null"}]},"role":{"type":["string","null"],"description":"Swarms API default: worker"},"max_loops":{"anyOf":[{"anyOf":[{"type":"integer","minimum":1,"maximum":50},{"type":"string","const":"auto"}]},{"type":"null"}],"description":"Swarms API default: 1"},"reasoning_effort":{"type":["string","null"]},"fallback_models":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"mcp_url":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}}]},{"type":"null"}]},"tools_list_dictionary":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"llm_args":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"streaming_on":{"type":["boolean","null"],"description":"Leave false. The route parses the Swarms API reply as JSON, so a streamed reply fails with a 500"}},"additionalProperties":false,"description":"A Swarms API AgentSpec, forwarded unchanged. The fields listed are the common ones; every AgentSpec field is accepted (see https://docs.swarms.ai)"},"minItems":1,"maxItems":2000,"description":"Required, non-empty (checked here). At most 2000 (Swarms API)"},"task":{"type":"string","minLength":1,"description":"Required (checked here), even though the Swarms API would accept `tasks` or `messages` instead"},"swarm_type":{"type":"string","description":"Not checked here. The Swarms API accepts AgentRearrange, MixtureOfAgents, SequentialWorkflow, ConcurrentWorkflow, GroupChat, MultiAgentRouter, HierarchicalSwarm, MajorityVoting, CouncilAsAJudge, HeavySwarm, LLMCouncil, DebateWithJudge, RoundRobin, PlannerWorkerSwarm"},"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"description":{"type":["string","null"]},"max_loops":{"anyOf":[{"type":"integer","maximum":50},{"type":"null"}],"description":"Swarms API default: 1"},"rearrange_flow":{"type":["string","null"],"description":"AgentRearrange: the flow, e.g. \"a -> b, c\""},"img":{"type":["string","null"]},"tasks":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"messages":{"anyOf":[{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"object","additionalProperties":{}}]},{"type":"null"}]},"stream":{"type":["boolean","null"],"description":"Leave false. The route parses the Swarms API reply as JSON, so a streamed reply fails with a 500"}},"required":["agents","task"],"additionalProperties":false,"description":"Forwarded unchanged to the Swarms API POST /v1/swarm/completions (SwarmSpec, which has more optional fields, e.g. director and heavy-swarm settings); this route only checks agents and task"}}}}}},"/api/update-token-address":{"post":{"summary":"Attach a launched token address to a product you own","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Product ID"},"type":{"type":"string","enum":["prompt","agent","tool"]},"tokenAddress":{"type":"string","pattern":"^[1-9A-HJ-NP-Za-km-z]{32,44}$","description":"Token mint address (base58)"},"tokenSymbol":{"type":"string","description":"Token ticker"}},"required":["id","type","tokenAddress"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"tokenAddress":{"type":"string","description":"The mint that was saved"},"tokenSymbol":{"type":"string","description":"The symbol that was saved; 'UNKNOWN' when none was sent"}},"required":["success","message","tokenAddress","tokenSymbol"],"additionalProperties":true}}}},"400":{"description":"Missing field, invalid `type`, or `tokenAddress` not base58 (body is only `{ error }`: 'Missing required fields' | 'Invalid type' | 'Invalid token address')","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method other than POST (plain-text body)","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Database error (e.g. `id` not a UUID); `details` is the raw database error object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/user-products":{"post":{"summary":"List the authenticated user’s products","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"number","description":"Page number, default 1","default":1},"limit":{"type":"number","description":"Items per page, default 20, max 100","default":20},"product_type":{"type":"string","description":"'all' | 'prompts' | 'agents' | 'tools'","default":"all"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string"},"username":{"type":"string","description":"Empty string when the user has none"},"total_products":{"type":"integer"},"prompts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"type":{"type":"string","enum":["prompt","agent","tool"]},"business_model":{"type":"string","enum":["free","paid","tokenized"],"description":"tokenized wins over free; anything else is paid"},"listing_url":{"type":"string","format":"uri"}},"required":["id","name","description","type","business_model","listing_url"],"additionalProperties":true}},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"type":{"type":"string","enum":["prompt","agent","tool"]},"business_model":{"type":"string","enum":["free","paid","tokenized"],"description":"tokenized wins over free; anything else is paid"},"listing_url":{"type":"string","format":"uri"}},"required":["id","name","description","type","business_model","listing_url"],"additionalProperties":true}},"tools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"type":{"type":"string","enum":["prompt","agent","tool"]},"business_model":{"type":"string","enum":["free","paid","tokenized"],"description":"tokenized wins over free; anything else is paid"},"listing_url":{"type":"string","format":"uri"}},"required":["id","name","description","type","business_model","listing_url"],"additionalProperties":true}},"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total_pages":{"type":"integer","description":"At least 1"},"has_next":{"type":"boolean"},"has_prev":{"type":"boolean"}},"required":["page","limit","total_pages","has_next","has_prev"],"additionalProperties":true,"description":"Only applied when product_type is 'prompts', 'agents' or 'tools'. With 'all' every product is returned and these numbers are computed as if the lists were paged."},"summary":{"type":"object","properties":{"total_prompts":{"type":"integer"},"total_agents":{"type":"integer"},"total_tools":{"type":"integer"},"free_products":{"type":"integer","description":"Counted over the returned lists only"},"paid_products":{"type":"integer","description":"Counted over the returned lists only"},"tokenized_products":{"type":"integer","description":"Counted over the returned lists only"}},"required":["total_prompts","total_agents","total_tools","free_products","paid_products","tokenized_products"],"additionalProperties":true,"description":"total_* count every matching row; the business-model counts only the returned page"}},"required":["user_id","username","total_products","prompts","agents","tools","pagination","summary"],"additionalProperties":true}}}},"401":{"description":"Missing or invalid API key (body is only `{ error }`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No users row for the key’s user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method other than POST (plain-text body)","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Database error; `details` holds the message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/publish/bundle":{"post":{"summary":"Publish a bundle of marketplace items","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":200},"description":{"type":"string","maxLength":10000},"image_url":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"uri"}]},{"type":"string","const":""}]},"image_base64":{"type":"string"},"tags":{"type":"string","maxLength":500},"business_model":{"type":"string","maxLength":100},"links":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","const":""}]}},"required":["name"],"additionalProperties":false},"maxItems":20},"items":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"name":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":2000},"content":{"type":"string","maxLength":50000}},"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["name","items"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"id":{"anyOf":[{"type":"string"},{"type":"integer"}],"description":"The bundle’s UUID product_id; the numeric row id only if product_id is unset"},"listing_url":{"type":"string","format":"uri","description":"https://swarms.world/bundle/<id>"},"item_count":{"type":"integer","description":"Items stored in the bundle"}},"required":["success","id","listing_url","item_count"],"additionalProperties":true}}}},"400":{"description":"Body failed validation, or the name contains \"test\" or \"example\"","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["code","path","message"],"additionalProperties":true,"description":"One zod validation issue"}},"status_code":{"type":"integer"}},"required":["error","errors","status_code"],"additionalProperties":true,"description":"Error body"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method other than POST","content":{"text/plain":{"schema":{"type":"string"}}}},"409":{"description":"You already have a bundle with this name","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"existing_id":{"anyOf":[{"type":"string"},{"type":"integer"}]},"existing_url":{"type":"string","format":"uri"},"status_code":{"type":"integer"}},"required":["error","existing_id","existing_url","status_code"],"additionalProperties":true,"description":"Error body"}}}},"413":{"description":"Body over the 1 MB Next.js limit (e.g. a large image_base64)","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"20 bundles already published today (UTC)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong"},"message":{"type":"string"},"details":{},"how_to_get_key":{"type":"string","description":"On 401: where to create an API key"},"currentUsage":{"type":"integer","description":"Bundles published today (UTC)"},"limit":{"type":"integer","description":"Bundles allowed per UTC day (20)"},"status_code":{"type":"integer"}},"required":["error","currentUsage","limit","status_code"],"additionalProperties":true,"description":"Error body"}}}},"500":{"description":"Database error, including when you already have two or more bundles with this name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}