POST /files
Upload a file that outlives the sandbox.
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": "..."
}'{
"file": {
"content_type": "string",
"created_at": "2026-01-01T00:00:00Z",
"filename": "string",
"id": "string",
"session_id": "string",
"size_bytes": 0
},
"url": "string"
}import os
from ellipsis import Ellipsis
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
result = client.files.create("...", "...", "...")
print(result){
"file": {
"content_type": "string",
"created_at": "2026-01-01T00:00:00Z",
"filename": "string",
"id": "string",
"session_id": "string",
"size_bytes": 0
},
"url": "string"
}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);{
"file": {
"content_type": "string",
"created_at": "2026-01-01T00:00:00Z",
"filename": "string",
"id": "string",
"session_id": "string",
"size_bytes": 0
},
"url": "string"
}{
"properties": {
"content_type": {
"type": "string"
},
"data_b64": {
"type": "string"
},
"filename": {
"type": "string"
}
},
"required": [
"filename",
"content_type",
"data_b64"
],
"type": "object"
}{
"properties": {
"file": {
"properties": {
"content_type": {
"type": "string"
},
"created_at": {
"format": "date-time",
"type": "string"
},
"filename": {
"type": "string"
},
"id": {
"type": "string"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"size_bytes": {
"type": "integer"
}
},
"required": [
"id",
"filename",
"content_type",
"size_bytes",
"created_at"
],
"type": "object"
},
"url": {
"type": "string"
}
},
"required": [
"file",
"url"
],
"type": "object"
}Request
content_typestringrequired
The MIME type of the file. Only image/png is currently supported, and the uploaded bytes must actually be a PNG.
data_b64stringrequired
The raw file bytes, base64-encoded.
filenamestringrequired
The original file basename. Used for display only.