curl https://platform.u1.archetypeai.app/api/files/fil_01k7x3q9m2v8n4p6r5t0w1y2z3 \
-H "Authorization: Bearer $ATAI_API_KEY"
import requests
import os
api_key = os.environ.get("ATAI_API_KEY")
file_uid = "fil_01k7x3q9m2v8n4p6r5t0w1y2z3"
response = requests.get(
f"https://platform.u1.archetypeai.app/api/files/{file_uid}",
headers={"Authorization": f"Bearer {api_key}"},
)
print(response.json())
const fileUid = "fil_01k7x3q9m2v8n4p6r5t0w1y2z3";
const response = await fetch(
`https://platform.u1.archetypeai.app/api/files/${fileUid}`,
{
headers: {
Authorization: `Bearer ${process.env.ATAI_API_KEY}`,
},
}
);
const metadata = await response.json();
console.log(metadata);
{
"file_id": "test_image.png",
"file_uid": "fil_01k7x3q9m2v8n4p6r5t0w1y2z3",
"is_valid": true,
"file_type": "image/png",
"num_bytes": 482931,
"created_at": "2026-10-21T09:12:44Z",
"file_status": "FILE_STATUS_INGESTED",
"file_attributes": {
"width": 1920,
"height": 1080,
"num_channels": 3,
"channel_bands": ["R", "G", "B"]
},
"ingested": true,
"file_index": 0,
"file_tags": {}
}
{
"errors": [
{
"code": "unauthorized_request",
"message": "Unauthorized or invalid access.",
"suggestion": "Provide valid authentication credentials and ensure they have the required permissions.",
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "not_found",
"message": "File not found: org_id=<org_id>, file_id=fil_01k7x3q9m2v8n4p6r5t0w1y2z3",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Files API
Get File
Retrieve the metadata of a file by its file_uid
GET
/
api
/
files
/
{file_id}
curl https://platform.u1.archetypeai.app/api/files/fil_01k7x3q9m2v8n4p6r5t0w1y2z3 \
-H "Authorization: Bearer $ATAI_API_KEY"
import requests
import os
api_key = os.environ.get("ATAI_API_KEY")
file_uid = "fil_01k7x3q9m2v8n4p6r5t0w1y2z3"
response = requests.get(
f"https://platform.u1.archetypeai.app/api/files/{file_uid}",
headers={"Authorization": f"Bearer {api_key}"},
)
print(response.json())
const fileUid = "fil_01k7x3q9m2v8n4p6r5t0w1y2z3";
const response = await fetch(
`https://platform.u1.archetypeai.app/api/files/${fileUid}`,
{
headers: {
Authorization: `Bearer ${process.env.ATAI_API_KEY}`,
},
}
);
const metadata = await response.json();
console.log(metadata);
{
"file_id": "test_image.png",
"file_uid": "fil_01k7x3q9m2v8n4p6r5t0w1y2z3",
"is_valid": true,
"file_type": "image/png",
"num_bytes": 482931,
"created_at": "2026-10-21T09:12:44Z",
"file_status": "FILE_STATUS_INGESTED",
"file_attributes": {
"width": 1920,
"height": 1080,
"num_channels": 3,
"channel_bands": ["R", "G", "B"]
},
"ingested": true,
"file_index": 0,
"file_tags": {}
}
{
"errors": [
{
"code": "unauthorized_request",
"message": "Unauthorized or invalid access.",
"suggestion": "Provide valid authentication credentials and ensure they have the required permissions.",
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "not_found",
"message": "File not found: org_id=<org_id>, file_id=fil_01k7x3q9m2v8n4p6r5t0w1y2z3",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Requires version 2.0.0 or later of the Archetype platform.
Overview
This endpoint returns the metadata record of one file, looked up by the file’sfile_uid (a
value starting with fil_) instead of by its filename. It returns the same record as Get File
Metadata.
A file’s file_uid never refers to any other file. If you delete a file and upload a new one
under the same filename, the new file gets a new file_uid, so a stored file_uid can’t
accidentally point at the replacement.
Files you can’t see, files that are being deleted or are already deleted, and values that aren’t
a file_uid all return an HTTP 404 error.
Path Parameters
string
required
The file’s
file_uid (fil_...), as returned by the upload endpoints and in every file
metadata record.Response
Returns the file’s metadata record. See Get File Metadata for the full description of each field.string
The filename the file was uploaded under
string
The file’s unique identifier (
fil_...)string
MIME type of the file (e.g.
image/png, text/csv)integer
Size of the file in bytes
string
Lifecycle status of the file
object
Type-specific attributes for the file
curl https://platform.u1.archetypeai.app/api/files/fil_01k7x3q9m2v8n4p6r5t0w1y2z3 \
-H "Authorization: Bearer $ATAI_API_KEY"
import requests
import os
api_key = os.environ.get("ATAI_API_KEY")
file_uid = "fil_01k7x3q9m2v8n4p6r5t0w1y2z3"
response = requests.get(
f"https://platform.u1.archetypeai.app/api/files/{file_uid}",
headers={"Authorization": f"Bearer {api_key}"},
)
print(response.json())
const fileUid = "fil_01k7x3q9m2v8n4p6r5t0w1y2z3";
const response = await fetch(
`https://platform.u1.archetypeai.app/api/files/${fileUid}`,
{
headers: {
Authorization: `Bearer ${process.env.ATAI_API_KEY}`,
},
}
);
const metadata = await response.json();
console.log(metadata);
{
"file_id": "test_image.png",
"file_uid": "fil_01k7x3q9m2v8n4p6r5t0w1y2z3",
"is_valid": true,
"file_type": "image/png",
"num_bytes": 482931,
"created_at": "2026-10-21T09:12:44Z",
"file_status": "FILE_STATUS_INGESTED",
"file_attributes": {
"width": 1920,
"height": 1080,
"num_channels": 3,
"channel_bands": ["R", "G", "B"]
},
"ingested": true,
"file_index": 0,
"file_tags": {}
}
{
"errors": [
{
"code": "unauthorized_request",
"message": "Unauthorized or invalid access.",
"suggestion": "Provide valid authentication credentials and ensure they have the required permissions.",
"error_uid": "err-xxxxxxxx"
}
]
}
{
"errors": [
{
"code": "not_found",
"message": "File not found: org_id=<org_id>, file_id=fil_01k7x3q9m2v8n4p6r5t0w1y2z3",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Was this page helpful?