Lassetier

Lassetier API v1.0.0 · OpenAPI 3.1

Public REST API to generate and convert game assets. Authenticate every request with an API key created at https://lassetier.com/dashboard/settings/api-keys, sent as `Authorization: Bearer lat_live_…`. All responses share the shape `{ data, error, meta? }`. Rate limits: 60 requests/min per key, 20 generations/hour per user (contact us to raise them). Costs are debited in credits (1 credit = $0.01 USD); insufficient balance returns HTTP 402 with the exact shortfall.

Base URL : https://lassetier.com/api/v1 · Get an API key

post/api/v1/generate

Generate an asset from a text prompt

Text-to-image generation in one of the Lassetier styles (isometric, isometric_pixel, topdown, platformer, pixel32, pixel64). Runs synchronously (~5-10 s) and debits credits atomically. `project_id` is optional — assets land in your “API” project by default. `transparent_background` (default true) removes the uniform background and crops to content.

Example request

curl -X POST https://lassetier.com/api/v1/generate \
  -H "Authorization: Bearer lat_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "a medieval stone watchtower with a red roof", "style": "isometric"}'

Example response

{
  "data": {
    "conversion_id": "6a1b…",
    "status": "completed",
    "estimated_cost_credits": 25
  },
  "error": null
}
post/api/v1/convert

Convert an uploaded image into a game asset

Multipart upload: field `image` (PNG/JPEG/WebP, ≤10 MB — content is verified by magic bytes) plus `style`, optional `project_id`, `prompt_hint` (extra guidance) and `transparent_background`. Reuses the full pipeline: upload → image-to-image conversion → sharp post-processing.

Example request

curl -X POST https://lassetier.com/api/v1/convert \
  -H "Authorization: Bearer lat_live_YOUR_KEY" \
  -F "image=@photo.jpg" \
  -F "style=isometric" \
  -F "prompt_hint=keep the red color scheme"

Example response

{
  "data": {
    "conversion_id": "6a1b…",
    "upload_id": "9c2d…",
    "status": "completed",
    "estimated_cost_credits": 25
  },
  "error": null
}
get/api/v1/conversions/{id}

Get a conversion's status and result

Returns the status, style, real API cost and — when completed — a signed `download_url` valid for 1 hour.

Parameters

  • id (path) *Conversion UUID

Example request

curl https://lassetier.com/api/v1/conversions/CONVERSION_ID \
  -H "Authorization: Bearer lat_live_YOUR_KEY"

Example response

{
  "data": {
    "id": "6a1b…",
    "status": "completed",
    "style": "isometric",
    "channel": "api",
    "cost_credits": 25,
    "duration_ms": 5780,
    "download_url": "https://…signed…",
    "error_message": null
  },
  "error": null
}
get/api/v1/library/assets/{id}

Get one library asset by id

Returns a single library asset (yours or from a global CC0 pack) with its `download_url` (public, or signed 1 h for private assets). Downloading library assets is free — no credits are debited.

Parameters

  • id (path) *Asset UUID

Example request

curl https://lassetier.com/api/v1/library/assets/ASSET_ID \
  -H "Authorization: Bearer lat_live_YOUR_KEY"

Example response

{
  "data": {
    "id": "aa31…",
    "name": "watchtower",
    "category": "isometric",
    "game_type": "isometric",
    "license": "user-owned",
    "attribution": null,
    "download_url": "https://…"
  },
  "error": null
}
get/api/v1/credits

Get your credit balance

Current balance, price per image in credits, and your average real AI cost per image (falls back to the list price).

Example request

curl https://lassetier.com/api/v1/credits \
  -H "Authorization: Bearer lat_live_YOUR_KEY"

Example response

{
  "data": {
    "balance_credits": 450,
    "credits_per_image": 25
  },
  "error": null
}
post/api/v1/export

Export assets as a ZIP

