Files
Files endpoints of the Ellipsis REST API.
| Method | Path |
|---|---|
| POST | /v1/files |
v1: PNG images only, base64 in the JSON body, 10 MiB cap. The primary caller is the in-sandbox `agent file upload` CLI (an agent persisting a screenshot to link on a PR), but all credential types work. Returns the org-membership-gated dashboard URL so callers never hard-code URL shapes.
curl -X POST "https://api.ellipsis.dev/v1/files" \
-H "Authorization: Bearer $ELLIPSIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content_type": "...",
"data_b64": "...",
"filename": "..."
}'import os
from ellipsis import Ellipsis
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
result = client.files.create("...", "...", "...")
print(result)import { Ellipsis } from '@ellipsis-dev/sdk';
const client = new Ellipsis({
apiKey: process.env.ELLIPSIS_API_TOKEN!,
});
const result = await client.files.create(
{ content_type: '...', data_b64: '...', filename: '...' },
);
console.log(result);Request
Body parameters
The MIME type of the file. Only image/png is currently supported, and the uploaded bytes must actually be a PNG.
The raw file bytes, base64-encoded.
The original file basename. Used for display only.
Response
| Method | Path |
|---|---|
| GET | /v1/files |
Metadata only — download URLs are minted per explicit GET, not per row. session_id scopes the list to one run's uploads.
Query parameters
50integercurl "https://api.ellipsis.dev/v1/files" \
-H "Authorization: Bearer $ELLIPSIS_API_KEY"import os
from ellipsis import Ellipsis
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
for item in client.files.list():
print(item)import { Ellipsis } from '@ellipsis-dev/sdk';
const client = new Ellipsis({
apiKey: process.env.ELLIPSIS_API_TOKEN!,
});
for await (const item of client.files.list()) {
console.log(item);
}Request
Response
| Method | Path |
|---|---|
| GET | /v1/files/{file_id} |
Includes the gated dashboard URL and a short-lived presigned `download_url`. To fetch the bytes locally, call this and then GET download_url immediately — the JSON API never carries the file. The CLI's `agent file get` wraps exactly that two-step.
Path parameters
curl "https://api.ellipsis.dev/v1/files/{file_id}" \
-H "Authorization: Bearer $ELLIPSIS_API_KEY"import os
from ellipsis import Ellipsis
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
result = client.files.get("...")
print(result)import { Ellipsis } from '@ellipsis-dev/sdk';
const client = new Ellipsis({
apiKey: process.env.ELLIPSIS_API_TOKEN!,
});
const result = await client.files.get('...');
console.log(result);Request
Response
| Method | Path |
|---|---|
| DELETE | /v1/files/{file_id} |
A foreign, missing, or already-deleted id is an indistinguishable 404, so ids can't be enumerated. Sandbox tokens get a 403 (a sandbox token sits next to potentially-untrusted code and must not be able to destroy the account's files — uploading is fine, destruction is not); API keys and user tokens may delete.
Path parameters
curl -X DELETE "https://api.ellipsis.dev/v1/files/{file_id}" \
-H "Authorization: Bearer $ELLIPSIS_API_KEY"import os
from ellipsis import Ellipsis
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
result = client.files.delete("...")
print(result)import { Ellipsis } from '@ellipsis-dev/sdk';
const client = new Ellipsis({
apiKey: process.env.ELLIPSIS_API_TOKEN!,
});
const result = await client.files.delete('...');
console.log(result);