This document maps the PixelLab v2 REST API to the planned Go CLI surface. The CLI should mirror the API layout clearly and support every endpoint in the v2 OpenAPI spec.
Source of truth:
- API docs:
https://api.pixellab.ai/v2/docs - OpenAPI spec:
https://api.pixellab.ai/v2/openapi.json - LLM docs:
https://api.pixellab.ai/v2/llms.txt
Observed API surface: 61 unique paths, 64 HTTP operations, and 195 schemas.
Expose endpoints directly by API route without a leading slash. The CLI infers the HTTP method from the route and request flags.
pxlb balance
pxlb create-image-pixen --description "cute dragon" --image-size 128x128
pxlb objects/<object_id>
pxlb objects/<object_id> --http-method deleteRules:
- First positional arg is the API route from docs without the leading slash.
- Unique routes infer their only supported HTTP method.
- Routes with both
GETandDELETEdefault to safeGET; use--http-method deleteto delete. - Routes with both
GETandPOST, such as/tilesets, inferPOSTwhen request-body flags or--body-jsonare present andGETotherwise. - Use
--http-method <get|post|patch|delete>only when inference is not enough or when explicitly selecting a destructive method. - Path parameters are written directly in the route, such as
objects/<object_id>orbackground-jobs/<job_id>. - Do not pass route IDs again as flags. Flags such as
--character-idare only used for request body fields on routes likeanimate-character. - All request body fields should be available as flags using kebab-case names matching snake_case JSON fields.
- All endpoints should also support
--body-json <path-or-json>as an escape hatch for full raw request bodies. - All commands should support
--jsonto print raw API responses.
| Flag | Default | Purpose |
|---|---|---|
--token |
PIXELLAB_API_KEY |
Bearer token/API key. |
--base-url |
https://api.pixellab.ai/v2 |
API base URL. |
--http-method |
inferred | Override inferred HTTP method for colliding routes. |
--json |
false |
Print raw JSON response. |
--out |
empty | Output file or directory for returned images, ZIPs, or downloaded assets. |
--wait |
false |
Poll async jobs until completed when a job id is returned. |
--poll-interval |
5s |
Poll interval for --wait. |
--timeout |
0 |
Optional max wait duration. |
--body-json |
empty | Raw JSON body, either inline JSON or a file path. |
--quiet |
false |
Suppress progress output. |
Most endpoints require:
Authorization: Bearer <token>Unauthenticated endpoints in the spec:
GET /llms.txtGET /characters/{character_id}/zipreports no security requirement in OpenAPI, but the CLI should still send auth when configured.
The API expects images as Base64Image objects:
{
"type": "base64",
"base64": "...",
"format": "png"
}CLI conventions:
- Flags ending in
--image,--reference-image,--style-image,--first-frame,--last-frame,--mask-image, and similar should accept local file paths. - The CLI should base64 encode file contents and infer
formatfrom extension, defaulting topng. - Fields that include image dimensions should support
--image-size 128x128,--reference-image-size 128x128,--target-size 64x64, and similar flags. - Arrays of images should accept repeated flags, for example
--style-image a.png --style-image b.png. - Complex image arrays should also support JSON via
--style-images-json,--frames-json,--edit-images-json, and--body-json.
Many endpoints return immediately with a background job id. The CLI should print job ids by default and optionally wait.
Async response status codes include 202 for most pro/background endpoints and 200 for some endpoints that still return queued job metadata.
Common async workflow:
pxlb generate-image-v2 --description "crystal sword" --image-size 128x128
pxlb background-jobs/<job_id>
pxlb generate-image-v2 --description "crystal sword" --image-size 128x128 --wait --out ./outThe --wait implementation should:
- Poll
GET /background-jobs/{job_id}when the response contains a job id. - Stop when status is completed, failed, or timeout expires.
- Save returned images to
--outwhen possible. - Preserve raw response data in
--jsonmode.
Common error statuses:
| Status | Meaning |
|---|---|
400 |
Invalid request state or validation outside schema. |
401 |
Invalid API token. |
402 |
Insufficient credits or generations. |
403 |
Resource belongs to another user. |
404 |
Resource or job not found. |
409 |
Conflict, usually existing animation direction. |
422 |
Schema validation error. |
423 |
Resource still processing. |
429 |
Too many requests or concurrent jobs. |
529 |
Rate limit exceeded. |
Common enum values:
| Type | Values |
|---|---|
CameraView |
side, low top-down, high top-down |
Direction |
north, north-east, east, south-east, south, south-west, west, north-west |
Outline |
single color black outline, single color outline, selective outline, lineless |
Shading |
flat shading, basic shading, medium shading, detailed shading, highly detailed shading |
Detail |
low detail, medium detail, highly detailed |
TilesetCameraView |
low top-down, high top-down |
Common object shapes:
| Schema | CLI representation |
|---|---|
ImageSize, OutputSize, TileSize, ProImageSize, V3OutputImageSize |
WIDTHxHEIGHT, for example 128x128. |
Base64Image |
Local file path converted to base64 object. |
KeyframeImage |
--start-image path --start-size WxH, --end-image path --end-size WxH, or JSON. |
InpaintImage |
--inpainting-image path --inpainting-size WxH, or JSON. |
StyleOptions |
Individual booleans or JSON, default all true. |
TilesProStyleOptions |
Individual booleans or JSON, default all true. |
BoundingBox |
--bounding-box X,Y,WIDTH,HEIGHT. |
Point |
JSON for skeleton keypoints. |
Command:
pxlb balanceArgs: none.
Responses: 200, 401.
Command:
pxlb background-jobs/<job_id>Args: none; put the job id in the route.
Responses: 200, 401, 404, 422, 429.
Command:
pxlb llms.txtArgs: none.
Responses: 200.
Generate image Pro. Async.
Command:
pxlb generate-image-v2 --description "..." --image-size 128x128Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | 1-2000 chars. |
--image-size |
yes | size | Output image size. |
--seed |
no | integer | Reproducible generation. |
--no-background |
no | bool | Default true. |
--reference-image |
no | repeatable path | Up to 4 subject reference images. |
--style-image |
no | path | Style image. |
--style-options-json |
no | JSON | color_palette, outline, detail, shading. |
Responses: 202, 401, 402, 422, 429.
Generate with style Pro. Async.
Command:
pxlb generate-with-style-v2 --style-image a.png --description "..." --image-size 128x128Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--style-image |
yes | repeatable path | 1-4 style images. |
--description |
yes | string | 1-2000 chars. |
--image-size |
yes | size | Output image size. |
--style-description |
no | string | Style hint. |
--seed |
no | integer | Reproducible generation. |
--no-background |
no | bool | Default true. |
Responses: 202, 401, 402, 422, 429.
Generate UI Pro. Async.
Command:
pxlb generate-ui-v2 --description "medieval stone button" --image-size 128x64Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | 1-2000 chars. |
--image-size |
no | size | Output image size. |
--seed |
no | integer | Reproducible generation. |
--no-background |
no | bool | Default true. |
--concept-image |
no | path | Concept image. |
--color-palette |
no | string | Color palette text. |
Responses: 202, 401, 402, 422, 429.
Command:
pxlb create-image-pixflux --description "cute dragon" --image-size 128x128Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | Text prompt. |
--image-size |
yes | size | Output image size. |
--negative-description |
no | string | Deprecated. |
--text-guidance-scale |
no | number | Default 8, range 1-20. |
--outline |
no | enum | Outline. |
--shading |
no | enum | Shading. |
--detail |
no | enum | Detail. |
--view |
no | enum | CameraView. |
--direction |
no | enum | Direction. |
--isometric |
no | bool | Default false. |
--no-background |
no | bool | Default false. |
--background-removal-task |
no | enum | remove_simple_background, remove_complex_background. |
--init-image |
no | path | Initial image. |
--init-image-strength |
no | integer | Default 300, range 1-999. |
--color-image |
no | path | Palette image. |
--seed |
no | integer | Reproducible generation. |
Responses: 200, 401, 402, 422, 429, 529.
Command:
pxlb create-image-pixen --description "cute dragon" --image-size 128x128Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | Text prompt. |
--image-size |
yes | size | Output image size. |
--outline |
no | enum | Outline. |
--detail |
no | enum | Default highly detailed. |
--view |
no | enum | CameraView. |
--direction |
no | enum | Direction. |
--no-background |
no | bool | Default false. |
--background-removal-task |
no | enum | remove_simple_background, remove_complex_background. |
--seed |
no | integer | Reproducible generation. |
--enhance-prompt |
no | bool | Default false. |
Responses: 200, 401, 402, 422, 429, 529.
Command:
pxlb create-image-bitforge --description "cute dragon" --image-size 128x128Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | Text prompt. |
--image-size |
yes | size | Output image size. |
--negative-description |
no | string | Avoid prompt. |
--text-guidance-scale |
no | number | Default 8, range 1-20. |
--extra-guidance-scale |
no | number | Deprecated, default 3. |
--style-strength |
no | number | Default 0, range 0-100. |
--outline |
no | enum | Outline. |
--shading |
no | enum | Shading. |
--detail |
no | enum | Detail. |
--view |
no | enum | CameraView. |
--direction |
no | enum | Direction. |
--isometric |
no | bool | Default false. |
--oblique-projection |
no | bool | Default false. |
--no-background |
no | bool | Default false. |
--coverage-percentage |
no | number | Canvas coverage. |
--init-image |
no | path | Initial image. |
--init-image-strength |
no | integer | Default 300, range 1-999. |
--style-image |
no | path | Style reference. |
--inpainting-image |
no | path | Inpaint source image. |
--mask-image |
no | path | White generates, black preserves. |
--color-image |
no | path | Palette image. |
--skeleton-guidance-scale |
no | number | Default 1, range 0-5. |
--skeleton-keypoints-json |
no | JSON | Skeleton points. |
--seed |
no | integer | Reproducible generation. |
Responses: 200, 401, 402, 422, 429, 529.
Command:
pxlb image-to-pixelart --image input.png --image-size 512x512 --output-size 128x128Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--image |
yes | path | Image to convert. |
--image-size |
yes | size | Input image size. |
--output-size |
yes | size | Desired output size. |
--text-guidance-scale |
no | number | Default 8. |
--seed |
no | integer | Reproducible generation. |
Responses: 200, 400, 401, 402, 422, 429.
Command:
pxlb resize --description "wizard" --reference-image input.png --reference-image-size 64x64 --target-size 128x128Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | 1-2000 chars. |
--reference-image |
yes | path | Image to resize. |
--reference-image-size |
yes | size | Original size. |
--target-size |
yes | size | Output size. |
--view |
no | enum | CameraView. |
--direction |
no | enum | Direction. |
--isometric |
no | bool | Default false. |
--oblique-projection |
no | bool | Default false. |
--no-background |
no | bool | Default false. |
--color-image |
no | path | Palette image. |
--init-image |
no | path | Initial image. |
--init-image-strength |
no | number | Default 150. |
--seed |
no | integer | Reproducible generation. |
Responses: 200, 400, 401, 402, 422, 429.
Command:
pxlb remove-background --image input.png --image-size 128x128Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--image |
yes | path | PNG/JPEG image. |
--image-size |
yes | size | Input image size. |
--background-removal-task |
no | enum | remove_simple_background, remove_complex_background. |
--text |
no | string | Optional foreground description. |
--seed |
no | integer | Reproducible generation. |
Responses: 200, 401, 402, 422, 429.
Edit animation Pro. Async.
Command:
pxlb edit-animation-v2 --description "add a glowing sword" --frames-json frames.json --image-size 64x64Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | 1-2000 chars. |
--frames-json |
yes | JSON | 2-16 frame image objects. |
--image-size |
yes | size | Output frame size. |
--seed |
no | integer | Reproducible generation. |
--no-background |
no | bool | Default false. |
Responses: 202, 401, 402, 422, 429.
Interpolate Pro. Async.
Command:
pxlb interpolation-v2 --start-image start.png --start-size 64x64 --end-image end.png --end-size 64x64 --action "sword slash" --image-size 64x64Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--start-image |
yes | path | Starting keyframe. |
--start-size |
yes | size | Starting keyframe size. |
--end-image |
yes | path | Ending keyframe. |
--end-size |
yes | size | Ending keyframe size. |
--action |
yes | string | 1-500 chars. |
--image-size |
yes | size | Output frame size. |
--seed |
no | integer | Reproducible generation. |
--no-background |
no | bool | Default true. |
Responses: 202, 401, 402, 422, 429.
Transfer outfit Pro. Async.
Command:
pxlb transfer-outfit-v2 --reference-image outfit.png --reference-size 64x64 --frames-json frames.json --image-size 64x64Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--reference-image |
yes | path | Outfit or appearance reference. |
--reference-size |
yes | size | Reference size. |
--frames-json |
yes | JSON | 2-16 frame image objects. |
--image-size |
yes | size | Output frame size. |
--seed |
no | integer | Reproducible generation. |
--no-background |
no | bool | Default false. |
--additional-instructions |
no | string | Extra guidance. |
Responses: 202, 401, 402, 422, 429.
Command:
pxlb animate-with-skeleton --reference-image sprite.png --image-size 64x64 --skeleton-keypoints-json poses.jsonArgs:
| Arg | Required | Type | Notes |
|---|---|---|---|
--image-size |
yes | size | Output image size. |
--reference-image |
yes | path | Reference image. |
--guidance-scale |
no | number | Default 4, range 1-20. |
--view |
no | enum | Default side. |
--direction |
no | enum | Default east. |
--isometric |
no | bool | Default false. |
--oblique-projection |
no | bool | Default false. |
--init-images-json |
no | JSON | Initial images. |
--init-image-strength |
no | integer | Default 300, range 1-999. |
--skeleton-keypoints-json |
no | JSON | Array of skeleton point arrays. |
--inpainting-images-json |
no | JSON | Optional inpainting images. |
--mask-images-json |
no | JSON | Optional masks. |
--color-image |
no | path | Palette image. |
--seed |
no | integer | Reproducible generation. |
Responses: 200, 401, 402, 422, 429, 529.
Command:
pxlb animate-with-text --description "wizard" --action "walking" --reference-image sprite.png --image-size 64x64Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--image-size |
yes | size | Output image size. |
--description |
yes | string | Character description. |
--action |
yes | string | Action description. |
--reference-image |
yes | path | Reference image. |
--negative-description |
no | string | Avoid prompt. |
--text-guidance-scale |
no | number | Default 8. |
--image-guidance-scale |
no | number | Default 1.4. |
--n-frames |
no | integer | Default 4; model always generates 4 frames. |
--start-frame-index |
no | integer | Default 0. |
--view |
no | enum | Default side. |
--direction |
no | enum | Default east. |
--init-images-json |
no | JSON | Initial images. |
--init-image-strength |
no | integer | Default 300, range 1-999. |
--inpainting-images-json |
no | JSON | Existing animation frames. |
--mask-images-json |
no | JSON | Optional masks. |
--color-image |
no | path | Palette image. |
--seed |
no | integer | Default 0. |
Responses: 200, 401, 402, 422, 429, 529.
Animate with text Pro. Async.
Command:
pxlb animate-with-text-v2 --reference-image sprite.png --reference-image-size 64x64 --action "walking" --image-size 64x64Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--reference-image |
yes | path | Character/object reference. |
--reference-image-size |
yes | size | Reference size. |
--action |
yes | string | 1-500 chars. |
--image-size |
yes | size | Output frame size. |
--seed |
no | integer | Reproducible generation. |
--no-background |
no | bool | Default true. |
--view |
no | enum | none, low top-down, high top-down, side; default none. |
--direction |
no | enum | none or compass directions; default none. |
Responses: 202, 401, 402, 422, 429.
Command:
pxlb animate-with-text-v3 --first-frame idle.png --action "walking" --frame-count 8Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--first-frame |
yes | path | First frame, max 256x256. |
--last-frame |
no | path | Optional target frame, max 256x256. |
--action |
yes | string | 1-500 chars. |
--frame-count |
no | integer | Default 8, range 4-16, must be even. |
--seed |
no | integer | Default 0. |
--no-background |
no | bool | Remove background. |
--enhance-prompt |
no | bool | Default false. |
Responses: 200, 401, 402, 422, 429.
Command:
pxlb estimate-skeleton --image sprite.pngArgs:
| Arg | Required | Type | Notes |
|---|---|---|---|
--image |
no | path | Image to estimate skeleton from. |
Responses: 200, 401, 402, 422, 429, 529.
Generate 8 rotations Pro. Async.
Command:
pxlb generate-8-rotations-v2 --image-size 128x128 --reference-image sprite.pngArgs:
| Arg | Required | Type | Notes |
|---|---|---|---|
--image-size |
yes | size | Output image size. |
--method |
no | enum | rotate_character, create_with_style, create_from_concept; default rotate_character. |
--reference-image |
no | path | Rotate source or style reference. |
--concept-image |
no | path | Concept image for create_from_concept. |
--description |
no | string | Character/item description. |
--style-description |
no | string | Style description. |
--view |
no | enum | low top-down, high top-down, side; default low top-down. |
--seed |
no | integer | Reproducible generation. |
--no-background |
no | bool | Default true. |
Responses: 202, 401, 402, 422, 429.
Command:
pxlb generate-8-rotations-v3 --first-frame south.pngArgs:
| Arg | Required | Type | Notes |
|---|---|---|---|
--first-frame |
yes | path | Reference frame, max 256x256. |
--no-background |
no | bool | Remove background. |
--seed |
no | integer | Default 0. |
Responses: 200, 401, 402, 422, 429.
Command:
pxlb rotate --from-image sprite.png --image-size 128x128 --from-direction south --to-direction eastArgs:
| Arg | Required | Type | Notes |
|---|---|---|---|
--image-size |
yes | size | Output size. |
--from-image |
yes | path | Reference image to rotate. |
--image-guidance-scale |
no | number | Default 3, range 1-20. |
--view-change |
no | integer | Degrees to tilt. |
--direction-change |
no | integer | Degrees to rotate. |
--from-view |
no | enum | Default side. |
--to-view |
no | enum | Default side. |
--from-direction |
no | enum | Default south. |
--to-direction |
no | enum | Default east. |
--isometric |
no | bool | Default false. |
--oblique-projection |
no | bool | Default false. |
--init-image |
no | path | Initial image. |
--init-image-strength |
no | integer | Default 300, range 1-999. |
--mask-image |
no | path | Requires init image. |
--color-image |
no | path | Palette image. |
--seed |
no | integer | Reproducible generation. |
Responses: 200, 401, 402, 422, 429, 529.
Inpaint image Pro. Async.
Command:
pxlb inpaint-v3 --description "golden crown" --inpainting-image image.png --inpainting-size 128x128 --mask-image mask.png --mask-size 128x128Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | 1-2000 chars. |
--inpainting-image |
yes | path | 32x32 to 512x512. |
--inpainting-size |
yes | size | Source size. |
--mask-image |
yes | path | White generates, black preserves. |
--mask-size |
yes | size | Mask size. |
--context-image |
no | path | Deprecated. |
--context-size |
no | size | Context size. |
--bounding-box |
no | x,y,w,h |
Deprecated. |
--seed |
no | integer | Reproducible generation. |
--no-background |
no | bool | Default false. |
--crop-to-mask |
no | bool | Default true. |
Responses: 202, 401, 402, 422, 429.
Command:
pxlb inpaint --description "golden crown" --image-size 128x128 --inpainting-image image.png --mask-image mask.pngArgs:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | Text prompt. |
--image-size |
yes | size | Output size. |
--inpainting-image |
yes | path | Source image. |
--mask-image |
yes | path | White generates, black preserves. |
--negative-description |
no | string | Avoid prompt. |
--text-guidance-scale |
no | number | Default 3, range 1-10. |
--extra-guidance-scale |
no | number | Deprecated. |
--outline |
no | enum | Outline. |
--shading |
no | enum | Shading. |
--detail |
no | enum | Detail. |
--view |
no | enum | CameraView. |
--direction |
no | enum | Direction. |
--isometric |
no | bool | Default false. |
--oblique-projection |
no | bool | Default false. |
--no-background |
no | bool | Default false. |
--init-image |
no | path | Initial image. |
--init-image-strength |
no | integer | Default 300. |
--color-image |
no | path | Palette image. |
--seed |
no | integer | Reproducible generation. |
Responses: 200, 401, 402, 422, 429, 529.
Edit images Pro. Async.
Command:
pxlb edit-images-v2 --edit-images-json images.json --image-size 128x128 --description "make it icy"Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--edit-images-json |
yes | JSON | 1-16 images. |
--image-size |
yes | size | Output size. |
--method |
no | enum | edit_with_text, edit_with_reference; default edit_with_text. |
--description |
no | string | Required for text method. |
--reference-image |
no | path | Required for reference method. |
--reference-size |
no | size | Reference size. |
--seed |
no | integer | Reproducible generation. |
--no-background |
no | bool | Default false. |
Responses: 202, 401, 402, 422, 429.
Edit image. Async.
Command:
pxlb edit-image --image input.png --image-size 128x128 --description "make it golden" --width 128 --height 128Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--image |
yes | path | Reference image. |
--image-size |
yes | size | Reference size. |
--description |
yes | string | 1-500 chars. |
--width |
yes | integer | Target canvas width, 16-400. |
--height |
yes | integer | Target canvas height, 16-400. |
--seed |
no | integer | Reproducible generation. |
--no-background |
no | bool | Default true. |
--text-guidance-scale |
no | number | Default 8. |
--color-image |
no | path | Color reference. |
Responses: 202, 401, 402, 422, 429.
Create top-down Wang tileset asynchronously.
Command:
pxlb tilesets --lower-description "ocean" --upper-description "beach"Args: same as POST /create-tileset.
Responses: 202, 401, 402, 422, 429, 529.
Command:
pxlb tilesets --limit 50 --offset 0Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--limit |
no | integer | Default 50. |
--offset |
no | integer | Default 0. |
Responses: 200, 401, 422.
Command:
pxlb create-tileset --lower-description "ocean" --upper-description "beach"Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--lower-description |
yes | string | Lower/base terrain. |
--upper-description |
yes | string | Upper/elevated terrain. |
--transition-description |
no | string | Transition area. |
--lower-base-tile-id |
no | string | Connected tileset lower base id. |
--upper-base-tile-id |
no | string | Connected tileset upper base id. |
--tile-size |
no | size | 16x16 or 32x32, default 16x16. |
--text-guidance-scale |
no | number | Default 8, range 1-20. |
--outline |
no | enum | Outline. |
--shading |
no | enum | Shading. |
--detail |
no | enum | Detail. |
--view |
no | enum | low top-down, high top-down; default high top-down. |
--tile-strength |
no | number | Default 1, range 0.1-2. |
--tileset-adherence-freedom |
no | number | Default 500, range 0-900. |
--tileset-adherence |
no | number | Default 100, range 0-500. |
--transition-size |
no | enum | 0, 0.25, 0.5, 1; default 0. |
--lower-reference-image |
no | path | Lower terrain reference. |
--upper-reference-image |
no | path | Upper terrain reference. |
--transition-reference-image |
no | path | Transition reference. |
--color-image |
no | path | Palette reference. |
--seed |
no | integer | Reproducible generation. |
Responses: 200, 202, 401, 402, 422, 429, 529.
Command:
pxlb tilesets/<tileset_id>Args: none; put the tileset id in the route.
Responses: 200, 401, 404, 422, 423.
Create sidescroller tileset asynchronously.
Command:
pxlb tilesets-sidescroller --lower-description "stone bricks" --transition-description "moss"Args: same as POST /create-tileset-sidescroller.
Responses: 202, 401, 402, 422, 429, 529.
Command:
pxlb create-tileset-sidescroller --lower-description "stone bricks" --transition-description "moss"Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--lower-description |
yes | string | Platform material. |
--transition-description |
no | string | Decorative top layer. |
--lower-base-tile-id |
no | string | Connected tileset base id. |
--tile-size |
no | size | 16x16 or 32x32, default 16x16. |
--text-guidance-scale |
no | number | Default 8, range 1-20. |
--outline |
no | enum | Outline. |
--shading |
no | enum | Shading. |
--detail |
no | enum | Detail. |
--tile-strength |
no | number | Default 1, range 0.1-2. |
--tileset-adherence-freedom |
no | number | Default 500, range 0-900. |
--tileset-adherence |
no | number | Default 100, range 0-500. |
--transition-size |
no | enum | 0, 0.25, 0.5, 1; default 0. |
--lower-reference-image |
no | path | Platform reference. |
--transition-reference-image |
no | path | Transition reference. |
--color-image |
no | path | Palette reference. |
--seed |
no | integer | Reproducible generation. |
Responses: 202, 401, 402, 422, 429, 529.
Command:
pxlb create-isometric-tile --description "grass on dirt" --image-size 32x32Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | Tile description. |
--image-size |
yes | size | Output image size. |
--text-guidance-scale |
no | number | Default 8, range 1-20. |
--outline |
no | string | Default lineless. |
--shading |
no | string | Default basic shading. |
--detail |
no | string | Default medium detail. |
--init-image |
no | path | Initial image. |
--init-image-strength |
no | integer | Default 300, range 1-999. |
--isometric-tile-size |
no | integer | Default 16. |
--isometric-tile-shape |
no | enum | thick tile, thin tile, block; default block. |
--color-image |
no | path | Palette image. |
--seed |
no | integer | Reproducible generation. |
Responses: 200, 202, 401, 402, 422, 429, 529.
Command:
pxlb isometric-tiles/<tile_id>Args: none; put the tile id in the route.
Responses: 200, 401, 404, 422, 423.
Command:
pxlb isometric-tiles --limit 50 --offset 0Args: --limit, --offset.
Responses: 200, 401, 422.
Command:
pxlb create-tiles-pro --description "1). grass 2). stone" --tile-type isometric --tile-size 32Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | Numbered tile descriptions recommended. |
--tile-type |
no | enum | hex, hex_pointy, isometric, octagon, square_topdown; default isometric. |
--tile-size |
no | integer | Default 32, range 16-256. |
--tile-height |
no | integer | Non-square tile height. |
--tile-view |
no | enum | top-down, high top-down, low top-down, side; default low top-down. |
--tile-view-angle |
no | number | 0-90, overrides tile_view. |
--tile-depth-ratio |
no | number | 0.0-1.0. |
--seed |
no | integer | Reproducible generation. |
--style-images-json |
no | JSON | Style references. |
--style-options-json |
no | JSON | Style copy options. |
Responses: 202, 401, 402, 422, 429.
Command:
pxlb tiles-pro/<tile_id>Args: none; put the tile id in the route.
Responses: 200, 401, 404, 422, 423.
Command:
pxlb map-objects --description "wooden barrel" --image-size 128x128Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | 1-2000 chars. |
--image-size |
no | size | Default 128x128. |
--view |
no | enum | low top-down, high top-down, side; default high top-down. |
--outline |
no | string | Default single color outline. |
--shading |
no | string | Default medium shading. |
--detail |
no | string | Default medium detail. |
--text-guidance-scale |
no | number | Default 8, range 1-20. |
--init-image |
no | path | Initial image. |
--init-image-strength |
no | integer | Default 300, range 1-999. |
--color-image |
no | path | Palette image. |
--background-image |
no | path | Style matching or inpainting background. |
--inpainting-json |
no | JSON | Mask, oval, or rectangle inpainting config. |
--seed |
no | integer | Reproducible generation. |
Responses: 200, 401, 402, 422, 429.
Command:
pxlb create-character-with-4-directions --description "blue wizard" --image-size 64x64Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | 1-2000 chars. |
--image-size |
yes | size | Rotation frame size. |
--async-mode |
no | bool | Default true. |
--text-guidance-scale |
no | number | Default 8. |
--outline |
no | string | Default single color black outline. |
--shading |
no | string | Default basic shading. |
--detail |
no | string | Default medium detail. |
--view |
no | string | Default low top-down. |
--isometric |
no | bool | Default false. |
--color-image |
no | path | Palette image. |
--force-colors |
no | bool | Default false. |
--proportions-json |
no | JSON | Humanoid proportions. |
--template-id |
no | string | mannequin, bear, cat, dog, horse, lion. |
--seed |
no | integer | Reproducible generation. |
--directions-json |
no | JSON | Optional reference images by direction. |
--output-type |
no | string | Default dict. |
Responses: 200, 401, 402, 422, 429.
Command:
pxlb create-character-with-8-directions --description "blue wizard" --image-size 64x64Args: same as 4-direction character plus --mode default standard.
Responses: 200, 401, 402, 422, 429.
Command:
pxlb create-character-pro --description "blue wizard" --image-size 96x96Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | 1-2000 chars. |
--image-size |
yes | size | Pro frame size, 32-168. |
--method |
no | enum | create_with_style, create_from_concept, rotate_character; default create_with_style. |
--view |
no | enum | low top-down, high top-down, side; default low top-down. |
--template-id |
no | string | Default mannequin. |
--concept-image |
no | path | Max 1024x1024. |
--reference-image |
no | path | Max 168x168. |
--style-description |
no | string | Style hint. |
--seed |
no | integer | Reproducible generation. |
--no-background |
no | bool | Default true. |
Responses: 200, 401, 402, 422, 429.
Command:
pxlb create-character-v3 --description "blue wizard" --image-size 64x64 --enhance-promptArgs:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | 1-2000 chars. |
--reference-image |
no | path | South-facing reference image. |
--image-size |
no | size | Advisory or from-scratch size, 32-256. |
--view |
no | enum | low top-down, high top-down, side; default low top-down. |
--template-id |
no | string | Default mannequin. |
--name |
no | string | Display name. |
--seed |
no | integer | Reproducible generation. |
--no-background |
no | bool | Default true. |
--outline |
no | string | Ignored with reference image. |
--detail |
no | string | Ignored with reference image. |
--enhance-prompt |
no | bool | Default false. |
Responses: 200, 401, 402, 422, 429.
Command:
pxlb characters/animations --character-id <uuid> --action-description "walking"Args: same as POST /animate-character.
Responses: 200, 422.
Command:
pxlb animate-character --character-id <uuid> --mode v3 --action-description "walking" --frame-count 8Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--character-id |
yes | string | Existing character. |
--animation-name |
no | string | Display name. |
--description |
no | string | Override character description. |
--action-description |
no | string | Required for custom mode. |
--async-mode |
no | bool | Default true. |
--mode |
no | string | template, v3, or pro/custom modes as supported. |
--template-animation-id |
no | string | Required for template mode. |
--frame-count |
no | integer | Default 8, v3 only, 4-16 even. |
--text-guidance-scale |
no | number | Default 8, template mode only. |
--outline |
no | string | Template mode only. |
--shading |
no | string | Template mode only. |
--detail |
no | string | Template mode only. |
--directions |
no | CSV | Directions to animate. |
--isometric |
no | bool | Default false. |
--color-image |
no | path | Palette image. |
--force-colors |
no | bool | Default false. |
--seed |
no | integer | Reproducible generation. |
--enhance-prompt |
no | bool | Default false. |
Responses: 200, 401, 402, 404, 422, 429.
Command:
pxlb create-character-state --character-id <uuid> --edit-description "wearing red armor"Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--character-id |
yes | string | Source character id. |
--edit-description |
yes | string | 1-1000 chars. |
--no-background |
no | bool | Default true. |
--seed |
no | integer | Reproducible generation. |
--use-color-palette-from-reference |
no | bool | Default false. |
Responses: 200, 400, 401, 402, 404, 422, 429.
Command:
pxlb characters --limit 50 --offset 0Args: --limit, --offset.
Responses: 200, 401, 422, 429.
Command:
pxlb characters/<character_id>Args: none; put the character id in the route.
Responses: 200, 401, 403, 404, 422, 429.
Command:
pxlb characters/<character_id> --http-method deleteArgs: none; put the character id in the route.
Responses: 200, 422.
Command:
pxlb characters/<character_id>/zip --out character.zipArgs: put the character id in the route; --out recommended.
Responses: 200, 404, 422, 423.
Command:
pxlb characters/<character_id>/tags --tag wizard --tag fireArgs:
| Arg | Required | Type | Notes |
|---|---|---|---|
--tag |
yes | repeatable string | Up to 20 tags. |
Responses: 200, 400, 401, 403, 404, 422, 429.
Command:
pxlb create-1-direction-object --description "wooden barrel" --size 128 --view sidescrollerArgs:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | 1-2000 chars. |
--size |
no | integer | Square size 32-256, default 64. Mutually exclusive with style images. |
--view |
no | enum | top-down, sidescroller; default top-down. |
--style-image |
no | repeatable path | PNG/JPEG max 256x256. |
--item-description |
no | repeatable string | Per-object descriptions for review packs. |
Responses: 200, 401, 402, 422, 429.
Command:
pxlb create-8-direction-object --description "stone fountain" --size 128 --view "low top-down"Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | 1-2000 chars. |
--size |
no | integer | Square size 32-256, default 64. |
--view |
no | enum | low top-down, high top-down, side; default low top-down. |
--reference-image |
no | path | Rotates exact image. Mutually exclusive with style image and size. |
--style-image |
no | path | Style reference. Mutually exclusive with reference image and size. |
Responses: 200, 401, 402, 422, 429.
Command:
pxlb objects/<object_id>/animations --animation-description "walking" --display-name walk --frame-count 8Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--mode |
no | enum | pro, v3; default v3. |
--animation-description |
no | string | Required for new animations. |
--directions |
no | CSV | Do not pass for 1-direction objects. |
--animation-group-id |
no | string | Extend existing animation group. |
--display-name |
no | string | UI/export name. |
--frame-count |
no | integer | v3 even 4-16; pro depends on canvas. |
--replace-existing |
no | bool | Default false. |
--custom-start-frame |
no | path | v3 only. |
--end-frame |
no | path | v3 interpolation target. |
--enhance-prompt |
no | bool | Default false. |
Responses: 200, 400, 401, 402, 404, 409, 422, 429.
Command:
pxlb objects/<object_id>/states --edit-description "make it golden"Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--edit-description |
yes | string | 1-1000 chars. |
--seed |
no | integer | Reproducible generation. |
Responses: 200, 400, 401, 402, 404, 422, 429.
Command:
pxlb objects/<object_id>/select-frames --index 0 --index 3 --common-tag propsArgs:
| Arg | Required | Type | Notes |
|---|---|---|---|
--index |
yes | repeatable integer | 0-based frame index. |
--common-tag |
no | string | Applied to created objects. |
Responses: 200, 400, 401, 404, 422.
Command:
pxlb objects/<object_id>/dismiss-reviewArgs: none; put the object id in the route.
Responses: 200, 400, 401, 404, 422.
Command:
pxlb objects --limit 50 --offset 0Args: --limit, --offset.
Responses: 200, 401, 422.
Command:
pxlb objects/<object_id>Args: none; put the object id in the route.
Responses: 200, 401, 403, 404, 422.
Command:
pxlb objects/<object_id> --http-method deleteArgs: none; put the object id in the route.
Responses: 200, 401, 403, 404, 422.
Command:
pxlb objects/<object_id>/tags --tag barrel --tag propArgs:
| Arg | Required | Type | Notes |
|---|---|---|---|
--tag |
yes | repeatable string | Up to 20 tags. |
Responses: 200, 400, 401, 403, 404, 422.
Command:
pxlb enhance-pixen-prompt --description "dragon" --image-size 128x128Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | 1-2000 chars. |
--image-size |
yes | size | Target size. |
--outline |
no | enum | Outline. |
--detail |
no | enum | Default highly detailed. |
--view |
no | enum | CameraView. |
--direction |
no | enum | Direction. |
--no-background |
no | bool | Default false. |
Responses: 200, 401, 402, 422.
Command:
pxlb enhance-character-v3-prompt --description "blue wizard" --image-size 64x64Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--description |
yes | string | 1-2000 chars. |
--image-size |
yes | size | Target size. |
--view |
no | enum | low top-down, high top-down, side; default low top-down. |
--outline |
no | string | Outline hint. |
--detail |
no | string | Detail hint. |
Responses: 200, 401, 402, 422.
Command:
pxlb enhance-animation-v3-prompt --first-frame idle.png --action "walking"Args:
| Arg | Required | Type | Notes |
|---|---|---|---|
--first-frame |
yes | path | First frame image. |
--last-frame |
no | path | Optional end frame. |
--action |
yes | string | 1-500 chars. |
Responses: 200, 401, 402, 422.
For readable combat animations, prefer controlled keyframes over pure text-only generation when possible. The v3 animation docs classify 4 frames as suitable for simple loops or idles, 8 frames as standard movement, and 16 frames as the better fit for complex actions such as attack combos.
Recommended combat workflow:
- Start from a clean idle or ready frame that already contains the weapon and silhouette you want preserved.
- Create or choose an end-pose frame with the weapon fully extended or the strike clearly readable.
- Use v3 interpolation through
POST /objects/{object_id}/animationswith--custom-start-frameand--end-frame, or usePOST /animate-with-text-v3with--first-frameand--last-frame. - Use
--frame-count 8for short attacks and--frame-count 16for heavy attacks, combos, or wind-up plus recovery. - Keep the prompt action-focused: describe wind-up, strike, follow-through, and recovery, and explicitly forbid walking, jumping, camera movement, new props, and background changes when those are unwanted.
Object animation example:
pxlb objects/<object_id>/animations \
--animation-description "aggressive sword attack: deep wind-up, heavy forward slash, strong follow-through, recover to idle; feet stay planted; big readable weapon motion; no walking, no jumping, no camera movement, no new objects, no background" \
--display-name sword_attack \
--frame-count 16 \
--custom-start-frame idle.png \
--end-frame slash_pose.png \
--waitStandalone v3 example:
pxlb animate-with-text-v3 \
--first-frame idle.png \
--last-frame slash_pose.png \
--action "heavy sword slash with planted feet, clear wind-up, strike, follow-through, and recovery" \
--frame-count 16 \
--waitAvoid relying on --enhance-prompt for precise combat intent until the enhanced prompt is inspected. It can soften a hard attack into subtle motion, which may make the result read as an idle or gesture instead of combat.
- Use
net/httpandencoding/jsoninitially; no generated client is required for phase one. - Keep a schema map for endpoint metadata so every command can be routed through a single generic request builder.
- Normalize flag names by converting JSON snake_case to CLI kebab-case.
- Preserve
--body-jsonso new API fields can be used before typed flags are added. - Decode path placeholders from flags before request execution.
- Encode repeated flags into arrays.
- Encode size flags into
{ "width": W, "height": H }objects. - Convert file flags into
Base64Imageobjects. - Save binary/ZIP responses directly when content type is not JSON.
- For JSON image responses, support
--outby walking known response image fields and writing decoded base64 data when present. - For async responses, detect
background_job_id,job_id,id, or equivalent job fields conservatively, then useGET /background-jobs/{job_id}for--wait. - Return non-zero exit codes for non-2xx responses, failed jobs, file decoding failures, and timeout.
Support every endpoint from the start through the generic path dispatcher. Typed convenience parsing should still cover the documented flags above, with --body-json as the compatibility fallback for complex or uncommon request shapes.