Same contract as the web export: mixed lists of `upload_ids` (their completed conversions are included) and `library_asset_ids`, plus `include_originals`. Returns a signed download URL valid 24 h. The ZIP contains /converted/{style}, /library/{category}, /originals, manifest.json and LICENSES.txt. Limits: 500 files, 1 GB.

Example request

curl -X POST https://lassetier.com/api/v1/export \
  -H "Authorization: Bearer lat_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"upload_ids": ["UPLOAD_ID"], "name": "my-assets"}'

Example response

{
  "data": {
    "job_id": "ed2a…",
    "zip_name": "my-assets.zip",
    "images_count": 3,
    "total_bytes": 1204833,
    "download_url": "https://…signed…",
    "expires_in_seconds": 86400
  },
  "error": null
}
post/api/v1/spritesheet

Pack images into a spritesheet + atlas (free)

Packs images into an engine-ready spritesheet with its atlas (engines: `phaser` — also PixiJS —, `godot`, `unity`, `generic`). FREE: 0 credits, no AI involved (MaxRects packing, trim with offsets, 1 px edge extrusion, exact-duplicate merging, multi-page). Two input modes: JSON with `conversion_ids` and/or `asset_ids`, OR multipart/form-data with `images` files and an `options` JSON field. Options: `mode` (packed|grid), `padding`, `extrude`, `max_size` (1024|2048|4096), `power_of_two`, `square`, `grid_cell`. Returns the zip URL (valid 24 h) with /spritesheet/sheet-0.png, the atlas file(s) and INSTRUCTIONS.txt. Limit: 500 images.

Example request

curl -X POST https://lassetier.com/api/v1/spritesheet \
  -H "Authorization: Bearer lat_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"conversion_ids": ["CONVERSION_ID"], "engine": "phaser", "mode": "grid"}'

Example response

{
  "data": {
    "job_id": "b7f1…",
    "zip_name": "spritesheet-2026-08-01.zip",
    "images_count": 6,
    "total_bytes": 842001,
    "download_url": "https://…signed…",
    "expires_in_seconds": 86400,
    "cost_credits": 0
  },
  "error": null
}
post/api/v1/characters

Create a persistent character

Locks a visual identity you can reuse across generations. The reference image comes from an existing `upload_id`, `conversion_id` or `library_asset_id`; it is copied into your character's own storage. The `description` is the canonical text injected into every prompt that uses this character, so be precise about face, hair, colors and outfit. Optional `reference_kind` (default `model_sheet`): `portrait`, `direction_front`, `direction_back`, `direction_side_left`, `direction_side_right`, `direction_q_fl`, `direction_q_fr`, `direction_q_bl`, `direction_q_br`. Free — no credits used.

Example request

curl -X POST https://lassetier.com/api/v1/characters \
  -H "Authorization: Bearer lat_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Lia","description":"young woman, mid-20s, long wavy blonde hair","reference":{"upload_id":"UPLOAD_ID"}}'

Example response

{
  "data": {
    "character_id": "6b34…",
    "name": "Lia",
    "description": "young woman, mid-20s, long wavy blonde hair",
    "project_id": null,
    "references": [
      {
        "kind": "model_sheet",
        "url": "https://…signed…"
      }
    ]
  },
  "error": null
}
get/api/v1/characters

List your characters

Optionally filtered by `project_id`.

Parameters

  • project_id (query)Filter by project.

Example request

curl "https://lassetier.com/api/v1/characters" \
  -H "Authorization: Bearer lat_live_YOUR_KEY"

Example response

{
  "data": {
    "characters": [
      {
        "id": "6b34…",
        "name": "Lia",
        "description": "young woman…",
        "project_id": null
      }
    ]
  },
  "error": null
}
get/api/v1/characters/{id}

Get a character and its reference images

Returns the canonical description and signed URLs (1 h) for every reference.

Parameters

  • id (path) *Character id.

Example request

curl https://lassetier.com/api/v1/characters/CHARACTER_ID \
  -H "Authorization: Bearer lat_live_YOUR_KEY"

Example response

