Letzai API
Generate AI images and videos via the LetzAI API. Images with Nano Banana Pro, Seedream 5, Flux 2, GPT Image 2; videos with Veo 3.1, Kling V3, Seedance 2.0. Includes context editing, upscaling, asset uploads, and custom @model training. Use for content creation apps and automation.
- Skill ID
- letz-ai/letzai-skill/letzai-api
- Publisher
- letz-ai
- Repository
- letzai-skill
- Installs
- 0
- Files
- 8
- License
- MIT
- Synced
- Sep 23, 2026
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
letz-ai/letzai-skill/letzai-apiInstalls these files- LICENSE.txt
- README.md
- SKILL.md
- api_reference.md
- examples/image_generation.js
- examples/polling_pattern.md
- examples/uploads_and_training.md
- examples/video_generation.py
What this skill tells the agent
LetzAI API Integration Skill
Overview
Helps you integrate the LetzAI public API for AI image and video generation, editing, upscaling, asset uploads, and custom model (LoRA) training. Custom-trained models for persons, objects and styles are referenced inside prompts with @modelname.
Authentication
- Base URL:
https://api.letz.ai - Auth:
Authorization: Bearer YOUR_API_KEY - Get an API key: letz.ai/subscription
- Swagger (source of truth): api.letz.ai/doc — machine-readable at
/doc-jsonand/doc-yaml
const headers = {
'Content-Type': 'application/json',
Authorization: `Bearer ${process.env.LETZAI_API_KEY}`,
};headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.environ['LETZAI_API_KEY']}",
}Do not confuse the public API with the private one.https://api.letz.aiis the public developer API described here.https://private-api.letz.aipowers the LetzAI web app and has different route names (/upscales,/image_completions,/video-edits). Those routes 404 on the public API.
Unknown-field rejection
The API validates request bodies strictly. Sending a field that is not in the schema returns 400. In particular there is no negativePrompt, seed or aspectRatio on POST /images — aspect ratio is expressed via width/height.
Core Workflows
1. Image Generation — POST /images
| Parameter | Type | Default | Notes |
|---|---|---|---|
prompt | string | — | Required. May contain @modelname tags. |
baseModel | string | account default | See model table below. |
mode | string | model default | Resolution tier — allowed values differ per model. |
width | int | 1600 | 480–2160 |
height | int | 1600 | 480–2160 |
quality | int | 2 | 1–6 |
creativity | int | 2 | 1–6 |
hasWatermark | bool | true | |
systemVersion | int | account default | 2 or 3 |
hideFromUserProfile | bool | false | |
webhookUrl | string | — | POSTed when the job finishes. |
organizationId | UUID | — | Bill credits to an org you belong to. |
Image models
mode is the resolution tier, and the accepted values are model-specific.
| Model | baseModel | mode values | Credits (generate) | Credits (edit) |
|---|---|---|---|---|
| Nano Banana Pro (Google) | gemini-3-pro-image | default (1K) · 2k (HD) · 4k | 80 / 160 / 240 | 80 / 160 / 240 |
| Nano Banana 2 (Google) | nbf-inferencesh | default (1K) · 2k (HD) · 4k | 40 / 80 / 160 | 50 / 100 / 150 |
| Nano Banana 2 Lite (Google) | nano-banana-2-lite | default (1K) | 20 | 25 |
| Seedream 5 Pro (ByteDance) | seedream-5-0-pro | 2k (HD) · 4k | 80 / 160 | 80 / 160 |
| Seedream 4.5 (ByteDance) | seedream-4-5-251128 | 2k (HD) · 4k | 80 / 160 | 80 / 160 |
| Flux 2 (Black Forest Labs) | flux2 | 1k · hd | 60 / 120 | 60 / 120 |
| GPT Image 2 (OpenAI) | gpt-image-2 | 1k · hd · 4k | 160 / 240 / 480 | 160 / 240 / 480 |
| WAN 2.7 Image Pro (Alibaba) | wan-2-7-image-pro | 1k · 2k | 10 | 10 |
Aliases are accepted, e.g. gemini-3-pro-image-preview still resolves to Nano Banana Pro. The live catalogue with pricing lives at letz.ai/docs/models.json.
Workflow
POST /images- Read
idfrom the response - Poll
GET /images/{id}every 3 s - On
status === "ready", readimageVersions.original
See examples/image_generation.js.
2. Video Generation — POST /videos
| Parameter | Type | Notes |
|---|---|---|
prompt | string | Required. |
originalImageCompletionId | UUID | Animate a previously generated LetzAI image. |
imageUrl | string | Animate a public image URL. |
imageUrls | string[] | Multi-frame: [0] = first frame, [1] = last frame. |
prompts | object[] | Multi-shot storyboards (video-kling3): [{ prompt, duration }]. |
baseModel | string | Optional; settings.mode is the usual selector. |
width / height / resolution | number | Optional output sizing. |
settings | object | Model + duration + audio (below). |
webhookUrl | string | |
hidePrompt | bool | |
organizationId | UUID |
Image input is optional — omit all of originalImageCompletionId / imageUrl / imageUrls for pure text-to-video.
settings
| Field | Notes |
|---|---|
mode | Video model key — see table. |
duration | Seconds, clamped to the model's allowed values. |
withSound | Enable native audio where supported. |
highQuality | Higher-resolution tier; usually doubles the price. |
resolution | "720p", "1080p", "4k" for per-second-priced models. |
Video models
Use the `video-` prefixed key as settings.mode.
| Model | settings.mode | Duration | Credits | |
|---|---|---|---|---|
| Google Veo 3.1 | video-veo31 | 8 s (fixed) | 1500 · ×2 with audio · ×2 at 1080p | |
| Kling V3 | video-kling3 | 3–15 s | 150 · 300 with audio | |
| Kling V2.6 | video-kling26 | 5 or 10 s | 150 · ×2 with audio · ×2 at 1080p | |
| WAN 2.5 | video-wan25 | 5 or 10 s | 110 · ×2 at 1080p (image-to-video only) | |
| Seedance 2.0 | video-seedance2 | 4–15 s | per second: 105 @480p · 210 @720p · 500 @1080p · 1000 @4K (audio always on) | |
| Seedance 2.0 Enterprise | video-seedance2-enterprise | 4–15 s | same as Seedance 2.0; requires organizationId | only available to Enterprise Customers with an active organization |
| Gemini Omni Flash | video-gemini-omni | 3–10 s | 100 per second (audio always on) |
Workflow
POST /videos- Poll
GET /videos/{id}every 2–3 s - On
status === "ready", readvideoVersions.original
See examples/video_generation.py.
3. Image Editing — POST /image-edits
| Parameter | Type | Notes |
|---|---|---|
mode | string | Required. context (AI editing) or skin (skin fix). |
prompt | string | Edit instruction. May contain @modelname tags. |
imageUrl | string | Single source image URL. |
inputImageUrls | string[] | Multi-reference source images (up to 9 in practice). |
originalImageCompletionId | UUID | Edit a previously generated LetzAI image. |
originalImageCompletionIds | UUID[] | Several LetzAI images as sources. |
baseModel | string | Same identifiers as image generation. |
settings | object | { resolution, aspect_ratio, model } |
imageCompletionsCount | int | Variations to generate (1–5, default 1). Not used by skin. |
mask | string | Base64 mask, legacy inpainting only. |
width / height | number | Target dimensions. |
webhookUrl, organizationId, hidePrompt |
settings:
resolution:"2k"(HD) or"4k"(Ultra HD)aspect_ratio:"1:1","16:9","9:16","4:3","3:4","21:9","9:21"model: same identifiers asbaseModel
Provide at least one source: imageUrl, inputImageUrls, originalImageCompletionId or originalImageCompletionIds.
Prefer the top-level `baseModel`. Server-side queue routing reads baseModel; settings.model is forwarded to the worker. Setting both to the same value is safest.
Workflow
POST /image-edits- Poll
GET /image-edits/{id}every 3 s - On
status === "ready", readgeneratedImageCompletion.imageVersions.original
mode: "in" (inpainting) and mode: "out" (outpainting) are deprecated — use context.
4. Upscaling — POST /upscale
The public route is `/upscale` (singular). /upscales is the private web-app route and returns 404 here.| Parameter | Type | Default | Notes |
|---|---|---|---|
imageId | UUID | — | A LetzAI image completion ID. |
imageUrl | string | — | Public image URL. Use instead of imageId. To upscale your own file, upload it via /user-assets and pass the returned imageUrl. |
Use this skill in a project
Open any RiverX project, search the Skills panel for letz-ai/letzai-skill/letzai-api, and install it in one click.
