Run a takes plugin's tool for you (the Gallery's Save as new)
const url = 'http://localhost:8300/v1/studio/plugins/example/tools/example';const options = { method: 'POST', headers: { 'x-api-key': '<x-api-key>', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"input":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8300/v1/studio/plugins/example/tools/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "input": {} }'Every user, on their own takes. The plugin as GET /plugins/{plugin} has it, and a tool of its manifest with no risk flag; else 404. Studio signs a pass for the caller and a new call id, as studio.plugins.pass does, and POSTs <url>/tools/<tool> {input} with the call’s headers (30 s, no redirects). 200: take_ids only those studio vouches for (the caller’s takes with source tool this plugin made under this call id, as a chat line’s), line the plugin’s. The plugin’s 422 is a 422 with its detail; any other failure (no answer, too slow, a non-2xx) is a 502 with a plain detail (its detail, else <title> did not answer).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A plugin’s name (its folder; unknown or malformed = 404)
Request Bodyrequired
Section titled “Request Bodyrequired”A tool’s input, as its manifest’s input schema has it (the plugin checks it: 422)
object
object
Example generated
{ "input": {}}Responses
Section titled “Responses”What it made
object
The new takes studio vouches for (Undo deletes them)
The plugin’s line (Trimmed · Shot 3), else <title> · <tool>
Example generated
{ "take_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "line": "example"}Missing or invalid x-api-key (Kong), or missing/invalid/expired/revoked bearer token
object
Example generated
{ "detail": "example"}Not found
object
Example generated
{ "detail": "example"}Invalid input
object
Example generated
{ "detail": "example"}The plugin failed: {"detail"} in plain words
object
Example generated
{ "detail": "example"}