Download files and folders
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.
Needs a key with awen:read. Costs 4 units of the key's rate limit.
apiKeyAuthorizationBearer <token>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.
application/json- body
project_id*stringThe project's project_id.
^[A-Za-z0-9_-]+$1 <= length <= 128items*array<>The entry_id of each file and folder to download, from list_folder.
1 <= items <= 25convert_to?stringSaves the images as PNG or JPEG; omit for the originals.
"png""jpeg"The operation's answer.
application/json- response
project_id*stringdownload_url*stringexpires_at*stringskipped*curl -X POST 'https://app.awen.ai/api/v1/download' \ -H 'Content-Type: application/json' \ -d '{ "project_id": "string", "items": [ "string" ]}'{ "project_id": "string", "download_url": "string", "expires_at": "string", "skipped": { "property1": 1, "property2": 1 }}API reference
Every operation of the Awen API, generated from its OpenAPI document.
Read an awen item POST
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. Needs a key with awen:read. Costs 2 units of the key's rate limit.