{
  "data": {
    "character_id": "6b34…",
    "name": "Lia",
    "description": "young woman…",
    "references": [
      {
        "kind": "model_sheet",
        "url": "https://…signed…"
      }
    ]
  },
  "error": null
}
post/api/v1/characters/{id}/references

Add or replace a character reference image

One reference per `kind` — posting an existing kind replaces it. When generating, the reference matching the requested direction is preferred, then `model_sheet`, then `portrait`. Free.

Parameters

  • id (path) *Character id.

Example request

curl -X POST https://lassetier.com/api/v1/characters/CHARACTER_ID/references \
  -H "Authorization: Bearer lat_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind":"portrait","reference":{"conversion_id":"CONVERSION_ID"}}'

Example response

{
  "data": {
    "character_id": "6b34…",
    "references": [
      {
        "kind": "model_sheet",
        "url": "https://…signed…"
      },
      {
        "kind": "portrait",
        "url": "https://…signed…"
      }
    ]
  },
  "error": null
}
post/api/v1/characters/{id}/turnaround

Generate all directional views in ONE image

Generates a turnaround sheet of the character (4 or 8 views in a single render for maximum consistency), slices it and saves each view as a `direction_*` reference — replacing any existing one. Synchronous, like /generate. Cost: 1 image (25 credits), whatever the number of views. `directions`: 4 (front, side_right, back, side_left) or 8 (adds the four three-quarter views). The raw sheet stays downloadable as a normal conversion (`turnaround_id`). On generation or slicing failure, credits are refunded.

Parameters

  • id (path) *Character id.

Example request

curl -X POST https://lassetier.com/api/v1/characters/CHARACTER_ID/turnaround \
  -H "Authorization: Bearer lat_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"directions":4}'

Example response

{
  "data": {
    "turnaround_id": "8da1…",
    "status": "completed",
    "cost_credits": 25,
    "references": [
      {
        "kind": "direction_front",
        "url": "https://…signed…"
      },
      {
        "kind": "direction_side_right",
        "url": "https://…signed…"
      },
      {
        "kind": "direction_back",
        "url": "https://…signed…"
      },
      {
        "kind": "direction_side_left",
        "url": "https://…signed…"
      }
    ]
  },
  "error": null
}
post/api/v1/characters/{id}/animation-set

Order a full directional animation set

Creates N types × M directions animations in one call — each direction is animated from ITS `direction_*` reference (422 `turnaround_required` if the turnaround has not been run). `types`: any of `idle`, `walk`, `attack`. `directions`: 4 or 8. Asynchronous: returns 202 immediately, poll GET /animation-sets/{set_id}. Each animation is billed normally; failed items are refunded and the set becomes `partial` (successes are kept). Add `?dry_run=true` to get the exact cost without debiting or creating anything.

Parameters

  • id (path) *Character id.
  • dry_run (query)true → cost preview only.

Example request

curl -X POST https://lassetier.com/api/v1/characters/CHARACTER_ID/animation-set \
  -H "Authorization: Bearer lat_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"types":["idle","walk"],"directions":4}'

Example response

{
  "data": {
    "set_id": "85b0…",
    "status": "processing",
    "estimated_cost_credits": 700,
    "animations": [
      {
        "type": "idle",
        "direction": "front",
        "animation_id": null,
        "status": "pending"
      }
    ]
  },
  "error": null
}
get/api/v1/animation-sets/{id}

Poll an animation set

Status `processing` → `done`, `partial` (some items failed, refunded) or `failed`. Each item carries the `animation_id` of its animation (GET /animations/{id} for frames).

Parameters

  • id (path) *Set id.

Example request

curl https://lassetier.com/api/v1/animation-sets/SET_ID \
  -H "Authorization: Bearer lat_live_YOUR_KEY"

Example response

