POST /files
Upload a file that outlives the sandbox.
TypeScript SDKThe npm client, generated from the API spec.Python SDKThe PyPI client, sync and async.
| 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
Example request body
{
"content_type": "string",
"data_b64": "string",
"filename": "string"
}
Body parameters
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.
Response
Example response · 201
{
"url": "string"
}