Static Ads Lab
API ReferenceSwipe filesV1Swipe files

Upload a swipe file

Upload a reference image via multipart/form-data. The image is stored, then asynchronously embedded and auto-classified (industry + ad_format). Returns 202 with the initial resource (status: processing) and a Location header. Poll GET /v1/swipe-files/{id} for completion.

POST
/v1/swipe-files
X-API-Key<token>

API key for authentication. Include in the X-API-Key header.

In: header

file?unknown

Image file (JPEG, PNG, WebP)

Response Body

curl -X POST "https://api.staticadslab.com/v1/swipe-files"
{
  "data": {
    "id": "sf_a1b2c3d4e5f67890",
    "image_url": "https://cdn.staticadslab.com/swipe-files/sf_abc.png",
    "thumbnail_url": "string",
    "width": 1080,
    "height": 1080,
    "aspect_ratio": "1:1",
    "industry": "Apparel & Accessories",
    "ad_format": "Sale",
    "source": "upload",
    "is_managed": false,
    "status": "ready",
    "error": "string",
    "created_at": "2026-07-03T12:00:00.000Z",
    "updated_at": "2026-07-03T12:00:00.000Z"
  },
  "meta": {
    "request_id": "req_a1b2c3d4e5f67890",
    "timestamp": "2026-03-27T12:00:00.000Z"
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request body",
    "details": [
      {
        "field": "string",
        "message": "string"
      }
    ]
  },
  "meta": {
    "request_id": "req_a1b2c3d4e5f67890",
    "timestamp": "2026-03-27T12:00:00.000Z"
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request body",
    "details": [
      {
        "field": "string",
        "message": "string"
      }
    ]
  },
  "meta": {
    "request_id": "req_a1b2c3d4e5f67890",
    "timestamp": "2026-03-27T12:00:00.000Z"
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request body",
    "details": [
      {
        "field": "string",
        "message": "string"
      }
    ]
  },
  "meta": {
    "request_id": "req_a1b2c3d4e5f67890",
    "timestamp": "2026-03-27T12:00:00.000Z"
  }
}