{
  "data": {
    "set_id": "85b0…",
    "character_id": "6b34…",
    "status": "done",
    "animations": [
      {
        "type": "idle",
        "direction": "front",
        "animation_id": "a1b2…",
        "status": "done",
        "cost_credits": 75
      }
    ],
    "total_cost_credits": 700
  },
  "error": null
}
get/api/v1/animation-sets/{id}/export

Download the set as ONE spritesheet + atlas (ZIP)

A single spritesheet holding every completed animation of the set, an atlas with one entry per `type_direction` (Phaser `anims[]`, Godot SpriteFrames multi-animations, or generic `animations.json`) and a WebP preview per animation. `engine`: `phaser` (default), `godot`, `unity` or `generic`. A `partial` set exports its completed items.

Parameters

  • id (path) *Set id.
  • engine (query)Atlas format (default phaser).

Example request

curl -L -o set.zip "https://lassetier.com/api/v1/animation-sets/SET_ID/export?engine=phaser" \
  -H "Authorization: Bearer lat_live_YOUR_KEY"

Example response

{
  "data": "(binary ZIP)",
  "error": null
}
post/api/v1/characters/{id}/emotions

Generate dialogue portraits (one image per emotion)

Generates one portrait per emotion from the character's `portrait` reference (falls back to `model_sheet`; 422 `portrait_required` if neither exists). Same face, same framing — only the expression changes. `emotions`: 1 to 8 entries from `joy`, `sadness`, `anger`, `surprise`, `fear`, `thinking`, or `custom:{text}` (max 60 characters). Cost: N × standard image price (25 credits each); failed items are refunded. Each portrait is a normal conversion (downloadable via GET /conversions/{conversion_id}).

Parameters

  • id (path) *Character id.

Example request

curl -X POST https://lassetier.com/api/v1/characters/CHARACTER_ID/emotions \
  -H "Authorization: Bearer lat_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"emotions":["joy","sadness","anger","surprise"]}'

Example response

{
  "data": {
    "status": "completed",
    "cost_credits": 100,
    "emotions": [
      {
        "emotion": "joy",
        "conversion_id": "b1c2…",
        "status": "completed"
      },
      {
        "emotion": "sadness",
        "conversion_id": "d3e4…",
        "status": "completed"
      }
    ]
  },
  "error": null
}
get/api/v1/projects

List your projects

Each project carries its projection profile (null when unset).

Example request

curl https://lassetier.com/api/v1/projects \
  -H "Authorization: Bearer lat_live_YOUR_KEY"

Example response

{
  "data": {
    "projects": [
      {
        "id": "2ad6…",
        "name": "My isometric game",
        "game_type": "isometric",
        "projection_profile": null
      }
    ]
  },
  "error": null
}
get/api/v1/projects/{id}

Get one project

Includes the projection profile when set.

Parameters

  • id (path) *Project id.

Example request

curl https://lassetier.com/api/v1/projects/PROJECT_ID \
  -H "Authorization: Bearer lat_live_YOUR_KEY"

Example response

{
  "data": {
    "id": "2ad6…",
    "name": "My isometric game",
    "projection_profile": null
  },
  "error": null
}
post/api/v1/projects/{id}

Set the projection profile (PATCH)

Use the HTTP PATCH method. One camera, one light, one palette applied to EVERY generation and animation of the project. Required fields: `version` (1), `projection` (a style id), `camera`, `light`. Optional: `character_height_px`, `palette_notes`, `extra_directives`. Validation is strict: an unknown field or a missing version returns 422 naming the problem. Send `"projection_profile": null` to clear it.

Parameters

  • id (path) *Project id.

Example request

curl -X PATCH https://lassetier.com/api/v1/projects/PROJECT_ID \
  -H "Authorization: Bearer lat_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"projection_profile":{"version":1,"projection":"isometric","camera":"true isometric, 30 degree elevation","light":"soft warm light from upper-left"}}'

Example response

{
  "data": {
    "id": "2ad6…",
    "name": "My isometric game",
    "projection_profile": {
      "version": 1,
      "projection": "isometric"
    }
  },
  "error": null
}