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"
}
{
  "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

Responses

On this page

No Headings
Schedule a demo