Upload agent file
Uploads a file to an agent, for a message to attach by its name. The body is the file, as it is, of the media type that Content-Type names; without one, or with application/octet-stream, kosem tells the type from the content. A file that no message attaches within a day is deleted; the others are kept with the agent. The agent's model reads an image, scaled down if it is larger than models read, and a PDF of at most 10 MiB, and of other files a description, by which the agent's tools open them. A file is at most 50 MiB, and an agent's files 1 GiB all told.
Uploads a file to an agent, for a message to attach by its name. The body is the file, as it is, of the media type that Content-Type names; without one, or with application/octet-stream, kosem tells the type from the content.
A file that no message attaches within a day is deleted; the others are kept with the agent. The agent's model reads an image, scaled down if it is larger than models read, and a PDF of at most 10 MiB, and of other files a description, by which the agent's tools open them. A file is at most 50 MiB, and an agent's files 1 GiB all told.
bearerAuthorizationBearer <token>An access token, or an API key.
project*stringThe project's ID.
^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$agent*stringThe agent's ID.
^ags_[0-7][0-9a-hjkmnp-tv-z]{25}$filename*stringThe file's name, without a directory.
1 <= length <= 255The file, as it is, at most 50 MiB, of the media type that Content-Type names.
body*fileapplication/octet-streambinaryCreated
application/json- response
createTime*stringWhen it was uploaded.
date-timecreator*stringWho uploaded it, such as user:usr_….
filename*stringIts file name.
height?integerAn image's height, in pixels.
int32mediaType*stringIts media type, such as image/png or application/pdf.
modelReads*stringWhat the agent's model reads of the file in a message: CONTENT, the file itself, as an image or a document, which models that read neither get a placeholder for; or DESCRIPTION, its name, media type, size and ID alone, by which the agent's tools open it.
"CONTENT""DESCRIPTION"name*stringResource name, projects/{project_id}/agents/{agent_id}/files/{file_id}, by which a message's file part attaches it.
sha256*stringThe SHA-256 of its content, in hexadecimal.
sizeBytes*integerIts size, in bytes.
int64width?integerAn image's width, in pixels.
int32curl -X POST 'https://api.kosem.ai/v1/projects/string/agents/string/files?filename=string' \
-H 'Content-Type: application/octet-stream' \
-d 'string'{
"createTime": "2019-08-24T14:15:22Z",
"creator": "string",
"filename": "string",
"height": 0,
"mediaType": "string",
"modelReads": "CONTENT",
"name": "string",
"sha256": "string",
"sizeBytes": 0,
"width": 0
}