{"info":{"title":"Prompteus API","version":"v1"},"openapi":"3.1.0","components":{"schemas":{"Neuron":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"name":{"type":"string"},"slug":{"type":"string"},"archived":{"type":"boolean"},"organizationId":{"type":"string"},"deployedRevisionId":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"cacheMode":{"type":"string"},"cacheTTL":{"type":"integer","nullable":true},"semanticCacheThreshold":{"type":"integer","nullable":true},"responseType":{"type":"string"},"outputFormat":{"type":"string"},"outputSchema":{"type":"string","nullable":true},"webhookUrl":{"type":"string","nullable":true},"webhookSecret":{"type":"string","nullable":true},"accessControl":{"type":"object","nullable":true,"properties":{"organizationId":{"type":"string"},"neuronId":{"type":"string"},"isPublic":{"type":"boolean"},"refererEnabled":{"type":"boolean"},"refererDomains":{"type":"array","nullable":true,"items":{"type":"string"}},"authType":{"type":"string","enum":["none","jwt","apiKey"]},"ipRestrictions":{"type":"array","nullable":true,"items":{"type":"string"}},"jwtConfig":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}},"required":["organizationId","neuronId","isPublic","refererEnabled","refererDomains","authType","ipRestrictions","jwtConfig"]},"revisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"revisionHash":{"type":"string","nullable":true},"friendlyName":{"type":"string","nullable":true},"updatedLastByUserId":{"type":"string","nullable":true}},"required":["id","createdAt","updatedAt","revisionHash","friendlyName","updatedLastByUserId"]}}},"required":["id","name","slug","archived","organizationId","deployedRevisionId","createdAt","updatedAt","cacheMode","cacheTTL","semanticCacheThreshold","responseType","outputFormat","outputSchema","webhookUrl","webhookSecret","accessControl","revisions"]},"Neuron Access Control Settings":{"type":"object","properties":{"isPublic":{"type":"boolean","default":false},"refererEnabled":{"type":"boolean","default":false},"refererDomains":{"type":"array","nullable":true,"items":{"type":"string"}},"authType":{"type":"string","enum":["none","apiKey","jwt"],"default":"none"},"ipRestrictions":{"type":"array","nullable":true,"items":{"type":"string"}},"jwtConfig":{"type":"object","nullable":true,"properties":{"type":{"type":"string","enum":["secret","jwks"]},"secret":{"type":"string"},"issuers":{"type":"array","items":{"type":"string"}},"audience":{"type":"array","items":{"type":"string"}},"usernamePath":{"type":"string"}},"required":["type"]}}},"NeuronRevision":{"type":"object","properties":{"friendlyName":{"type":"string"}},"required":["friendlyName"]},"OpenApiParameter":{"type":"object","properties":{"name":{"type":"string"},"in":{"type":"string","enum":["query","header","path","cookie"]},"description":{"type":"string"},"required":{"type":"boolean"},"schema":{"nullable":true}},"required":["name","in"]},"OpenApiOperation":{"type":"object","properties":{"summary":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/OpenApiParameter"}}}},"OpenApiSecurityScheme":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["apiKey"]},"description":{"type":"string"},"name":{"type":"string"},"in":{"type":"string","enum":["query","header","cookie"]}},"required":["type","name","in"]},{"type":"object","properties":{"type":{"type":"string","enum":["http"]},"description":{"type":"string"},"scheme":{"type":"string"},"bearerFormat":{"type":"string"}},"required":["type","scheme"]},{"type":"object","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]}]},"Tool":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"name":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"},"baseUrl":{"type":"string"},"path":{"type":"string"},"method":{"type":"string"},"authValue":{"type":"string","nullable":true},"oasOperation":{"$ref":"#/components/schemas/OpenApiOperation"},"security":{"$ref":"#/components/schemas/OpenApiSecurityScheme"}},"required":["id","name","slug","organizationId","baseUrl","path","method","authValue","oasOperation"]},"ToolSecurityScheme":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["apiKey"]},"description":{"type":"string"},"name":{"type":"string"},"in":{"type":"string","enum":["query","header","cookie"]}},"required":["type","name","in"]},{"type":"object","properties":{"type":{"type":"string","enum":["http"]},"description":{"type":"string"},"scheme":{"type":"string"},"bearerFormat":{"type":"string"}},"required":["type","scheme"]},{"type":"object","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]}]},"McpConnectionConfig":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"authScheme":{"$ref":"#/components/schemas/ToolSecurityScheme"},"authValue":{"type":"string"}},"required":["url"]},"McpServerConfig":{"allOf":[{"$ref":"#/components/schemas/McpConnectionConfig"},{"type":"object","properties":{"name":{"type":"string"},"friendlyName":{"type":"string"},"version":{"type":"string"},"description":{"type":"string"},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"required":["name"]}},"resources":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"required":["name"]}}},"required":["name","version","tools","resources"]}]},"MCP Server Config":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"name":{"type":"string"},"friendlyName":{"type":"string"},"description":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"organizationId":{"type":"string"},"config":{"$ref":"#/components/schemas/McpServerConfig"}},"required":["id","name","friendlyName","description","updatedAt","organizationId","config"]},"Organization API Key":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"name":{"type":"string"},"organizationId":{"type":"string"},"key":{"type":"string"},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"masterKey":{"type":"boolean"},"isEnabled":{"type":"boolean"},"subPath":{"type":"string","nullable":true}},"required":["id","name","organizationId","key","createdAt","updatedAt","masterKey","isEnabled","subPath"]},"Neuron Run Output":{"type":"object","properties":{"output":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}}]},"fromCache":{"type":"boolean"},"executionStopped":{"type":"boolean"}},"required":["output"]},"Neuron Run Input":{"type":"object","properties":{"input":{"type":"string"},"system":{"type":"string","default":""}},"required":["input"]}},"parameters":{}},"paths":{"/admin/neurons":{"get":{"tags":["Neurons Admin"],"parameters":[{"schema":{"type":"string"},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"Retrieve all neurons (for the organization)","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"name":{"type":"string"},"slug":{"type":"string"},"archived":{"type":"boolean"},"organizationId":{"type":"string"},"deployedRevisionId":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"cacheMode":{"type":"string"},"cacheTTL":{"type":"integer","nullable":true},"semanticCacheThreshold":{"type":"integer","nullable":true},"responseType":{"type":"string"},"outputFormat":{"type":"string"},"outputSchema":{"type":"string","nullable":true},"webhookUrl":{"type":"string","nullable":true},"webhookSecret":{"type":"string","nullable":true}},"required":["id","name","slug","archived","organizationId","deployedRevisionId","createdAt","updatedAt","cacheMode","cacheTTL","semanticCacheThreshold","responseType","outputFormat","outputSchema","webhookUrl","webhookSecret"]}}}}}}},"post":{"tags":["Neurons Admin"],"responses":{"201":{"description":"Create a new (empty) neuron","content":{"application/json":{"schema":{"type":"object","properties":{"neuron":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"name":{"type":"string"},"slug":{"type":"string"},"archived":{"type":"boolean"},"organizationId":{"type":"string"},"deployedRevisionId":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"cacheMode":{"type":"string"},"cacheTTL":{"type":"integer","nullable":true},"semanticCacheThreshold":{"type":"integer","nullable":true},"responseType":{"type":"string"},"outputFormat":{"type":"string"},"outputSchema":{"type":"string","nullable":true},"webhookUrl":{"type":"string","nullable":true},"webhookSecret":{"type":"string","nullable":true}},"required":["id","name","slug","archived","organizationId","deployedRevisionId","createdAt","updatedAt","cacheMode","cacheTTL","semanticCacheThreshold","responseType","outputFormat","outputSchema","webhookUrl","webhookSecret"]},"revision":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"neuronId":{"type":"string"},"revisionHash":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"updatedLastByUserId":{"type":"string","nullable":true},"reactFlowJson":{"type":"string","nullable":true},"friendlyName":{"type":"string","nullable":true},"archived":{"type":"boolean"}},"required":["id","neuronId","revisionHash","createdAt","updatedAt","updatedLastByUserId","reactFlowJson","friendlyName","archived"]}},"required":["neuron","revision"]}}}}}}},"/admin/neurons/:neuronSlug":{"get":{"tags":["Neurons Admin"],"parameters":[{"schema":{"type":"string","example":"my-neuron"},"required":true,"name":"neuronSlug","in":"path"}],"responses":{"200":{"description":"Retrieve a neuron by slug","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Neuron"}}}}}},"put":{"tags":["Neurons Admin"],"parameters":[{"schema":{"type":"string","example":"my-neuron"},"required":true,"name":"neuronSlug","in":"path"}],"requestBody":{"description":"Updated neuron JSON","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":50},"slug":{"type":"string","minLength":2,"maxLength":50,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"cacheMode":{"type":"string","enum":["none","exact","semantic"]},"semanticCacheThreshold":{"type":"integer","minimum":0,"maximum":100}}}}}},"responses":{"200":{"description":"Update a neuron's name or slug","content":{"application/json":{"schema":{"type":"object","properties":{"neuron":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"name":{"type":"string"},"slug":{"type":"string"},"archived":{"type":"boolean"},"organizationId":{"type":"string"},"deployedRevisionId":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"cacheMode":{"type":"string"},"cacheTTL":{"type":"integer","nullable":true},"semanticCacheThreshold":{"type":"integer","nullable":true},"responseType":{"type":"string"},"outputFormat":{"type":"string"},"outputSchema":{"type":"string","nullable":true},"webhookUrl":{"type":"string","nullable":true},"webhookSecret":{"type":"string","nullable":true}},"required":["id","name","slug","archived","organizationId","deployedRevisionId","createdAt","updatedAt","cacheMode","cacheTTL","semanticCacheThreshold","responseType","outputFormat","outputSchema","webhookUrl","webhookSecret"]},"revision":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"neuronId":{"type":"string"},"revisionHash":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"updatedLastByUserId":{"type":"string","nullable":true},"reactFlowJson":{"type":"string","nullable":true},"friendlyName":{"type":"string","nullable":true},"archived":{"type":"boolean"}},"required":["id","neuronId","revisionHash","createdAt","updatedAt","updatedLastByUserId","reactFlowJson","friendlyName","archived"]}},"required":["neuron","revision"]}}}}}},"delete":{"tags":["Neurons Admin"],"parameters":[{"schema":{"type":"string","example":"my-neuron"},"required":true,"name":"neuronSlug","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["deleted","archived"]}},"required":["status"]}}}}}}},"/admin/neurons/:neuronId/access-control":{"put":{"tags":["Neurons Admin"],"parameters":[{"schema":{"type":"string","format":"cuid2","example":"abcd1234"},"required":true,"name":"neuronId","in":"path"}],"requestBody":{"description":"Access control settings for a neuron","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Neuron Access Control Settings"}}}},"responses":{"200":{"description":"Updated access control settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Neuron Access Control Settings"}}}}}}},"/admin/neurons/:neuronSlug/undeploy":{"put":{"tags":["Neurons Admin"],"summary":"Un-deploy a neuron","parameters":[{"schema":{"type":"string","example":"my-neuron"},"required":true,"name":"neuronSlug","in":"path"}],"responses":{"200":{"description":"Un-deployed neuron","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"name":{"type":"string"},"slug":{"type":"string"},"archived":{"type":"boolean"},"organizationId":{"type":"string"},"deployedRevisionId":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"cacheMode":{"type":"string"},"cacheTTL":{"type":"integer","nullable":true},"semanticCacheThreshold":{"type":"integer","nullable":true},"responseType":{"type":"string"},"outputFormat":{"type":"string"},"outputSchema":{"type":"string","nullable":true},"webhookUrl":{"type":"string","nullable":true},"webhookSecret":{"type":"string","nullable":true}},"required":["id","name","slug","archived","organizationId","deployedRevisionId","createdAt","updatedAt","cacheMode","cacheTTL","semanticCacheThreshold","responseType","outputFormat","outputSchema","webhookUrl","webhookSecret"]}}}}}}},"/admin/neurons/:neuronSlug/archive":{"put":{"tags":["Neurons Admin"],"parameters":[{"schema":{"type":"string","example":"my-neuron"},"required":true,"name":"neuronSlug","in":"path"}],"responses":{"200":{"description":"Archived Neuron","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"name":{"type":"string"},"slug":{"type":"string"},"archived":{"type":"boolean"},"organizationId":{"type":"string"},"deployedRevisionId":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"cacheMode":{"type":"string"},"cacheTTL":{"type":"integer","nullable":true},"semanticCacheThreshold":{"type":"integer","nullable":true},"responseType":{"type":"string"},"outputFormat":{"type":"string"},"outputSchema":{"type":"string","nullable":true},"webhookUrl":{"type":"string","nullable":true},"webhookSecret":{"type":"string","nullable":true}},"required":["id","name","slug","archived","organizationId","deployedRevisionId","createdAt","updatedAt","cacheMode","cacheTTL","semanticCacheThreshold","responseType","outputFormat","outputSchema","webhookUrl","webhookSecret"]}}}}}}},"/admin/neurons/:neuronSlug/rate-limits":{"get":{"tags":["Neurons Admin"],"parameters":[{"schema":{"type":"string","example":"my-neuron"},"required":true,"name":"neuronSlug","in":"path"}],"responses":{"200":{"description":"Rate Limits for Neuron","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"neuronId":{"type":"string"},"type":{"type":"string","enum":["requests","requests-per-ip","requests-per-user","tokens","tokens-per-ip","tokens-per-user"]},"limit":{"type":"integer","minimum":0,"exclusiveMinimum":true},"period":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["id","neuronId","type","limit","period"]}}}}}}},"post":{"tags":["Neurons Admin"],"parameters":[{"schema":{"type":"string","example":"my-neuron"},"required":true,"name":"neuronSlug","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"neuronId":{"type":"string"},"type":{"type":"string","enum":["requests","requests-per-ip","requests-per-user","tokens","tokens-per-ip","tokens-per-user"]},"limit":{"type":"integer","minimum":0,"exclusiveMinimum":true},"period":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["neuronId","type","limit","period"]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]}}}}}}},"/admin/neurons/{neuronSlug}/revisions":{"post":{"tags":["Neurons Admin"],"parameters":[{"schema":{"type":"string","example":"my-neuron"},"required":true,"name":"neuronSlug","in":"path"}],"responses":{"200":{"description":"Create a new (empty) Neuron Revision","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"neuronId":{"type":"string"},"revisionHash":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"updatedLastByUserId":{"type":"string","nullable":true},"reactFlowJson":{"type":"string","nullable":true},"friendlyName":{"type":"string","nullable":true},"archived":{"type":"boolean"}},"required":["id","neuronId","revisionHash","createdAt","updatedAt","updatedLastByUserId","reactFlowJson","friendlyName","archived"]}}}}}}},"/admin/neurons/{neuronSlug}/revisions/:revisionId":{"post":{"tags":["Neurons Admin"],"parameters":[{"schema":{"type":"string","example":"my-neuron"},"required":true,"name":"neuronSlug","in":"path"},{"schema":{"type":"string","example":"1234"},"required":true,"name":"revisionId","in":"path"}],"responses":{"200":{"description":"Clone a new Neuron Revision from an existing Revision","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"neuronId":{"type":"string"},"revisionHash":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"updatedLastByUserId":{"type":"string","nullable":true},"reactFlowJson":{"type":"string","nullable":true},"friendlyName":{"type":"string","nullable":true},"archived":{"type":"boolean"}},"required":["id","neuronId","revisionHash","createdAt","updatedAt","updatedLastByUserId","reactFlowJson","friendlyName","archived"]}}}}}},"delete":{"tags":["Neurons Admin"],"parameters":[{"schema":{"type":"string","example":"my-neuron"},"required":true,"name":"neuronSlug","in":"path"},{"schema":{"type":"string","example":"1234"},"required":true,"name":"revisionId","in":"path"}],"responses":{"200":{"description":"Delete a Neuron Revision for a Neuron","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"string"}},"required":["success"]}}}}}}},"/admin/neurons/{neuronSlug}/revisions/:revisionId/workflow":{"put":{"tags":["Neurons Admin"],"parameters":[{"schema":{"type":"string","example":"my-neuron"},"required":true,"name":"neuronSlug","in":"path"},{"schema":{"type":"string","example":"1234"},"required":true,"name":"revisionId","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["input","setSystemPrompt","replaceWordsInPrompt","ifPromptContains","abSplit","callAIAPI","callNeuron","ifResponseContains","replaceWordsInResponse","stopExecution","serveResponse","useOutput"]},"data":{"type":"object","properties":{"$payload":{"type":"object","additionalProperties":{"nullable":true},"default":{}}},"default":{"$payload":{}}},"position":{"nullable":true},"draggable":{"nullable":true},"dragging":{"nullable":true},"measured":{"nullable":true},"selected":{"nullable":true}},"required":["id","type"]}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string"},"sourceHandle":{"type":"string"},"target":{"type":"string"},"targetHandle":{"type":"string"}},"required":["id","source","sourceHandle","target","targetHandle"]}},"animated":{"nullable":true},"type":{"nullable":true}},"required":["nodes","edges"]}}}},"responses":{"200":{"description":"Update a Neuron Revision's workflow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"neuronId":{"type":"string"},"revisionHash":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"updatedLastByUserId":{"type":"string","nullable":true},"reactFlowJson":{"type":"string","nullable":true},"friendlyName":{"type":"string","nullable":true},"archived":{"type":"boolean"}},"required":["id","neuronId","revisionHash","createdAt","updatedAt","updatedLastByUserId","reactFlowJson","friendlyName","archived"]}}}}}}},"/admin/neurons/{neuronSlug}/revisions/:revisionId/deploy":{"put":{"tags":["Neurons Admin"],"parameters":[{"schema":{"type":"string","example":"my-neuron"},"required":true,"name":"neuronSlug","in":"path"},{"schema":{"type":"string","example":"1234"},"required":true,"name":"revisionId","in":"path"}],"responses":{"200":{"description":"Deploy a Neuron Revision for a Neuron","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"neuronId":{"type":"string"},"revisionHash":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"updatedLastByUserId":{"type":"string","nullable":true},"reactFlowJson":{"type":"string","nullable":true},"friendlyName":{"type":"string","nullable":true},"archived":{"type":"boolean"}},"required":["id","neuronId","revisionHash","createdAt","updatedAt","updatedLastByUserId","reactFlowJson","friendlyName","archived"]}}}}}}},"/admin/neurons/{neuronSlug}/revisions/:revisionId/archive":{"put":{"tags":["Neurons Admin"],"parameters":[{"schema":{"type":"string","example":"my-neuron"},"required":true,"name":"neuronSlug","in":"path"},{"schema":{"type":"string","example":"1234"},"required":true,"name":"revisionId","in":"path"}],"responses":{"200":{"description":"Archive a Neuron Revision","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"neuronId":{"type":"string"},"revisionHash":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"updatedLastByUserId":{"type":"string","nullable":true},"reactFlowJson":{"type":"string","nullable":true},"friendlyName":{"type":"string","nullable":true},"archived":{"type":"boolean"}},"required":["id","neuronId","revisionHash","createdAt","updatedAt","updatedLastByUserId","reactFlowJson","friendlyName","archived"]}}}}}}},"/admin/neurons/{neuronSlug}/revisions/:revisionId/friendlyName":{"put":{"tags":["Neurons Admin"],"parameters":[{"schema":{"type":"string","example":"my-neuron"},"required":true,"name":"neuronSlug","in":"path"},{"schema":{"type":"string","example":"1234"},"required":true,"name":"revisionId","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeuronRevision"}}}},"responses":{"200":{"description":"Provide or update a friendly name for a Neuron Revision","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"neuronId":{"type":"string"},"revisionHash":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"updatedLastByUserId":{"type":"string","nullable":true},"reactFlowJson":{"type":"string","nullable":true},"friendlyName":{"type":"string","nullable":true},"archived":{"type":"boolean"}},"required":["id","neuronId","revisionHash","createdAt","updatedAt","updatedLastByUserId","reactFlowJson","friendlyName","archived"]}}}}}}},"/admin/neurons/{neuronSlug}/revisions/:revisionId/testingUrl":{"get":{"tags":["Neurons Admin"],"summary":"Get a Testing URL for a Neuron Revision","parameters":[{"schema":{"type":"string","example":"my-neuron"},"required":true,"name":"neuronSlug","in":"path"},{"schema":{"type":"string","example":"1234"},"required":true,"name":"revisionId","in":"path"}],"responses":{"200":{"description":"Testing URL for the Neuron Revision","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}}}}},"/admin/neuron-executions/by-neuron/:neuronSlug":{"get":{"tags":["Neuron Executions"],"responses":{"200":{"description":"Retrieve executions for a given neuron","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"neuronId":{"type":"string"},"neuronRevisionId":{"type":"string"},"startedAt":{"type":"string","nullable":true},"endedAt":{"type":"string","nullable":true},"status":{"type":"string"},"originatingIp":{"type":"string","nullable":true},"originatingUser":{"type":"string","nullable":true},"embeddingId":{"type":"string","nullable":true},"originatingExecutionId":{"type":"string","nullable":true}},"required":["id","neuronId","neuronRevisionId","startedAt","endedAt","status","originatingIp","originatingUser","embeddingId","originatingExecutionId"]}}}}}}}},"/admin/tools":{"get":{"tags":["OpenAPI Tools Admin (Deprecated)"],"responses":{"200":{"description":"Retrieve all tools (for the organization)","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Tool"}}}}}}},"post":{"tags":["OpenAPI Tools Admin (Deprecated)"],"description":"Create a tool from custom definition","requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"name":{"type":"string"},"slug":{"type":"string"},"baseUrl":{"type":"string"},"path":{"type":"string"},"method":{"type":"string"},"authValue":{"type":"string","nullable":true},"oasOperation":{"$ref":"#/components/schemas/OpenApiOperation"},"security":{"$ref":"#/components/schemas/OpenApiSecurityScheme"}},"required":["name","slug","baseUrl","path","method","authValue","oasOperation"]}}}},"responses":{"200":{"description":"Created tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}}}}},"/admin/tools/by-id/:toolId":{"get":{"tags":["OpenAPI Tools Admin (Deprecated)"],"description":"Get a tool by its ID","responses":{"200":{"description":"Retrieved tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}}}}},"/admin/tools/import-options":{"post":{"tags":["OpenAPI Tools Admin (Deprecated)"],"requestBody":{"description":"Get Importable Tool Definitions from a URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}},"responses":{"200":{"description":"Available tool definitions that could be imported from input","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"security":{"$ref":"#/components/schemas/ToolSecurityScheme"},"authValue":{"type":"string"},"path":{"type":"string"},"operation":{"$ref":"#/components/schemas/OpenApiOperation"},"method":{"type":"string","enum":["get"]}},"required":["path","operation","method"]}}}}}}}},"/admin/tools/import":{"post":{"tags":["OpenAPI Tools Admin (Deprecated)"],"requestBody":{"description":"Object with the base URL to use and the operation definitions to import","content":{"application/json":{"schema":{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"security":{"$ref":"#/components/schemas/ToolSecurityScheme"},"authValue":{"type":"string"},"definitions":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"operation":{"$ref":"#/components/schemas/OpenApiOperation"},"method":{"type":"string","enum":["get"]}},"required":["path","operation","method"]}}},"required":["baseUrl","definitions"]}}}},"responses":{"200":{"description":"Imported tools","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Tool"}}}}}}}},"/admin/mcp-servers":{"get":{"tags":["MCP Servers Admin"],"responses":{"200":{"description":"Retrieve all MCP Servers (for the organization)","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MCP Server Config"}}}}}}},"post":{"tags":["MCP Servers Admin"],"description":"Create an MCP Server config","requestBody":{"description":"MCP Server config with selected tools/resources","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerConfig"}}}},"responses":{"200":{"description":"Imported MCP Server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerConfig"}}}}}}},"/admin/mcp-servers/import":{"post":{"tags":["MCP Servers Admin"],"requestBody":{"description":"Config to fetch info from MCP Server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpConnectionConfig"}}}},"responses":{"200":{"description":"Importable MCP Server Config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerConfig"}}}}}}},"/admin/mcp-servers/:id":{"get":{"tags":["MCP Servers Admin"],"description":"Get a MCP Server by its ID","parameters":[{"schema":{"type":"string","format":"cuid2"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Retrieved MCP Server Config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCP Server Config"}}}}}},"put":{"tags":["MCP Servers Admin"],"parameters":[{"schema":{"type":"string","format":"cuid2"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"MCP Server config to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerConfig"}}}},"responses":{"200":{"description":"Updated MCP Server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCP Server Config"}}}}}},"delete":{"tags":["MCP Servers Admin"],"parameters":[{"schema":{"type":"string","format":"cuid2"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"string"}},"required":["success"]}}}}}}},"/admin/mcp-servers/:id/dependents":{"get":{"tags":["MCP Servers Admin"],"parameters":[{"schema":{"type":"string","format":"cuid2"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"]}}}}}}}},"/admin/vendors":{"post":{"tags":["AI Providers Admin"],"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"friendlyName":{"type":"string","minLength":1},"vendorName":{"type":"string","enum":["openai","anthropic","google","cohere","mistral","cloudflare"]},"apiKey":{"type":"string","minLength":1},"endpoint":{"type":"string"}},"required":["friendlyName","vendorName","apiKey"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"friendlyName":{"type":"string","minLength":1},"vendorName":{"type":"string","enum":["openai","anthropic","google","cohere","mistral","cloudflare"]},"apiKey":{"type":"string","minLength":1},"endpoint":{"type":"string"}},"required":["friendlyName","vendorName","apiKey"]}}}}}}},"/admin/vendors/:vendorId":{"put":{"tags":["AI Providers Admin"],"parameters":[{"schema":{"type":"string","example":"1234"},"required":true,"name":"vendorId","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"friendlyName":{"type":"string","minLength":1},"vendorName":{"type":"string","enum":["openai","anthropic","google","cohere","mistral","cloudflare"]},"apiKey":{"type":"string","minLength":1},"endpoint":{"type":"string"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"friendlyName":{"type":"string","minLength":1},"vendorName":{"type":"string","enum":["openai","anthropic","google","cohere","mistral","cloudflare"]},"apiKey":{"type":"string","minLength":1},"endpoint":{"type":"string"}},"required":["friendlyName","vendorName","apiKey"]}}}}}}},"/admin/vendors/:id/dependents":{"get":{"tags":["AI Providers Admin"],"parameters":[{"schema":{"type":"string","format":"cuid2"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"]}}}}}}}},"/admin/logs/by-execution/:neuronExecutionId":{"get":{"tags":["Neuron Execution Logs"],"responses":{"200":{"description":"Retrieve all logs for the given neuron execution","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"neuronExecutionId":{"type":"string"},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"logLevel":{"type":"string"},"nodeType":{"type":"string"},"message":{"type":"string"}},"required":["id","neuronExecutionId","createdAt","updatedAt","logLevel","nodeType","message"]}}}}}}}},"/admin/logs/by-neuron/:neuronSlug":{"get":{"tags":["Neuron Execution Logs"],"responses":{"200":{"description":"Retrieve all logs for the given neuron","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"neuronExecutionId":{"type":"string"},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"logLevel":{"type":"string"},"nodeType":{"type":"string"},"message":{"type":"string"}},"required":["id","neuronExecutionId","createdAt","updatedAt","logLevel","nodeType","message"]}}}}}}}},"/admin/usage":{"get":{"tags":["Organization Usage"],"responses":{"200":{"description":"Retrieve all usage for the organization","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"neuronExecutionUsageByStatus":{"type":"object","properties":{"last24Hours":{"type":"object","properties":{"success":{"type":"number","nullable":true,"default":0},"failure":{"type":"number","nullable":true,"default":0},"total":{"type":"number","nullable":true,"default":0}},"default":{"success":0,"failure":0,"total":0}},"last7Days":{"type":"object","properties":{"success":{"type":"number","nullable":true,"default":0},"failure":{"type":"number","nullable":true,"default":0},"total":{"type":"number","nullable":true,"default":0}},"default":{"success":0,"failure":0,"total":0}},"last30Days":{"type":"object","properties":{"success":{"type":"number","nullable":true,"default":0},"failure":{"type":"number","nullable":true,"default":0},"total":{"type":"number","nullable":true,"default":0}},"default":{"success":0,"failure":0,"total":0}}},"default":{"last24Hours":{"success":0,"failure":0,"total":0},"last7Days":{"success":0,"failure":0,"total":0},"last30Days":{"success":0,"failure":0,"total":0}}},"neuronExecutionUsageByMicrodollars":{"type":"object","properties":{"last24Hours":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","nullable":true},"inputCost":{"type":"number","nullable":true,"default":0},"outputCost":{"type":"number","nullable":true,"default":0}},"required":["createdAt"]},"default":[]},"last7Days":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","nullable":true},"inputCost":{"type":"number","nullable":true,"default":0},"outputCost":{"type":"number","nullable":true,"default":0}},"required":["createdAt"]},"default":[]},"last30Days":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","nullable":true},"inputCost":{"type":"number","nullable":true,"default":0},"outputCost":{"type":"number","nullable":true,"default":0}},"required":["createdAt"]},"default":[]}},"default":{"last24Hours":[],"last7Days":[],"last30Days":[]}},"neuronExecutionUsageByTokens":{"type":"object","properties":{"last24Hours":{"type":"object","properties":{"totalTokens":{"type":"number","nullable":true,"default":0},"inputTokens":{"type":"number","nullable":true,"default":0},"outputTokens":{"type":"number","nullable":true,"default":0},"inputCachedTokens":{"type":"number","nullable":true,"default":0},"outputCachedTokens":{"type":"number","nullable":true,"default":0},"totalCachedTokens":{"type":"number","nullable":true,"default":0}},"default":{"totalTokens":0,"inputTokens":0,"outputTokens":0,"inputCachedTokens":0,"outputCachedTokens":0,"totalCachedTokens":0}},"last7Days":{"type":"object","properties":{"totalTokens":{"type":"number","nullable":true,"default":0},"inputTokens":{"type":"number","nullable":true,"default":0},"outputTokens":{"type":"number","nullable":true,"default":0},"inputCachedTokens":{"type":"number","nullable":true,"default":0},"outputCachedTokens":{"type":"number","nullable":true,"default":0},"totalCachedTokens":{"type":"number","nullable":true,"default":0}},"default":{"totalTokens":0,"inputTokens":0,"outputTokens":0,"inputCachedTokens":0,"outputCachedTokens":0,"totalCachedTokens":0}},"last30Days":{"type":"object","properties":{"totalTokens":{"type":"number","nullable":true,"default":0},"inputTokens":{"type":"number","nullable":true,"default":0},"outputTokens":{"type":"number","nullable":true,"default":0},"inputCachedTokens":{"type":"number","nullable":true,"default":0},"outputCachedTokens":{"type":"number","nullable":true,"default":0},"totalCachedTokens":{"type":"number","nullable":true,"default":0}},"default":{"totalTokens":0,"inputTokens":0,"outputTokens":0,"inputCachedTokens":0,"outputCachedTokens":0,"totalCachedTokens":0}}},"default":{"last24Hours":{"totalTokens":0,"inputTokens":0,"outputTokens":0,"inputCachedTokens":0,"outputCachedTokens":0,"totalCachedTokens":0},"last7Days":{"totalTokens":0,"inputTokens":0,"outputTokens":0,"inputCachedTokens":0,"outputCachedTokens":0,"totalCachedTokens":0},"last30Days":{"totalTokens":0,"inputTokens":0,"outputTokens":0,"inputCachedTokens":0,"outputCachedTokens":0,"totalCachedTokens":0}}},"neuronExecutionUsageByCachingSavings":{"type":"object","properties":{"last24Hours":{"type":"object","properties":{"inputCost":{"type":"number","nullable":true,"default":0},"outputCost":{"type":"number","nullable":true,"default":0},"totalCost":{"type":"number","nullable":true,"default":0}},"default":{"inputCost":0,"outputCost":0,"totalCost":0}},"last7Days":{"type":"object","properties":{"inputCost":{"type":"number","nullable":true,"default":0},"outputCost":{"type":"number","nullable":true,"default":0},"totalCost":{"type":"number","nullable":true,"default":0}},"default":{"inputCost":0,"outputCost":0,"totalCost":0}},"last30Days":{"type":"object","properties":{"inputCost":{"type":"number","nullable":true,"default":0},"outputCost":{"type":"number","nullable":true,"default":0},"totalCost":{"type":"number","nullable":true,"default":0}},"default":{"inputCost":0,"outputCost":0,"totalCost":0}}},"default":{"last24Hours":{"inputCost":0,"outputCost":0,"totalCost":0},"last7Days":{"inputCost":0,"outputCost":0,"totalCost":0},"last30Days":{"inputCost":0,"outputCost":0,"totalCost":0}}}},"default":{"neuronExecutionUsageByStatus":{"last24Hours":{"success":0,"failure":0,"total":0},"last7Days":{"success":0,"failure":0,"total":0},"last30Days":{"success":0,"failure":0,"total":0}},"neuronExecutionUsageByMicrodollars":{"last24Hours":[],"last7Days":[],"last30Days":[]},"neuronExecutionUsageByTokens":{"last24Hours":{"totalTokens":0,"inputTokens":0,"outputTokens":0,"inputCachedTokens":0,"outputCachedTokens":0,"totalCachedTokens":0},"last7Days":{"totalTokens":0,"inputTokens":0,"outputTokens":0,"inputCachedTokens":0,"outputCachedTokens":0,"totalCachedTokens":0},"last30Days":{"totalTokens":0,"inputTokens":0,"outputTokens":0,"inputCachedTokens":0,"outputCachedTokens":0,"totalCachedTokens":0}},"neuronExecutionUsageByCachingSavings":{"last24Hours":{"inputCost":0,"outputCost":0,"totalCost":0},"last7Days":{"inputCost":0,"outputCost":0,"totalCost":0},"last30Days":{"inputCost":0,"outputCost":0,"totalCost":0}}}}}}}}}}},"/admin/keys":{"get":{"summary":"List API Keys","tags":["Organization API Keys"],"responses":{"200":{"description":"Retrieve all API Keys for the organization","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"name":{"type":"string"},"organizationId":{"type":"string"},"key":{"type":"string"},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"masterKey":{"type":"boolean"},"isEnabled":{"type":"boolean"},"subPath":{"type":"string","nullable":true}},"required":["id","name","organizationId","key","createdAt","updatedAt","masterKey","isEnabled","subPath"]}}}}}}},"post":{"summary":"Create API Key","description":"Create API Key","tags":["Organization API Keys"],"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}},"responses":{"200":{"description":"Created API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization API Key"}}}}}}},"/admin/keys/:apiKeyId":{"put":{"summary":"Update API Key","tags":["Organization API Keys"],"parameters":[{"schema":{"type":"string","format":"cuid2","example":"abc123"},"required":true,"name":"apiKeyId","in":"path"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"isEnabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Updated API Key","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"name":{"type":"string"},"organizationId":{"type":"string"},"key":{"type":"string"},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"masterKey":{"type":"boolean"},"isEnabled":{"type":"boolean"},"subPath":{"type":"string","nullable":true}},"required":["id","name","organizationId","key","createdAt","updatedAt","masterKey","isEnabled","subPath"]}}}}}},"delete":{"summary":"Delete API Key","tags":["Organization API Keys"],"parameters":[{"schema":{"type":"string","format":"cuid2","example":"abc123"},"required":true,"name":"apiKeyId","in":"path"}],"responses":{"200":{"description":"Deleted API Key","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"name":{"type":"string"},"organizationId":{"type":"string"},"key":{"type":"string"},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"masterKey":{"type":"boolean"},"isEnabled":{"type":"boolean"},"subPath":{"type":"string","nullable":true}},"required":["id","name","organizationId","key","createdAt","updatedAt","masterKey","isEnabled","subPath"]}}}}}}},"/run/:orgSlug/:neuronSlug":{"post":{"tags":["Neuron Run"],"parameters":[{"schema":{"type":"string","example":"my-neuron"},"required":true,"name":"neuronSlug","in":"path"},{"schema":{"type":"string","example":"my-org"},"required":true,"name":"orgSlug","in":"path"}],"requestBody":{"description":"Neuron Run Input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Neuron Run Input"}}}},"responses":{"200":{"description":"Neuron Run Output","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Neuron Run Output"}}}}}}},"/run/:orgSlug/:neuronSlug/:revisionId":{"post":{"tags":["Neuron Run specific revision"],"parameters":[{"schema":{"type":"string","example":"my-neuron"},"required":true,"name":"neuronSlug","in":"path"},{"schema":{"type":"string","example":"my-org"},"required":true,"name":"orgSlug","in":"path"},{"schema":{"type":"string","example":"abcd1234"},"required":true,"name":"revisionId","in":"path"},{"schema":{"type":"string","example":"abc*******123"},"required":true,"name":"key","in":"query"}],"requestBody":{"description":"Neuron Test Run Input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Neuron Run Input"}}}},"responses":{"200":{"description":"Neuron Test Run Output","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Neuron Run Output"}}}}}}}}}