{"openapi":"3.1.0","info":{"title":"awen API","version":"1.0.0","description":"Create with awen's agent and organise your awen projects from your own code. Each operation is an awen tool, called by its name with `POST /api/v1/<operation>` and a JSON object of its arguments. An API key acts for the member who made it, in one organisation, with the access they chose.\n\n## Quickstart\n\n1. Make a key in Settings → Connected apps → API keys, and keep it on a server.\n2. `POST /api/v1/list_projects` with `Authorization: Bearer awen_sk_…` and `{}` lists your projects.\n3. `POST /api/v1/create_with_awen` with a `project_id`, a `prompt` and an `Idempotency-Key` header starts a turn of awen's agent and answers its `turn_id` at once.\n4. `POST /api/v1/get_turn` with that `turn_id` waits up to `wait_seconds` (30 at most) for a change: call it again while `status` is `working`. Pass `include_downloads: true` once `status` is `completed` to get a 5-minute `download_url` for each file.\n\n## Retries\n\n`create_with_awen` requires an `Idempotency-Key`: the same key with the same arguments answers the first turn and charges nothing again. `import_file` takes one too. `enhance` also spends credits but cannot replay: after a timeout, look for the new file with `list_folder` before you call it again.\n\n## Errors and limits\n\nEvery refusal is RFC 9457 `application/problem+json` with a stable `code`. Each operation costs 1 to 4 units. Each key has 120 units a minute, and all the keys of an organisation together 600. Over a limit, a call answers `429` with `code` `rate_limited`, the limit it went over in `limit`, and how many seconds to wait in the `Retry-After` header and in `retry_after_seconds`."},"servers":[{"url":"https://app.awen.ai/api/v1"}],"security":[{"apiKey":[]}],"tags":[{"name":"Read","description":"Projects, conversations, files, lineage and turns. Needs `awen:read`."},{"name":"Organise","description":"Projects, conversations and the Drive. Needs `awen:write`."},{"name":"Create","description":"awen's agent and direct actions, which spend credits. Needs `awen:create`."}],"paths":{"/whoami":{"post":{"operationId":"whoami","tags":["Read"],"summary":"Who am I","description":"Returns the awen user and the awen organisation this connection works in, what the connection may do, the organisation's plan, and the usage the user sees in awen. usage is null where the organisation hides it from members. plan or usage is null when awen can't read it right now. usage does not say whether a given request fits.\n\nNeeds a key with any access. Costs 2 units of the key's rate limit.","x-awen-scopes":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["id","name","email"],"additionalProperties":false},"organisation":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"scopes":{"type":"array","items":{"type":"string","enum":["awen:read","awen:write","awen:create"]}},"plan":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false},{"type":"null"}]},"usage":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["remaining","organisation_managed","unlimited","blocked"]},"percent_left":{"anyOf":[{"type":"integer","minimum":0,"maximum":100},{"type":"null"}]},"left_usd":{"type":["number","null"]},"text":{"type":"string"}},"required":["kind","percent_left","left_usd","text"],"additionalProperties":false},{"type":"null"}]}},"required":["id","user","organisation","scopes","plan","usage"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/list_projects":{"post":{"operationId":"list_projects","tags":["Read"],"summary":"List projects","description":"Lists the awen projects shared with the user, most recently updated first, 50 at a time. query keeps the projects whose name contains it. Pass a project_id to list_folder, list_files or list_conversations, or its id to fetch. Pass next_cursor back as cursor for the next page.\n\nNeeds a key with awen:read. Costs 1 unit of the key's rate limit.","x-awen-scopes":["awen:read"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"description":"Part of a project name.","type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\x00-\\x1F\\x7F-\\x9F]*$"},"cursor":{"type":"string","minLength":1,"maxLength":512}},"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"project_id":{"type":"string"},"name":{"type":"string"},"can_edit":{"type":"boolean"},"updated_at":{"type":"string"},"url":{"type":"string"}},"required":["id","project_id","name","can_edit","updated_at","url"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["projects","next_cursor"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/list_folder":{"post":{"operationId":"list_folder","tags":["Read"],"summary":"List a folder","description":"Lists the folders and files directly inside a project folder, in name order, 50 at a time. Omit folder_id for the project root. Each item names its Drive entry (entry_id), its content (media_id) and its saved bytes (revision_id); pass its id to fetch to read it. Pass next_cursor back as cursor for the next page.\n\nNeeds a key with awen:read. Costs 1 unit of the key's rate limit.","x-awen-scopes":["awen:read"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The project's project_id, from list_projects or search."},"folder_id":{"description":"A folder's entry_id; omit for the project root.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"cursor":{"type":"string","minLength":1,"maxLength":32768}},"required":["project_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"project_name":{"type":"string"},"folder_id":{"type":["string","null"]},"folder_name":{"type":["string","null"]},"path":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"entry_id":{"type":"string"},"kind":{"type":"string","enum":["folder","image","video","canvas","three_d","whiteboard","file"]},"name":{"type":"string"},"media_id":{"type":["string","null"]},"revision_id":{"type":["string","null"]},"item_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"url":{"type":"string"}},"required":["id","entry_id","kind","name","media_id","revision_id","item_count","url"],"additionalProperties":false}},"total_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"next_cursor":{"type":["string","null"]}},"required":["project_id","project_name","folder_id","folder_name","path","items","total_count","next_cursor"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/list_files":{"post":{"operationId":"list_files","tags":["Read"],"summary":"List library files","description":"Lists the images, videos, 3D models and canvases of the user's awen Library, newest first, 50 at a time: every project shared with them, or one project. Pass a file's id to fetch to read its description, prompt and download link. Pass next_cursor back as cursor for the next page.\n\nNeeds a key with awen:read. Costs 2 units of the key's rate limit.","x-awen-scopes":["awen:read"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"description":"Only this project's files.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"type":{"description":"Only files of this kind.","type":"string","enum":["image","video","three_d","canvas"]},"cursor":{"type":"string","minLength":1,"maxLength":512}},"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entry_id":{"type":"string"},"kind":{"type":"string","enum":["image","video","three_d","canvas"]},"name":{"type":"string"},"media_id":{"type":"string"},"revision_id":{"type":"string"},"project":{"type":"object","properties":{"project_id":{"type":"string"},"name":{"type":"string"}},"required":["project_id","name"],"additionalProperties":false},"created_at":{"type":"string"},"updated_at":{"type":"string"},"has_lineage":{"type":"boolean"},"url":{"type":"string"}},"required":["id","entry_id","kind","name","media_id","revision_id","project","created_at","updated_at","has_lineage","url"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["files","next_cursor"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/list_conversations":{"post":{"operationId":"list_conversations","tags":["Read"],"summary":"List conversations","description":"Lists the user's own awen conversations in a project, or across their projects without project_id, most recently updated first, archived ones included, 50 at a time. Pass a conversation's id to fetch to read it. active_turn_id names the turn running in a conversation, or still making its files, for get_turn: null means nothing runs there. It can lag get_turn by a few seconds, and get_turn decides. A page leaves out conversations in projects the user can no longer open, so it can hold fewer than 50, or none: keep passing next_cursor back as cursor until it is null.\n\nNeeds a key with awen:read. Costs 1 unit of the key's rate limit.","x-awen-scopes":["awen:read"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"description":"The project's project_id, from list_projects or search. Leave it out to find recent work, or what is still running, in any project.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"cursor":{"type":"string","minLength":1,"maxLength":512}},"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"conversation_id":{"type":"string"},"title":{"type":["string","null"]},"project_id":{"type":"string"},"updated_at":{"type":"string"},"archived":{"type":"boolean"},"active_turn_id":{"type":["string","null"]},"url":{"type":"string"},"project_name":{"type":"string"}},"required":["id","conversation_id","title","project_id","updated_at","archived","active_turn_id","url","project_name"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["conversations","next_cursor"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/list_memories":{"post":{"operationId":"list_memories","tags":["Read"],"summary":"List memories","description":"Lists the awen memories the user can use: folders of instructions and files that awen's own assistant follows, 50 at a time, with whether the user turned each on or off. Pass a memory's id to fetch to read its instructions and files. Pass next_cursor back as cursor for the next page.\n\nNeeds a key with awen:read. Costs 1 unit of the key's rate limit.","x-awen-scopes":["awen:read"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"type":"string","minLength":1,"maxLength":512}},"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"memories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"folder_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"project":{"type":"object","properties":{"project_id":{"type":"string"},"name":{"type":"string"}},"required":["project_id","name"],"additionalProperties":false},"enabled":{"type":"boolean"},"url":{"type":"string"}},"required":["id","folder_id","name","description","project","enabled","url"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["memories","next_cursor"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/search":{"post":{"operationId":"search","tags":["Read"],"summary":"Search awen","description":"Searches what the user can see in awen: project names, the Library's images, videos, 3D models and canvases (by name, tags, description and prompt), folder and document names, the user's own conversation titles, and their memories. Returns up to 5 results of each kind; pass a result's id to fetch to read it. Use short keywords; list_projects, list_files and list_folder browse everything.\n\nNeeds a key with awen:read. Costs 2 units of the key's rate limit.","x-awen-scopes":["awen:read"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":2,"maxLength":200,"pattern":"^[^\\x00-\\x1F\\x7F-\\x9F]*$","description":"Keywords to look for."}},"required":["query"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"required":["id","title","url"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/fetch":{"post":{"operationId":"fetch","tags":["Read"],"summary":"Read an awen item","description":"Reads one item by the id that search or a list returned (project:…, folder:…, file:… or conversation:…). A file gives its description, tags, prompt, model and a download link valid 5 minutes; authorized_for_usage false means no member has confirmed its rights in awen yet, not that it is forbidden. With include_preview, an image, video or 3D model also comes as a small picture you can see, when you can't open the link or the user asks what it looks like: metadata.preview says included, pending when a new file's picture is not drawn yet, so ask again in a moment, not_applicable for a text file, whose text is in the answer, or unavailable; a text file (Markdown, text, CSV, HTML) gives its content, 32 KiB at a time. A folder or project gives its listing, a memory its instructions, a conversation its messages, 20 at a time, each answer with the turn_id get_turn reads. Pass metadata.next_offset back as offset to continue a file or a conversation.\n\nNeeds a key with awen:read. Costs 2 units of the key's rate limit.","x-awen-scopes":["awen:read"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":144,"description":"An id from search or a list."},"offset":{"description":"Where to continue a text file (bytes) or a conversation (messages).","type":"integer","minimum":0,"maximum":2147483647}},"required":["id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"text":{"type":"string"},"url":{"type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","title","text","url","metadata"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/get_lineage":{"post":{"operationId":"get_lineage","tags":["Read"],"summary":"Read a file's lineage","description":"Reads how a file was made, whatever its kind (image, video, 3D model, canvas, whiteboard or document), as awen's Lineage panel shows it: the files it came from, the step that used each one, each file's \"Authorized for usage\" declaration and audit severity, and the latest lineage audit. The declaration is false until a member confirms a file's rights in awen, which does not mean it is forbidden. unaudited counts the earlier files no audit has read, not this file, and the audit is null until one runs. Pass a file:… id or a media_id. Files come nearest first, up to 50 a page, with the edges from each file to the files made from it; pass next_cursor back as cursor to continue. fetch opens a file whose id is not null and gives its prompt and model. complete is false when the history is too long to read here: audit counts are then left out, and awen shows it whole.\n\nNeeds a key with awen:read. Costs 4 units of the key's rate limit.","x-awen-scopes":["awen:read"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":144,"description":"A file:… id or a media_id."},"cursor":{"type":"string","minLength":1,"maxLength":512}},"required":["id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"media_id":{"type":"string"},"complete":{"type":"boolean"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"media_id":{"type":"string"},"revision_id":{"type":"string"},"kind":{"type":"string","enum":["image","video","three_d","canvas","whiteboard","file"]},"name":{"type":"string"},"created_at":{"type":"string"},"distance":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"readable":{"type":"boolean"},"authorized_for_usage":{"type":"boolean"},"audit_severity":{"anyOf":[{"type":"string","enum":["LOW","MODERATE","HIGH","CRITICAL"]},{"type":"null"}]},"inherited_audit_severity":{"anyOf":[{"type":"string","enum":["LOW","MODERATE","HIGH","CRITICAL"]},{"type":"null"}]}},"required":["id","media_id","revision_id","kind","name","created_at","distance","readable","authorized_for_usage","audit_severity","inherited_audit_severity"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"parent_media_id":{"type":"string"},"child_media_id":{"type":"string"},"role":{"type":"string","enum":["SOURCE","REFERENCE","STYLE_REFERENCE","ELEMENT","START_FRAME","KEYFRAME","END_FRAME","COMPONENT"]},"position":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"operation":{"type":"string","enum":["GENERATE","EDIT","UPSCALE","REMOVE_BACKGROUND","CLEAN_UP","RESIZE","VECTORIZE","LAYERIZE","REFRAME","COMPOSE","OPEN_IN_EDITOR","PUBLISH","COPY","CAPTURE"]},"step":{"type":"string"}},"required":["parent_media_id","child_media_id","role","position","operation","step"],"additionalProperties":false}},"audit_summary":{"anyOf":[{"type":"object","properties":{"upstream_audits":{"anyOf":[{"type":"object","properties":{"CRITICAL":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"HIGH":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"MODERATE":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"LOW":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unaudited":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["CRITICAL","HIGH","MODERATE","LOW","unaudited"],"additionalProperties":false},{"type":"null"}]},"latest_audit":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","RUNNING","SUCCESS","FAILED"]},"summary":{"type":["string","null"]},"created_at":{"type":"string"},"completed_at":{"type":["string","null"]}},"required":["status","summary","created_at","completed_at"],"additionalProperties":false},{"type":"null"}]}},"required":["upstream_audits","latest_audit"],"additionalProperties":false},{"type":"null"}]},"next_cursor":{"type":["string","null"]}},"required":["id","media_id","complete","nodes","edges","audit_summary","next_cursor"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/download":{"post":{"operationId":"download","tags":["Read"],"summary":"Download files and folders","description":"Gives one link that downloads files and folders of a project the user can open, as Download in awen does: a ZIP of up to 50 files, counting every file inside the folders, which keep their paths (one file alone downloads as itself). Pass each item's entry_id from list_folder. convert_to saves every image that converts as PNG or JPEG and keeps every other file as stored. Files still being made inside a folder are left out and counted in skipped. The link is download_url, valid until expires_at (5 minutes): it opens these files without signing in, so give it only to the user. Call again for a fresh link.\n\nNeeds a key with awen:read. Costs 4 units of the key's rate limit.","x-awen-scopes":["awen:read"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The project's project_id."},"items":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"description":"The entry_id of each file and folder to download, from list_folder."},"convert_to":{"description":"Saves the images as PNG or JPEG; omit for the originals.","type":"string","enum":["png","jpeg"]}},"required":["project_id","items"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"download_url":{"type":"string"},"expires_at":{"type":"string"},"skipped":{"type":"object","propertyNames":{"type":"string","enum":["generating","failed","whiteboard","unrendered","empty","unsupported","nested","inaccessible"]},"additionalProperties":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}},"required":["project_id","download_url","expires_at","skipped"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/create_project":{"post":{"operationId":"create_project","tags":["Organise"],"summary":"Create a project","description":"Creates an awen project at the top of the user's Projects, with its first conversation, as New project does in awen. Use it only when the user asks for a project or has none that fits, never one per request. Without a name it is Untitled and takes its name from the first message. Pass the returned project_id to create_folder, import_file or start_conversation, and the returned conversation_id to create_with_awen for the first turn, so the project keeps no empty conversation.\n\nNeeds a key with awen:write. Costs 2 units of the key's rate limit.","x-awen-scopes":["awen:write"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"The project's name; omit it to let the first message name the project.","type":"string","minLength":1,"maxLength":2083,"pattern":"^[^\\x00]*$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"conversation_id":{"type":"string"},"conversation_url":{"type":"string"}},"required":["project_id","name","url","conversation_id","conversation_url"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/start_conversation":{"post":{"operationId":"start_conversation","tags":["Organise"],"summary":"Start a conversation","description":"Starts an empty awen conversation in a project the user can edit, as New conversation does in awen. It sends no message: pass the returned conversation_id to create_with_awen for its first turn, so no empty conversation is left behind. A person can have at most 100 active conversations in a project: at the limit this is refused until they or you archive one with archive_conversation, after asking the user.\n\nNeeds a key with awen:write. Costs 2 units of the key's rate limit.","x-awen-scopes":["awen:write"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The project's project_id, from list_projects, search or create_project."},"title":{"description":"The conversation's title; omit it to let the first message title it.","type":"string","minLength":3,"maxLength":2083,"pattern":"^[^\\x00]*$"}},"required":["project_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"conversation_id":{"type":"string"},"project_id":{"type":"string"},"title":{"type":["string","null"]},"url":{"type":"string"}},"required":["conversation_id","project_id","title","url"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/archive_conversation":{"post":{"operationId":"archive_conversation","tags":["Organise"],"summary":"Archive a conversation","description":"Archives one of the user's own awen conversations, as Archive does in awen: it leaves their active list, its messages and files stay, and restore_conversation brings it back. A person can have at most 100 active conversations in a project, so archiving one makes room for another. Ask the user before archiving, and name the conversation. A conversation whose reply is still being written is refused until it ends or cancel_turn stops it; generations that already started finish on their own.\n\nNeeds a key with awen:write. Costs 2 units of the key's rate limit.","x-awen-scopes":["awen:write"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversation_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The conversation's conversation_id, from list_conversations, start_conversation or create_with_awen."}},"required":["conversation_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"conversation_id":{"type":"string"},"project_id":{"type":"string"},"archived":{"type":"boolean"},"url":{"type":"string"}},"required":["conversation_id","project_id","archived","url"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/restore_conversation":{"post":{"operationId":"restore_conversation","tags":["Organise"],"summary":"Restore a conversation","description":"Restores one of the user's archived awen conversations to their active list, as Restore does in awen. A person can have at most 100 active conversations in a project: at the limit this is refused until one is archived.\n\nNeeds a key with awen:write. Costs 2 units of the key's rate limit.","x-awen-scopes":["awen:write"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversation_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The conversation's conversation_id, from list_conversations, start_conversation or create_with_awen."}},"required":["conversation_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"conversation_id":{"type":"string"},"project_id":{"type":"string"},"archived":{"type":"boolean"},"url":{"type":"string"}},"required":["conversation_id","project_id","archived","url"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/create_folder":{"post":{"operationId":"create_folder","tags":["Organise"],"summary":"Create a folder","description":"Creates a folder in a project the user can edit. Pass parent_id \"root\" for the project root, or a folder's entry_id from list_folder or create_folder to create it inside that folder.\n\nNeeds a key with awen:write. Costs 2 units of the key's rate limit.","x-awen-scopes":["awen:write"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The project's project_id."},"name":{"type":"string","minLength":1,"maxLength":2083,"pattern":"^[^\\x00]*$","description":"The folder's name."},"parent_id":{"anyOf":[{"type":"string","const":"root"},{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"}],"description":"\"root\", or the entry_id of the folder to create it in."}},"required":["project_id","name","parent_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"entry_id":{"type":"string"},"name":{"type":"string"},"parent_id":{"type":"string"},"url":{"type":"string"}},"required":["id","entry_id","name","parent_id","url"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/move_file":{"post":{"operationId":"move_file","tags":["Organise"],"summary":"Move files and folders","description":"Moves files and folders of a project the user can edit into one folder, in a single call. Pass each item's entry_id from list_folder, never a media_id, and folder_id \"root\" for the project root or a folder's entry_id. A memory never moves inside another memory, and no other file named Memory.md moves into one: a memory reads its instructions only from its own Memory.md.\n\nNeeds a key with awen:write. Costs 2 units of the key's rate limit.","x-awen-scopes":["awen:write"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The project's project_id."},"entry_ids":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"description":"The entry_id of each file and folder to move."},"folder_id":{"anyOf":[{"type":"string","const":"root"},{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"}],"description":"\"root\", or the entry_id of the folder to move them into."}},"required":["project_id","entry_ids","folder_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"entry_ids":{"type":"array","items":{"type":"string"}},"folder_id":{"type":"string"}},"required":["entry_ids","folder_id"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/rename_file":{"post":{"operationId":"rename_file","tags":["Organise"],"summary":"Rename a file or a folder","description":"Renames a file or a folder in a project the user can edit; a file's name applies to its Drive entry and its content. Pass the entry_id from list_folder, never a media_id. Two folders side by side can't share a name, and a memory's folder can't take the name of another of the user's memories. A memory reads its instructions from its Memory.md: that file keeps its name, and no other file in a memory can be named Memory.md; the user edits a memory's instructions in awen.\n\nNeeds a key with awen:write. Costs 2 units of the key's rate limit.","x-awen-scopes":["awen:write"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The project's project_id."},"entry_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The entry_id of the file or folder."},"name":{"type":"string","minLength":1,"maxLength":2083,"pattern":"^[^\\x00]*$","description":"The new name."}},"required":["project_id","entry_id","name"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"entry_id":{"type":"string"},"name":{"type":"string"}},"required":["entry_id","name"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/trash_entries":{"post":{"operationId":"trash_entries","tags":["Organise"],"summary":"Move files and folders to the trash","description":"Moves files and folders of a project the user can edit to the project's Trash, with everything inside the folders, as Delete in awen does. Pass each item's entry_id from list_folder, never a media_id. Nothing is deleted for good: restore_entries brings them back for 30 days with the entry_ids this answers, and only the user empties the Trash, in awen. A file still being made can't be trashed until it is ready. Ask the user before trashing files they did not ask to remove.\n\nNeeds a key with awen:write. Costs 2 units of the key's rate limit.","x-awen-scopes":["awen:write"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The project's project_id."},"entry_ids":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"description":"The entry_id of each file and folder to trash."}},"required":["project_id","entry_ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"entry_ids":{"type":"array","items":{"type":"string"}},"entry_count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["project_id","entry_ids","entry_count"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/restore_entries":{"post":{"operationId":"restore_entries","tags":["Organise"],"summary":"Restore files and folders from the trash","description":"Brings files and folders of a project the user can edit back from its Trash, with everything that was trashed inside the folders, as Restore in awen does. Pass the entry_ids trash_entries returned, within 30 days. Each comes back in its folder, or at the project root when that folder is gone. A folder is refused when another folder of its name now sits in the same place, and a memory when another of the user's memories took its name: rename that one first.\n\nNeeds a key with awen:write. Costs 2 units of the key's rate limit.","x-awen-scopes":["awen:write"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The project's project_id."},"entry_ids":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"description":"The entry_id of each trashed file and folder to restore."}},"required":["project_id","entry_ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"entry_ids":{"type":"array","items":{"type":"string"}},"entry_count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["project_id","entry_ids","entry_count"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/create_upload":{"post":{"operationId":"create_upload","tags":["Organise"],"summary":"Prepare a file upload","description":"Prepares the upload of a file you hold that has no public URL: a file the user attached that your code sandbox can read, or a file on this machine. 1) Measure it: its exact size in bytes and its SHA-256 in hex (wc -c < FILE; shasum -a 256 FILE or sha256sum FILE; on Windows, Get-FileHash -Algorithm SHA256). 2) Call this tool with the name it gets in the Drive, its size and its SHA-256. 3) Within 10 minutes, run the returned command with /path/to/file replaced by the file's path, inside its single quotes, with any ' in the path written as '\\'', and change nothing else (your host may ask the user to approve it once). If your host cannot run it, ask the user to run it: never send the request another way. It fetches awen's upload script and sends the raw bytes to upload_host, and the upload completes only with the exact file you measured. If it stops at a refusal, next_steps says what to do for its code. Without a POSIX shell, send the same requests to upload_url with the authorization. 4) Within 30 minutes, call import_file with the same project_id and folder_id and this upload_id to place the file; an upload not placed by then is deleted. For several files, prepare every file, run every command, then place each upload with import_file: each keeps its own times. The command needs network access to script_host for the script, then to upload_host for the file. If curl cannot reach script_host it prints only its own error: ask the user to allow both hosts. Otherwise, when the command fails, its last line, starting with awen:, says what to do next. Drive takes files up to 512 MB, images up to 95 MB and any video, never programs. Only an MP4 opens as a video in awen: other formats save as plain files.\n\nNeeds a key with awen:write. Costs 2 units of the key's rate limit.","x-awen-scopes":["awen:write"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The project's project_id."},"folder_id":{"description":"\"root\" (the default), or the entry_id of the folder the file goes in.","anyOf":[{"type":"string","const":"root"},{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"}]},"name":{"type":"string","minLength":1,"maxLength":2083,"pattern":"^[^\\x00]*$","description":"The file's name in the Drive, with the extension that sets its type, as in an upload in awen."},"size_bytes":{"type":"integer","minimum":1,"maximum":536870912,"description":"The file's exact size in bytes."},"sha256":{"type":"string","pattern":"^[0-9A-Fa-f]{64}$","description":"The SHA-256 of the whole file, in hex."}},"required":["project_id","name","size_bytes","sha256"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"upload_id":{"type":"string"},"expires_at":{"type":"string"},"place_within_minutes":{"type":"number"},"upload_host":{"type":"string"},"script_host":{"type":"string"},"upload_url":{"type":"string"},"authorization":{"type":"string"},"part_size":{"type":"number"},"part_count":{"type":"number"},"command":{"type":"string"},"next_steps":{"type":"array","items":{"type":"object","properties":{"codes":{"type":"array","items":{"type":"string"}},"instruction":{"type":"string"}},"required":["codes","instruction"],"additionalProperties":false}}},"required":["upload_id","expires_at","place_within_minutes","upload_host","script_host","upload_url","authorization","part_size","part_count","command","next_steps"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/import_file":{"post":{"operationId":"import_file","tags":["Organise"],"summary":"Import a file","description":"Adds a file to a project the user can edit, as an upload in awen does: from a public URL, from a file the user attached in ChatGPT (file), from text with a name, or from a file you sent after create_upload (upload_id). Drive takes files up to 512 MB, images up to 95 MB and any video, never programs. Only an MP4 opens as a video in awen: other formats save as plain files. Pass exactly one of url, file, text or upload_id. A file you made on this machine from awen files, such as a cutout, names them in derived_from. A memory's instructions are its own Memory.md, so no file named Memory.md can be added to a memory; the user edits them in awen.\n\nNeeds a key with awen:write. Costs 4 units of the key's rate limit.","x-awen-scopes":["awen:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Names this request, for you and this organisation. The same key with the same arguments answers the first result and starts or saves nothing again; the same key with other arguments is another request. 1 to 128 letters, digits, `.`, `_`, `:` or `-`.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The project's project_id."},"folder_id":{"description":"\"root\" (the default), or the entry_id of the folder to put the file in.","anyOf":[{"type":"string","const":"root"},{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"}]},"url":{"description":"A public http(s) URL of the file itself, such as an image's own address. A web page is refused: open it and pass the URL of the image or file it shows.","type":"string","maxLength":4096},"text":{"description":"Text to save as a file (UTF-8, up to 1 MiB); its name's extension sets its type.","type":"string","maxLength":1048576},"upload_id":{"description":"The upload_id create_upload returned, once its command has sent the file.","type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"name":{"description":"The file's name. A name already taken in the folder gets a number, and the answer gives the final one. Required with text; otherwise the URL's or the attachment's name. An upload keeps the name given to create_upload.","type":"string","minLength":1,"maxLength":2083,"pattern":"^[^\\x00]*$"},"derived_from":{"description":"Up to 20 awen files this file was made from, such as the image you cut out or retouched on this machine: ids from a list, search or get_turn. awen records them as the file's lineage, as for a file made in awen.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":144}}},"required":["project_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"entry_id":{"type":"string"},"media_id":{"type":"string"},"revision_id":{"type":["string","null"]},"kind":{"type":"string","enum":["folder","image","video","canvas","three_d","whiteboard","file"]},"folder_id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"required":["id","entry_id","media_id","revision_id","kind","folder_id","name","url"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/create_with_awen":{"post":{"operationId":"create_with_awen","tags":["Create"],"summary":"Create with awen","description":"Runs one turn of awen's creative agent in a project conversation, as a message in awen does. It can make and edit images, videos, 3D models and documents, and it can change the project's Drive. awen itself removes or changes backgrounds, resizes, reframes, upscales and edits its files: ask for that in the prompt, or in a follow-up turn with conversation_id, instead of editing awen's files on this machine. It reads the user's memories and skills itself, so name them in the prompt instead of reading them first. It spends the organisation's credits. It answers at once with a turn_id while the turn runs. Unless the host draws a card, call get_turn with that turn_id until status is no longer working: nothing is ready before that.\n\nSpending rules. A direct request from the user is approval to call this. When the idea is yours, describe the plan and ask first. A working status is no reason to start again. Never retry paid work on your own: ask the user first. A turn can end with a question: show it to the user and wait, and never answer it yourself. A retry the user asks for passes the same conversation_id. After a refusal, ask the user before starting a new conversation.\n\nOne job is one conversation, so a batch goes in one call. Without conversation_id, the turn starts a new conversation. A person can have at most 100 active conversations in a project: at the limit this is refused until they or you archive one with archive_conversation, after asking the user. A conversation takes one turn at a time until its generations start: a second call before then is refused and names the turn. Once they start, a second call is accepted and charged on its own while the first stays working, so wait for completed unless the user asks not to.\n\nNeeds a key with awen:create, awen:write. Costs 4 units of the key's rate limit.","x-awen-scopes":["awen:create","awen:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Names this request, for you and this organisation. The same key with the same arguments answers the first result and starts or saves nothing again; the same key with other arguments is refused, and nothing starts. 1 to 128 letters, digits, `.`, `_`, `:` or `-`.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The project's project_id, from list_projects, search or create_project. The user must be able to edit it. Reuse a project the user already works in that fits, or ask. Create one only when the user asks for it or has none that fits."},"prompt":{"type":"string","minLength":1,"maxLength":32000,"pattern":"^[^\\x00]*$","description":"What the user wants, as they would write it to awen. Drop words that only name awen or this tool, and pass a long brief whole, never a summary. Say a video's length here."},"image_count":{"description":"How many images to make, from 1 to 6, each one charged. Without it awen makes the user's saved number, two unless they changed it, so set 1 when the user wants one image. Two new images come from two models. Leave it out for videos, 3D models and documents.","type":"integer","minimum":1,"maximum":6},"image_resolution":{"description":"The images' resolution: 1k is the fastest and cheapest, 2k the default, 4k the most detailed and the most expensive. Set 1k when the user wants something small, quick or cheap. Leave it out for videos, 3D models and documents.","type":"string","enum":["1k","2k","4k"]},"image_aspect_ratio":{"description":"The images' aspect ratio, as width:height. Set it when the user names a format or a shape. Leave it out for videos, 3D models and documents.","type":"string","enum":["1:1","3:4","4:3","3:2","2:3","4:5","5:4","9:16","16:9","21:9"]},"generation_tier":{"description":"How awen picks its image and video models: quality, its usual choice; draft, faster and cheaper; or fastest. Without it, awen uses the user's saved setting. Leave it out unless the user asks for faster or cheaper results, or for the best quality.","type":"string","enum":["quality","draft","fastest"]},"model":{"description":"The model for this turn's images, videos or 3D models, as awen's model menu offers it: id@resolution when the model has resolutions. Leave it out unless the user names a model: without it, awen picks one for each step.","type":"string","enum":["gpt-image-2-5-sunburst@1K","gpt-image-2-5-sunburst@2K","gpt-image-2-5-sunburst@4K","gpt-image-2-5-flare@1K","gpt-image-2-5-flare@2K","gpt-image-2-5-flare@4K","gpt-image-2-6-sunburst@1K","gpt-image-2-6-sunburst@2K","gpt-image-2-6-sunburst@4K","gpt-image-2-6-flare@1K","gpt-image-2-6-flare@2K","gpt-image-2-6-flare@4K","nano-banana-2-1@1K","nano-banana-2-1@2K","nano-banana-2-1@4K","nano-banana@1K","nano-banana@2K","nano-banana@4K","nano-banana-lite","mai-image-2-5@1K","mai-image-2-5@2K","seedream-5@1K","seedream-5@2K","ideogram-4@1K","ideogram-4@2K","ideogram-4@4K","arrow-2","arrow-2-telos","ideogram-vector","magnific-upscaler","topaz-upscaler","seedance-2-5@480p","seedance-2-5@720p","seedance-2-5@1080p","seedance-2@1080p","seedance-2@4K","seedance-2-mini@480p","seedance-2-mini@720p","flux-3-video@720p","flux-3-video@1080p","gemini-omni-flash@720p","gemini-omni-flash@1080p","gemini-omni-flash@4K","kling-v4@720p","kling-v4@1080p","kling-v3@1080p","kling-v3@4K","kling-o3@1080p","kling-o3@4K","grok-imagine-1-5","minimax-h3@480p","minimax-h3@768p","minimax-h3@2K","minimax-h3@4K","minimax-h3-max@480p","minimax-h3-max@768p","minimax-h3-max@1080p","minimax-h3-max-turbo@480p","minimax-h3-max-turbo@768p","minimax-h3-max-turbo@1080p","wan-3@480p","wan-3@720p","wan-3@1080p","wan-3-prime@480p","wan-3-prime@720p","wan-3-prime@1080p","ltx-2-5-fast@720p","ltx-2-5-fast@1080p","ltx-2-5-fast@2K","ltx-2-5-fast@4K","magnific-video-upscaler","topaz-video","minimax-h3-max-reframe","meshy-7-1","tripo-h3-1","hyper3d-rodin"]},"conversation_id":{"description":"Continues this conversation of the user's in the project: use it for every follow-up or retry on the same work. Without it, the turn starts a new one.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"file_ids":{"description":"Up to 20 files to work from: ids from a list, search or get_turn. A folder: id attaches a folder of this project, as a folder dropped in awen's message box does.","maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":144}},"folder_id":{"description":"Where new files go: \"root\" (the default), or the entry_id of a folder of the project.","anyOf":[{"type":"string","const":"root"},{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"}]},"intelligence":{"description":"How hard awen thinks about its reply, not image or video quality: asking for the best result does not ask for this. Leave it out unless the user asks. Without it, the conversation keeps its level.","type":"string","enum":["medium","high","best"]}},"required":["project_id","prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"turn_id":{"type":"string"},"conversation_id":{"type":"string"},"project_id":{"type":"string"},"status":{"type":"string","enum":["working","completed","failed","stopped"]},"url":{"type":"string"},"next":{"type":"string"},"warnings":{"type":"array","items":{"type":"string"}}},"required":["turn_id","conversation_id","project_id","status","url","next"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/enhance":{"post":{"operationId":"enhance","tags":["Create"],"summary":"Enhance an image or a video","description":"Makes an enhanced copy of an image or a video of a project the user can edit, as the Enhance menu of awen's Drive does, without a turn of awen's agent: the same presets at the same price, from the organisation's credits. The source stays as it is; the copy goes in folder_id, or beside the source. It answers at once while the copy is made: see next. Image presets: upscale-precision (Preserve natural detail without inventing content); upscale-generative (Reconstruct plausible missing detail); upscale-creative (Add expressive detail to AI-generated work); restore (Rebuild detail in faded or degraded photos); denoise-light (For subtle grain); denoise-medium (For visible noise); denoise-heavy (For very noisy images); sharpen-auto (Correct ordinary blur); sharpen-severe (Rebuild details that are hard to make out); adjust-auto (Improve lighting and color); adjust-white-balance (Remove unwanted color casts); adjust-colorize (Add color to a black-and-white photo). Video presets: upscale-precision (Preserve natural detail without inventing content); upscale-generative (Reconstruct plausible missing detail); upscale-creative (Adds creative detail; size is automatic, up to 4K); denoise-light (Faster cleanup for lighter noise); denoise-medium (High-quality general cleanup); denoise-heavy (For extremely noisy footage); smooth-60-fps (Smoother motion at original speed); slow-motion-2x (Twice as long with natural motion); slow-motion-4x (Four times longer with natural motion); hdr (Expand luminance and color range; high creative intelligence use); deblur (Reduce blur in fast-moving footage); colorize (Add color to black-and-white footage). For anything else, such as removing a background, ask awen with create_with_awen.\n\nNeeds a key with awen:create, awen:write. Costs 4 units of the key's rate limit.","x-awen-scopes":["awen:create","awen:write"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The project's project_id."},"entry_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The entry_id of the image or video to enhance, from list_folder."},"preset":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9-]+$","description":"One of the presets this tool's description lists for the file's kind."},"upscale_factor":{"description":"How many times larger an upscale preset makes the file, 1.1 to 4; 2 when omitted. A video's upscale-creative picks its own size, and the other presets take none.","type":"number","minimum":1.1,"maximum":4},"folder_id":{"description":"\"root\", or the entry_id of the folder the new file goes in; omit for the source's folder.","anyOf":[{"type":"string","const":"root"},{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"}]}},"required":["project_id","entry_id","preset"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"task_id":{"type":"string"},"entry_id":{"type":"string"},"project_id":{"type":"string"},"folder_id":{"type":"string"},"status":{"type":"string","const":"working"},"next":{"type":"string"}},"required":["task_id","entry_id","project_id","folder_id","status","next"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/get_turn":{"post":{"operationId":"get_turn","tags":["Read"],"summary":"Follow a turn","description":"Reads a turn create_with_awen started: its status, its reply's text, its tasks and the files it saved. status is working, completed, failed or stopped. The reply ends when generations start, and the turn stays working until their tasks end. completed means every file it will make is saved; a task that failed says why in failure, so tell the user and never retry on your own. text is written as generations start and never changes: it can still say an image is generating, and it is null when the reply has no words, so read status and files to know what is ready, and fetch a file for the prompt awen used. tasks and files list at most 50 tasks: more_tasks is true when the turn made more, and list_files shows them all. The call waits up to wait_seconds (0 to 30, default 15) and answers as soon as something changes, so call it again at once while status is working, with no other pause. A turn can end with a question, with or without files: show it to the user and wait, and never answer it yourself. cost_usd is what the turn's model calls and generations were charged. It is null until nothing of the turn still runs, and where usage is hidden from members; titles, summaries and file descriptions are charged apart. Pass the last cursor back, so a change between two calls is not missed. files name each file by id with its mime_type, size_bytes, width, height and duration_seconds, each null when unknown. With include_downloads, each file also has a download_url valid 5 minutes, or null when it cannot be downloaded; without it, pass an id to fetch for one. To follow several turns at once, call get_turns.\n\nNeeds a key with awen:read. Costs 1 to 4 units of the key's rate limit, by its arguments.","x-awen-scopes":["awen:read"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"turn_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The turn_id create_with_awen returned, a conversation's active_turn_id, or an answer's turn_id from fetch on a conversation."},"cursor":{"description":"The cursor of the last answer. Without it, the wait starts from the turn as it is now.","type":"string","minLength":1,"maxLength":512},"wait_seconds":{"description":"How long to wait for a change. 0 answers at once.","type":"integer","minimum":0,"maximum":30},"include_downloads":{"description":"Adds a download_url, valid 5 minutes, to each file. Ask for it once the files you need are listed.","type":"boolean"}},"required":["turn_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"turn_id":{"type":"string"},"conversation_id":{"type":"string"},"project_id":{"type":"string"},"status":{"type":"string","enum":["working","completed","failed","stopped"]},"cursor":{"type":"string"},"text":{"type":["string","null"]},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tool":{"type":["string","null"]},"status":{"type":"string","enum":["running","completed","failed"]},"failure":{"type":["string","null"]}},"required":["id","tool","status","failure"],"additionalProperties":false}},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entry_id":{"type":["string","null"]},"media_id":{"type":"string"},"revision_id":{"type":"string"},"kind":{"type":"string","enum":["folder","image","video","canvas","three_d","whiteboard","file"]},"name":{"type":"string"},"url":{"type":"string"},"mime_type":{"type":["string","null"]},"size_bytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"width":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"height":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"duration_seconds":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"download_url":{"type":["string","null"]}},"required":["id","entry_id","media_id","revision_id","kind","name","url","mime_type","size_bytes","width","height","duration_seconds"],"additionalProperties":false}},"more_tasks":{"type":"boolean"},"failure":{"type":["string","null"]},"cost_usd":{"type":["number","null"]},"url":{"type":"string"}},"required":["turn_id","conversation_id","project_id","status","cursor","text","tasks","files","more_tasks","failure","cost_usd","url"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/get_turns":{"post":{"operationId":"get_turns","tags":["Read"],"summary":"Follow several turns","description":"Follows up to 10 turns create_with_awen started, in one call. Each turn reads as get_turn reads it: status, task_counts, files, more_tasks, failure, cost_usd and its reply's text, with the same meanings. The call waits up to wait_seconds (0 to 30, default 15) and answers as soon as any turn changes, or at once when none can change any more, so call it again at once while a turn is working, with no other pause. Pass the last cursor back with the same turn_ids, so a change between two calls is not missed: a turn's text is then left out when it has not changed since that answer. A turn that is not found answers error and no other field. Call get_turn for a turn's tasks and why each failed, and with include_downloads for its files' download links.\n\nNeeds a key with awen:read. Costs 2 units of the key's rate limit.","x-awen-scopes":["awen:read"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"turn_ids":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The turn_id create_with_awen returned, a conversation's active_turn_id, or an answer's turn_id from fetch on a conversation."},"description":"The turn_ids create_with_awen returned, conversations' active_turn_id, or answers' turn_id from fetch on a conversation."},"cursor":{"description":"The cursor of the last answer. Without it, the wait starts from the turns as they are now.","type":"string","minLength":1,"maxLength":4096},"wait_seconds":{"description":"How long to wait for a change. 0 answers at once.","type":"integer","minimum":0,"maximum":30}},"required":["turn_ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"turns":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"turn_id":{"type":"string"},"conversation_id":{"type":"string"},"project_id":{"type":"string"},"status":{"type":"string","enum":["working","completed","failed","stopped"]},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entry_id":{"type":["string","null"]},"media_id":{"type":"string"},"revision_id":{"type":"string"},"kind":{"type":"string","enum":["folder","image","video","canvas","three_d","whiteboard","file"]},"name":{"type":"string"},"url":{"type":"string"},"mime_type":{"type":["string","null"]},"size_bytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"width":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"height":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"duration_seconds":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"download_url":{"type":["string","null"]}},"required":["id","entry_id","media_id","revision_id","kind","name","url","mime_type","size_bytes","width","height","duration_seconds"],"additionalProperties":false}},"more_tasks":{"type":"boolean"},"failure":{"type":["string","null"]},"cost_usd":{"type":["number","null"]},"url":{"type":"string"},"text":{"type":["string","null"]},"task_counts":{"type":"object","properties":{"running":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["running","completed","failed"],"additionalProperties":false}},"required":["turn_id","conversation_id","project_id","status","files","more_tasks","failure","cost_usd","url","task_counts"],"additionalProperties":false},{"type":"object","properties":{"turn_id":{"type":"string"},"error":{"type":"string","const":"Not found. Use the turn_id create_with_awen returned, a conversation's active_turn_id from list_conversations, or an answer's turn_id from fetch on the conversation."}},"required":["turn_id","error"],"additionalProperties":false}]}},"cursor":{"type":"string"}},"required":["turns","cursor"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}},"/cancel_turn":{"post":{"operationId":"cancel_turn","tags":["Create"],"summary":"Stop a turn","description":"Stops a running turn, as Stop does in awen: it saves what the reply wrote so far, charges the model calls that finished and frees the conversation. Generations that already started finish and are charged. A turn that already ended is left as it is. Answers the turn's status.\n\nNeeds a key with awen:create, awen:write. Costs 2 units of the key's rate limit.","x-awen-scopes":["awen:create","awen:write"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"turn_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"The turn_id create_with_awen returned, a conversation's active_turn_id, or an answer's turn_id from fetch on a conversation."}},"required":["turn_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The operation's answer.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["working","completed","failed","stopped"]}},"required":["status"],"additionalProperties":false}}}},"429":{"$ref":"#/components/responses/RateLimited"},"4XX":{"$ref":"#/components/responses/Problem"},"5XX":{"$ref":"#/components/responses/Problem"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key from Settings → Connected apps → API keys, sent as `Authorization: Bearer awen_sk_…`. Keep it on a server: a request from a web page is refused."}},"responses":{"Problem":{"description":"A refusal or a failure, as RFC 9457 problem details with a stable `code`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"RateLimited":{"description":"Over a rate limit: `limit` names it, and the call can be sent again after `retry_after_seconds`, as `Retry-After` says.","headers":{"Retry-After":{"description":"Seconds to wait before calling again.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"schemas":{"Problem":{"type":"object","required":["type","title","status","code","detail"],"properties":{"type":{"const":"about:blank"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"enum":["missing_api_key","invalid_api_key","browser_not_allowed","unavailable","access_off","plan_required","membership_suspended","insufficient_scope","unknown_operation","not_found","conflict","limit_reached","payload_too_large","unsupported_media_type","invalid_json","invalid_request","idempotency_key_required","refused","rate_limited","internal_error","busy","not_configured","timeout"]},"detail":{"type":"string","description":"Words for a person; they may change."},"retry_after_seconds":{"type":"integer","description":"With `rate_limited` and `busy`: seconds to wait before calling again, as `Retry-After` says."},"limit":{"type":"object","description":"With `rate_limited`: the limit the call went over.","required":["scope","units","window_seconds"],"properties":{"scope":{"enum":["key","organisation","address"],"description":"Whose calls it counts: this key, every key of the organisation, or calls with keys that do not work from one address."},"units":{"type":"integer","description":"Units allowed in each window."},"window_seconds":{"type":"integer"}}},"issues":{"type":"array","description":"Each argument that failed validation, with `invalid_request`.","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}