Skip to Content
Docs
ReferenceRead

Read an awen item

POST
/fetch

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.

Authorization

apiKey
headerAuthorizationBearer <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.

Request Body

application/json
  1. body
id*string

An id from search or a list.

Length1 <= length <= 144
offset?integer

Where to continue a text file (bytes) or a conversation (messages).

Range0 <= value <= 2147483647

Response Body

The operation's answer.

application/json
  1. response
id*string
title*string
text*string
url*string
metadata*
Example Request
curl -X POST 'https://app.awen.ai/api/v1/fetch' \  -H 'Content-Type: application/json' \  -d '{  "id": "string"}'
Example Response
{  "id": "string",  "title": "string",  "text": "string",  "url": "string",  "metadata": {    "property1": null,    "property2": null  }}

Download files and folders POST

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.

Read a file's lineage POST

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. Needs a key with awen:read. Costs 4 units of the key's rate limit.