{"openapi":"3.0.3","info":{"title":"Plugsky API","version":"2.2.0","description":"Plugsky is an OpenAI-compatible AI API with 39 models, streaming, JSON mode, tools, embeddings, RAG, agents, MCP and usage analytics. Authenticate /v1/* with Authorization: Bearer sk-live-... (or x-api-key). Dashboard /api/* endpoints use the signed-in session cookie. Errors use a stable envelope: {\"error\":{\"message\",\"type\",\"code\",\"param\",\"error_code\",\"status\",\"request_id\",\"docs_url\"}}. Rate limits are returned in X-RateLimit-* headers and every response carries X-Request-Id. Docs: https://plugsky.com/docs. Support: support@plugsky.com.","contact":{"name":"Plugsky Support","url":"https://plugsky.com/contact","email":"support@plugsky.com"},"license":{"name":"Commercial terms","url":"https://plugsky.com/legal/terms"}},"servers":[{"url":"https://api.plugsky.com","description":"Dedicated API host"},{"url":"https://plugsky.com","description":"Main host (same /v1 and /api routes)"}],"components":{"securitySchemes":{"apiKeyBearer":{"type":"http","scheme":"bearer","bearerFormat":"sk-live API key","description":"Use Authorization: Bearer sk-live-... (or x-api-key: sk-live-... for /v1/messages) for /v1/* endpoints."},"dashboardSession":{"type":"apiKey","in":"cookie","name":"plugsky_session","description":"Signed-in dashboard session cookie for /api/* endpoints."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type","code","status","request_id","docs_url"],"properties":{"message":{"type":"string","example":"Invalid or expired token."},"type":{"type":"string","example":"authentication_error"},"code":{"type":"string","example":"401"},"param":{"type":"string","nullable":true},"error_code":{"type":"string","example":"invalid_api_key"},"status":{"type":"integer","example":401},"request_id":{"type":"string","example":"f91b8d6960167322"},"docs_url":{"type":"string","example":"https://plugsky.com/docs/errors#invalid_api_key"}}}}},"Model":{"type":"object","required":["id","object","name"],"properties":{"id":{"type":"string","example":"plugsky-plus"},"object":{"type":"string","example":"model"},"created":{"type":"integer"},"owned_by":{"type":"string","example":"plugsky"},"name":{"type":"string","example":"Plugsky Plus"},"description":{"type":"string"},"tier":{"type":"string","example":"paid"},"context_window":{"type":"integer","example":262144},"embedding_dim":{"type":"integer","nullable":true,"example":2048},"features":{"type":"array","items":{"type":"string"}},"reasoning":{"type":"boolean"},"function_calling":{"type":"boolean"},"json_mode":{"type":"boolean"},"streaming":{"type":"boolean"},"vision":{"type":"boolean"},"audio":{"type":"boolean"}},"additionalProperties":true},"ChatMessage":{"type":"object","required":["role"],"properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"type":"string","nullable":true},"name":{"type":"string"},"tool_call_id":{"type":"string"}},"additionalProperties":true},"Usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}},"ChatCompletionRequest":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","example":"plugsky-plus"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"}},"stream":{"type":"boolean"},"temperature":{"type":"number","minimum":0,"maximum":2},"max_tokens":{"type":"integer","minimum":1},"top_p":{"type":"number"},"stop":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"tools":{"type":"array","items":{"type":"object"}},"tool_choice":{"oneOf":[{"type":"string"},{"type":"object"}]},"response_format":{"type":"object"},"memory":{"type":"boolean","description":"Inject relevant workspace memories (free on every plan)."}},"additionalProperties":true},"ChatCompletionResponse":{"type":"object","required":["id","object","choices"],"properties":{"id":{"type":"string","example":"chatcmpl-..."},"object":{"type":"string","example":"chat.completion"},"created":{"type":"integer"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"message":{"$ref":"#/components/schemas/ChatMessage"},"finish_reason":{"type":"string"}}}},"usage":{"$ref":"#/components/schemas/Usage"}}},"EmbeddingRequest":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string","example":"plugsky-embed"},"input":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"input_type":{"type":"string","enum":["passage","query"],"default":"passage","description":"Passage for document indexing; query for search queries."}}},"EmbeddingResponse":{"type":"object","properties":{"object":{"type":"string","example":"list"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string"},"index":{"type":"integer"},"embedding":{"type":"array","items":{"type":"number"}}}}},"model":{"type":"string"},"usage":{"$ref":"#/components/schemas/Usage"}}},"ImageGenerationRequest":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","maxLength":4000},"model":{"type":"string","example":"black-forest-labs/flux-schnell"},"n":{"type":"integer","minimum":1,"maximum":10,"default":1},"size":{"type":"string","example":"1024x1024"},"response_format":{"type":"string","enum":["url","b64_json"],"default":"url"}}},"ImageGenerationResponse":{"type":"object","required":["created","data"],"properties":{"created":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"b64_json":{"type":"string"},"revised_prompt":{"type":"string"}}}}}},"ModerationResponse":{"type":"object","required":["id","model","results"],"properties":{"id":{"type":"string","example":"modr-..."},"model":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"flagged":{"type":"boolean"},"categories":{"type":"object","additionalProperties":{"type":"boolean"}},"category_scores":{"type":"object","additionalProperties":{"type":"number"}}}}}}},"RerankRequest":{"type":"object","required":["query","documents"],"properties":{"model":{"type":"string","example":"plugsky-rerank"},"query":{"type":"string"},"documents":{"type":"array","maxItems":100,"items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"text":{"type":"string"}}}]}},"top_n":{"type":"integer","minimum":1,"maximum":100}}},"RerankResponse":{"type":"object","required":["object","model","data"],"properties":{"object":{"type":"string","example":"list"},"model":{"type":"string","example":"plugsky-rerank"},"data":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"relevance_score":{"type":"number","format":"float"},"document":{"type":"object","properties":{"text":{"type":"string"}}}}}}}},"UsageSummary":{"type":"object","properties":{"object":{"type":"string","example":"usage_summary"},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"filter":{"type":"object","additionalProperties":true},"group_by":{"type":"string","enum":["day","model","endpoint"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"AnthropicMessage":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","additionalProperties":true}}]}}},"MessagesRequest":{"type":"object","required":["model","messages","max_tokens"],"properties":{"model":{"type":"string","example":"plugsky-plus"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/AnthropicMessage"}},"system":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"}}]},"max_tokens":{"type":"integer","minimum":1},"stream":{"type":"boolean"},"temperature":{"type":"number","minimum":0,"maximum":1},"tools":{"type":"array","items":{"type":"object"}}},"additionalProperties":true},"MessagesResponse":{"type":"object","required":["id","type","role","content","model","usage"],"properties":{"id":{"type":"string","example":"msg_..."},"type":{"type":"string","example":"message"},"role":{"type":"string","example":"assistant"},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","example":"text"},"text":{"type":"string"}}}},"model":{"type":"string"},"stop_reason":{"type":"string","nullable":true},"stop_sequence":{"type":"string","nullable":true},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"}}}}}},"responses":{"BadRequest":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"Plan, scope or permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PaymentRequired":{"description":"Billing or plan limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServerError":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/models/{id}":{"get":{"summary":"Retrieve a model","tags":["Models"],"responses":{"200":{"description":"Model details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"}}}}}}},"/v1/completions":{"post":{"summary":"Legacy completions","tags":["Chat"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/images/generations":{"post":{"summary":"Generate images (FLUX)","tags":["Images"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"Generated images","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationRequest"}}}}}},"/v1/images/edits":{"post":{"summary":"Edit images (FLUX Kontext)","tags":["Images"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/audio/transcriptions":{"post":{"summary":"Speech to text (whisper)","tags":["Audio"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/audio/translations":{"post":{"summary":"Audio to English text (whisper-large-v3)","tags":["Audio"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/audio/speech":{"post":{"summary":"Text to speech (ElevenLabs Turbo)","tags":["Audio"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/moderations":{"post":{"summary":"Content moderation","tags":["Moderation"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"Moderation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerationResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/files":{"get":{"summary":"List files","tags":["Files"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"summary":"Upload a file","tags":["Files"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/files/{id}":{"get":{"summary":"Retrieve file metadata","tags":["Files"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"delete":{"summary":"Delete a file","tags":["Files"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/files/{id}/content":{"get":{"summary":"Download file content","tags":["Files"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/batches":{"get":{"summary":"List batches","tags":["Batches"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"summary":"Create a batch","tags":["Batches"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/batches/{id}":{"get":{"summary":"Retrieve a batch","tags":["Batches"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/batches/{id}/cancel":{"post":{"summary":"Cancel a batch","tags":["Batches"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/fine_tuning/jobs":{"get":{"summary":"List fine-tuning jobs","tags":["Fine-tuning"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"summary":"Create a fine-tuning job","tags":["Fine-tuning"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/fine_tuning/jobs/{id}":{"get":{"summary":"Retrieve a fine-tuning job","tags":["Fine-tuning"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/fine_tuning/jobs/{id}/cancel":{"post":{"summary":"Cancel a fine-tuning job","tags":["Fine-tuning"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/fine_tuning/jobs/{id}/events":{"get":{"summary":"List fine-tuning job events","tags":["Fine-tuning"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/assistants":{"get":{"summary":"List assistants","tags":["Assistants"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"summary":"Create an assistant","tags":["Assistants"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/assistants/{id}":{"get":{"summary":"Retrieve an assistant","tags":["Assistants"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"summary":"Update an assistant","tags":["Assistants"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"delete":{"summary":"Delete an assistant","tags":["Assistants"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/responses":{"post":{"summary":"Create a response","tags":["Responses"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/responses/{id}":{"get":{"summary":"Retrieve a response","tags":["Responses"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/responses/{id}/cancel":{"post":{"summary":"Cancel a response","tags":["Responses"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/rerank":{"post":{"summary":"Rerank documents by relevance","tags":["Rerank"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"Reranked documents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankRequest"}}}}}},"/v1/threads":{"get":{"summary":"List threads (newest first, limit/after cursor)","tags":["Threads"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"summary":"Create a thread","tags":["Threads"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/threads/{id}":{"get":{"summary":"Retrieve a thread","tags":["Threads"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"summary":"Update a thread","tags":["Threads"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"delete":{"summary":"Delete a thread","tags":["Threads"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/threads/{id}/messages":{"get":{"summary":"List thread messages","tags":["Threads"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"summary":"Add a message to a thread","tags":["Threads"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/threads/{id}/runs":{"post":{"summary":"Create a run (executes the assistant)","tags":["Threads"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/threads/{id}/runs/{rid}":{"get":{"summary":"Retrieve a run","tags":["Threads"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/vector_stores":{"get":{"summary":"List vector stores","tags":["Vector Stores"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"summary":"Create a vector store","tags":["Vector Stores"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/vector_stores/{id}":{"get":{"summary":"Retrieve a vector store","tags":["Vector Stores"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"delete":{"summary":"Delete a vector store","tags":["Vector Stores"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/vector_stores/{id}/files":{"post":{"summary":"Attach and embed a file","tags":["Vector Stores"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/vector_stores/{id}/search":{"post":{"summary":"Search a vector store","tags":["Vector Stores"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/plugsky/usage":{"get":{"summary":"Usage summary","tags":["Usage"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"Usage summary grouped by day, model or endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummary"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/plugsky/route":{"post":{"summary":"Smart routing (model=auto)","tags":["Chat"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/openapi.json":{"get":{"summary":"OpenAPI specification","tags":["Meta"],"responses":{"200":{"description":"OK"}}}},"/mcp":{"post":{"summary":"MCP JSON-RPC endpoint","tags":["MCP"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/oauth/register":{"post":{"summary":"Dynamic client registration","tags":["OAuth"],"responses":{"200":{"description":"OK"}}}},"/oauth/token":{"post":{"summary":"OAuth token exchange","tags":["OAuth"],"responses":{"200":{"description":"OK"}}}},"/oauth/authorize":{"get":{"summary":"OAuth authorization (browser)","tags":["OAuth"],"responses":{"200":{"description":"OK"}}}},"/health":{"get":{"summary":"Health check \u2014 liveness probe","tags":["Monitoring"],"responses":{"200":{"description":"OK"}}}},"/healthz":{"get":{"summary":"Kubernetes liveness probe","tags":["Monitoring"],"responses":{"200":{"description":"OK"}}}},"/readyz":{"get":{"summary":"Kubernetes readiness probe","tags":["Monitoring"],"responses":{"200":{"description":"OK"}}}},"/v1/models":{"get":{"summary":"List available models","tags":["Models"],"responses":{"200":{"description":"Model list","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Model"}}}}}}}}}},"/v1/messages":{"post":{"summary":"Create an Anthropic-compatible message","tags":["Chat"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"Anthropic-compatible message (JSON or SSE when stream=true)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesRequest"}}}}}},"/v1/chat/completions":{"post":{"summary":"Create an OpenAI-compatible chat completion","tags":["Chat"],"security":[{"apiKeyBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}},"responses":{"200":{"description":"Chat completion (JSON or SSE when stream=true)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"429":{"$ref":"#/components/responses/RateLimited"},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/embeddings":{"post":{"summary":"Create embeddings","tags":["Embeddings"],"security":[{"apiKeyBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingRequest"}}}},"responses":{"200":{"description":"Embedding vectors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/auth/signup":{"post":{"summary":"Create account","tags":["Auth"],"responses":{"200":{"description":"User created"},"409":{"description":"Email already registered"}}}},"/api/auth/login":{"post":{"summary":"Sign in with email + password","tags":["Auth"],"responses":{"200":{"description":"Session created"},"401":{"description":"Invalid credentials"}}}},"/api/auth/logout":{"post":{"summary":"Destroy session","tags":["Auth"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Logged out"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/auth/me":{"get":{"summary":"Get current user profile","tags":["Auth"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"User profile"},"403":{"$ref":"#/components/responses/Forbidden"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/auth/forgot":{"post":{"summary":"Request password reset email","tags":["Auth"],"responses":{"200":{"description":"Email sent if account exists"}}}},"/api/auth/reset":{"post":{"summary":"Reset password with token","tags":["Auth"],"responses":{"200":{"description":"Password updated"}}}},"/api/auth/google":{"get":{"summary":"Initiate Google OAuth flow","tags":["Auth"],"responses":{"302":{"description":"Redirect to Google consent"}}}},"/api/auth/google/callback":{"get":{"summary":"Google OAuth callback","tags":["Auth"],"responses":{"302":{"description":"Redirect to dashboard"}}}},"/api/keys":{"get":{"summary":"List API keys","tags":["API Keys"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Key list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"summary":"Create API key","tags":["API Keys"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"New key created"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/keys/{id}":{"delete":{"summary":"Revoke API key","tags":["API Keys"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Key revoked"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/usage":{"get":{"summary":"Get usage analytics for the signed-in user","tags":["Dashboard"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Usage analytics"},"403":{"$ref":"#/components/responses/Forbidden"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/dashboard/summary":{"get":{"summary":"Get dashboard overview metrics","tags":["Dashboard"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Dashboard summary"},"403":{"$ref":"#/components/responses/Forbidden"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/models/fusion/stats":{"get":{"summary":"Get Fusion usage stats","tags":["Fusion"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Fusion stats"},"403":{"$ref":"#/components/responses/Forbidden"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/settings":{"get":{"summary":"Get workspace settings","tags":["Settings"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Settings"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"patch":{"summary":"Update workspace settings","tags":["Settings"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Updated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/billing/subscription":{"get":{"summary":"Get subscription details","tags":["Billing"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Subscription data"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/billing/invoices":{"get":{"summary":"List invoices","tags":["Billing"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Invoice list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/billing/manage":{"post":{"summary":"Stripe Customer Portal link","tags":["Billing"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Portal URL"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/webhooks/stripe":{"post":{"summary":"Stripe webhook (signature-verified)","tags":["Billing"],"responses":{"200":{"description":"Webhook processed"}}}},"/api/playground/run":{"post":{"summary":"Run agent chat completion","tags":["Playground"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Agent response"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/playground/search":{"post":{"summary":"Web search via agent","tags":["Playground"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Search results"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/playground/tool":{"post":{"summary":"Execute agent tool","tags":["Playground"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Tool result"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/playground/browser":{"post":{"summary":"Browser automation","tags":["Playground"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Browser result"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/playground/conversations":{"get":{"summary":"List conversations","tags":["Playground"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Conversation list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"summary":"Create conversation","tags":["Playground"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Conversation created"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/agents":{"get":{"summary":"List agents","tags":["Agents"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Agent list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"summary":"Create agent","tags":["Agents"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Agent created"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/agents/{id}":{"get":{"summary":"Get agent","tags":["Agents"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Agent data"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"put":{"summary":"Update agent","tags":["Agents"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Agent updated"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"delete":{"summary":"Delete agent","tags":["Agents"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Agent deleted"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/agents/{id}/run":{"post":{"summary":"Run agent","tags":["Agents"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Agent execution result"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/tools":{"get":{"summary":"List tools","tags":["Tools"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Tool list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"summary":"Create tool","tags":["Tools"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Tool created"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/tools/{id}":{"get":{"summary":"Get tool","tags":["Tools"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Tool data"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"put":{"summary":"Update tool","tags":["Tools"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Tool updated"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"delete":{"summary":"Delete tool","tags":["Tools"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Tool deleted"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/rag/collections":{"get":{"summary":"List knowledge collections","tags":["RAG"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Collection list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"summary":"Create collection","tags":["RAG"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Collection created"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/rag/documents":{"get":{"summary":"List documents","tags":["RAG"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Document list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"summary":"Upload document","tags":["RAG"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Document uploaded"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/rag/query":{"post":{"summary":"Query knowledge base","tags":["RAG"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Query results"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/team/members":{"get":{"summary":"List team members","tags":["Team"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Member list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/team/invites":{"get":{"summary":"List invites","tags":["Team"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Invite list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"summary":"Invite member","tags":["Team"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Invite sent"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/tasks":{"get":{"summary":"List tasks","tags":["Tasks"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Task list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"summary":"Create task","tags":["Tasks"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Task created"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/status":{"get":{"summary":"Platform status","tags":["Monitoring"],"responses":{"200":{"description":"Status"}}}},"/api/status/incidents":{"get":{"summary":"Incident history","tags":["Monitoring"],"responses":{"200":{"description":"Incidents"}}}},"/api/marketplace":{"get":{"summary":"List marketplace items","tags":["Marketplace"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"Marketplace list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/nodes/marketplace":{"get":{"summary":"List GPU nodes for rent","tags":["Nodes"],"responses":{"200":{"description":"Node marketplace"}}}},"/api/nodes/me":{"get":{"summary":"My GPU nodes","tags":["Nodes"],"security":[{"dashboardSession":[]}],"responses":{"200":{"description":"My nodes"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/memory/save":{"post":{"summary":"Save a workspace memory (free)","tags":["Memory"],"security":[{"apiKeyBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content"],"properties":{"content":{"type":"string","maxLength":4000},"namespace":{"type":"string","example":"accounts"},"source":{"type":"string","example":"crm"},"ttl_days":{"type":"integer","minimum":1,"maximum":730,"default":365}}}}}},"responses":{"201":{"description":"Saved"},"400":{"$ref":"#/components/responses/BadRequest"},"413":{"description":"Workspace memory cap reached"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/memory/search":{"get":{"summary":"Search workspace memories (free)","tags":["Memory"],"security":[{"apiKeyBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":20,"default":5}},{"name":"namespace","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Ranked results"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/memory/stats":{"get":{"summary":"Workspace memory usage (free)","tags":["Memory"],"security":[{"apiKeyBearer":[]}],"responses":{"200":{"description":"Usage and embedding status"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/memory/export":{"get":{"summary":"Export workspace memories (free)","tags":["Memory"],"security":[{"apiKeyBearer":[]}],"parameters":[{"name":"format","in":"query","schema":{"type":"string","enum":["jsonl","md"],"default":"jsonl"}}],"responses":{"200":{"description":"NDJSON or Markdown file"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/memory/{id}":{"delete":{"summary":"Delete a workspace memory (free)","tags":["Memory"],"security":[{"apiKeyBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Deleted"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/api/public/pricing":{"get":{"summary":"Public pricing table","tags":["Public"],"responses":{"200":{"description":"Plans + features"}}}},"/api/contact":{"post":{"summary":"Submit contact form","tags":["Public"],"responses":{"200":{"description":"Message sent"}}}}},"externalDocs":{"description":"API documentation","url":"https://plugsky.com/docs"},"tags":[{"name":"Chat","description":"Chat completions, streaming, tools and the Anthropic-compatible messages endpoint."},{"name":"Models","description":"Model catalogue, capabilities, context windows and live watchdog status."},{"name":"Embeddings","description":"Text embeddings for RAG and semantic search."},{"name":"Images","description":"Image generation and editing."},{"name":"Audio","description":"Speech to text, translation and text to speech."},{"name":"Files","description":"Upload, list, retrieve and delete files."},{"name":"Batches","description":"Asynchronous batch jobs."},{"name":"Fine-tuning","description":"Fine-tuning jobs and events."},{"name":"Assistants","description":"Assistants, threads and runs."},{"name":"Vector Stores","description":"Vector stores, file attachment and search."},{"name":"Usage","description":"Usage summaries and budget monitoring."},{"name":"MCP","description":"Model Context Protocol JSON-RPC endpoint."},{"name":"OAuth","description":"OAuth 2.1 discovery, dynamic client registration and token exchange."},{"name":"Monitoring","description":"Liveness, readiness and public status endpoints."},{"name":"Memory","description":"Workspace-scoped memory, free on every plan."},{"name":"Public","description":"Public pricing, lifetime offer and contact endpoints."}]}