Base URL: https://selenix.go.ro
Generate your first image in two steps:
Register an account to get $2.00 free credits. Then find your API key on the API Keys page. You can create additional keys and label them for different projects.
curl -X POST https://selenix.go.ro/v1/images/generations \
-H "Authorization: Bearer sk-trial-abc123..." \
-H "Content-Type: application/json" \
-d '{"prompt": "a cat on a windowsill at golden hour"}'
{
"created": 1743724800,
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"data": [{"url": "https://selenix.go.ro/outputs/Flux2_00001_.png"}]
}
That's it. The default mode waits for completion and returns the image URL directly.
?async_mode=true to any generation endpoint to return immediately with a job ID. Then poll /v1/jobs/{job_id} or use SSE streaming to track progress.All generation and account endpoints require an API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
API keys come in two types:
| Type | Prefix | How to get |
|---|---|---|
| Trial | sk-trial- | Register an account ($2.00 free credits) |
| Paid | sk-gen- | Purchase credits on the website or via Stripe |
Some endpoints accept the key as a query parameter ?key=YOUR_KEY instead (noted where applicable).
POST /v1/images/generations
Generate images using the Flux.2-dev model. Cost: $0.02 per image.
curl -X POST https://selenix.go.ro/v1/images/generations?async_mode=true \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "a serene Japanese garden with cherry blossoms",
"width": 1344,
"height": 768,
"steps": 20
}'
| Field | Type | Default | Description |
|---|---|---|---|
prompt | string | required | What to generate |
model | string | flux2-dev | Model to use |
width | int | 1024 | Image width (512–2048, multiple of 64) |
height | int | 1024 | Image height (512–2048, multiple of 64) |
steps | int | 20 | Sampling steps (8–50). More = higher quality, slower |
cfg | float | 4.0 | Guidance scale (1.0–10.0). Higher = more literal prompt |
seed | int | -1 | Seed for reproducibility. -1 = random |
input_files | list[str] | null | Filenames for img2img (upload first via /v1/uploads) |
{
"created": 1743724800,
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"data": [{"url": "https://selenix.go.ro/outputs/Flux2_00001_.png"}]
}
?async_mode=true){
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "queued"
}
input_files is provided, the workflow automatically switches to img2img mode. Use filenames from /v1/uploads or output files from previous generations.POST /v1/video/generations
Generate video using LTX-2.3 models. Cost: $0.04 per second of video.
curl -X POST https://selenix.go.ro/v1/video/generations?async_mode=true \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "a cat walking across a wooden floor, cinematic lighting",
"model": "ltx-2.3",
"num_frames": 121,
"width": 960,
"height": 544
}'
| Field | Type | Default | Description |
|---|---|---|---|
prompt | string | required | What to generate |
negative_prompt | string | "" | What to avoid in the video |
model | string | ltx-2.3 | ltx-2.3 (standard, higher quality) or ltx-2.3-fast (faster, single-stage) |
width | int | 960 | See supported resolutions below |
height | int | 544 | See supported resolutions below |
num_frames | int | 121 | Number of frames (25–241). Duration = frames / 24 fps |
fps | int | 24 | Fixed at 24 (model-trained frame rate) |
seed | int | -1 | Seed for reproducibility. -1 = random |
input_files | list[str] | null | Reference image for img2vid (max 1) |
| Aspect ratio | Input (width x height) | Output (2x upscaled) |
|---|---|---|
| Landscape 16:9 | 960 x 544 | 1920 x 1088 |
| Portrait 9:16 | 544 x 960 | 1088 x 1920 |
| Square 1:1 | 768 x 768 | 1536 x 1536 |
Sending other width/height combinations will return a validation error.
cost = (num_frames / fps) * $0.04
Example: 121 frames / 24 fps = ~5.04 seconds = $0.20
POST /v1/uploads
Upload an image for use with img2img or img2vid. Max file size: 20 MB. Duplicate uploads are automatically deduplicated.
curl -X POST https://selenix.go.ro/v1/uploads \ -H "Authorization: Bearer YOUR_KEY" \ -F "file=@photo.png"
{
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"filename": "a1b2c3d4_photo.png",
"original_filename": "photo.png",
"format": "png",
"width": 1024,
"height": 1024,
"frame_count": 1,
"size_bytes": 524288,
"deduplicated": false
}
Use the filename value in the input_files array when generating.
GET /v1/uploads/mine?limit=20&offset=0
curl https://selenix.go.ro/v1/uploads/mine \ -H "Authorization: Bearer YOUR_KEY"
GET /v1/generations/mine?limit=20&offset=0
curl https://selenix.go.ro/v1/generations/mine \ -H "Authorization: Bearer YOUR_KEY"
Returns output files from your completed jobs. Use these filenames in input_files for img2img or img2vid.
When using async_mode=true, use these endpoints to track your generation.
GET /v1/jobs/{job_id}
curl https://selenix.go.ro/v1/jobs/550e8400-e29b-41d4-a716-446655440000 \ -H "Authorization: Bearer YOUR_KEY"
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"job_type": "image",
"model_id": "flux2-dev",
"status": "completed",
"progress": {"step": 20, "total_steps": 20, "stage": 1, "stage_label": "Sampling"},
"params": {"prompt": "a cat on a windowsill", "width": 1024, "height": 1024, "steps": 20},
"input_files": [],
"output_files": ["Flux2_00001_.png"],
"units": 1.0,
"cost_usd": 0.02,
"error_message": null,
"queued_at": "2026-04-03T12:34:56",
"started_at": "2026-04-03T12:35:01",
"completed_at": "2026-04-03T12:35:30"
}
Status values: queued → loading_model → processing → completed or failed
GET /v1/jobs/{job_id}/stream?key=YOUR_KEY
Server-Sent Events stream with real-time step-by-step progress updates. Connect with any SSE client:
curl -N "https://selenix.go.ro/v1/jobs/550e8400.../stream?key=YOUR_KEY"
Events: processing (with step/total), completed (with output URLs), failed, ping (keep-alive).
GET /v1/jobs/stream/user?key=YOUR_KEY
A global SSE stream for all your jobs. Useful for dashboards and real-time notifications across multiple generations.
GET /v1/jobs/active
curl https://selenix.go.ro/v1/jobs/active \ -H "Authorization: Bearer YOUR_KEY"
Returns your jobs that are currently queued, loading_model, or processing.
GET /v1/jobs/estimate?workflow_id=flux2-dev:txt2img
curl "https://selenix.go.ro/v1/jobs/estimate?workflow_id=flux2-dev:txt2img"
{"avg_seconds": 25.3, "sample_count": 142}
Average processing time based on recent completed jobs. No auth required.
Register an account to receive $2.00 in free credits (~100 images or ~50 seconds of video). Your API key is available on the API Keys page.
You can create multiple API keys and label them for different projects. All keys share the same account balance.
GET /v1/credits
curl https://selenix.go.ro/v1/credits \ -H "Authorization: Bearer YOUR_KEY"
{"balance_usd": 1.85, "is_trial": true, "last_used_at": "2026-04-03T12:00:00Z"}
GET /v1/usage?limit=50
curl https://selenix.go.ro/v1/usage \ -H "Authorization: Bearer YOUR_KEY"
{
"usage": [
{
"job_type": "image",
"model_id": "flux2-dev",
"units": 1.0,
"cost_usd": 0.02,
"prompt_preview": "a cat on a windowsill at golden...",
"ts": "2026-04-03T12:35:30Z"
}
]
}
GET /v1/queue/status — No auth required
curl https://selenix.go.ro/v1/queue/status
{"status": "idle", "queue_running": 0, "queue_pending": 0, "estimated_wait_seconds": 0}
GET /health — No auth required
curl https://selenix.go.ro/health
{"status": "ok", "comfyui": "up", "lmstudio": "up", "vram_free_gb": 28.5}
| Code | Meaning | What to do |
|---|---|---|
| 400 | Invalid parameters | Check dimensions, steps, frame count, or file count |
| 401 | Missing or invalid API key | Include Authorization: Bearer YOUR_KEY header |
| 402 | Insufficient credits | Top up your balance |
| 403 | File not accessible | You can only use your own uploads/outputs as input_files |
| 409 | Trial already exists | Use the key from your original trial, or purchase credits |
| 413 | Upload too large | Max file size is 20 MB |
| 504 | Generation timed out | Try again. Complex prompts or high step counts take longer |
| 500 | Generation failed | Credits are automatically refunded on failure |
| Type | Cost | Notes |
|---|---|---|
| Image (Flux.2) | $0.02 per image | Any resolution, any step count |
| Video (LTX-2.3) | $0.04 per second | Duration = num_frames / 24 fps |
| Tier | Price | ~Images | ~Video |
|---|---|---|---|
| Free trial | $2.00 | ~100 | ~50 seconds |
| Starter | $5.00 | ~250 | ~125 seconds |
| Pro | $20.00 | ~1,000 | ~500 seconds |
| Max | $50.00 | ~2,500 | ~1,250 seconds |
Questions? Contact us or check /health for system status.