Arli AI REST API documentation
Direct Arli API: https://api.arliai.com
Proxy (no key needed): https://generate.kim8.s4s.host/api
Image endpoints on the proxy map to Arli's /sdapi/v1/ prefix (e.g., /api/txt2img → /sdapi/v1/txt2img). Text endpoints map to /v1/.
All requests require a Bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Image generation endpoints use ARLI_IMAGE_KEY. Text/chat endpoints use ARLI_TEXT_KEY.
Generate images from a text prompt.
| Parameter | Type | Required | Description |
| sd_model_checkpoint | string | No | Model name (use GET /sdapi/v1/sd-models) |
| prompt | string | Yes | Text description of the desired image |
| negative_prompt | string | No | Elements to exclude from the image |
| steps | integer | No | Denoising steps (1-150, default: 30) |
| sampler_name | string | No | Sampling method (default: "Euler a") |
| width | integer | No | Image width (64-2048, default: 1024) |
| height | integer | No | Image height (64-2048, default: 1024) |
| seed | integer | No | Random seed (-1 for random) |
| cfg_scale | float | No | Classifier free guidance (1-20, default: 7.0) |
| batch_size | integer | No | Number of images (1-4, default: 1) |
curl -X POST https://api.arliai.com/v1/txt2img \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_IMAGE_KEY" \
-d '{
"prompt": "a sunset over mountains, photorealistic",
"negative_prompt": "blurry, low quality",
"steps": 30,
"sampler_name": "Euler a",
"width": 1024,
"height": 1024,
"cfg_scale": 7.0
}'
{
"images": ["iVBORw0KGgoAAAANSUhEUg... (base64)"],
"info": "..."
}
Transform an existing image using a text prompt.
| Parameter | Type | Required | Description |
| init_images | array | Yes | Array of base64-encoded source images |
| prompt | string | Yes | Text description of the transformation |
| negative_prompt | string | No | Elements to exclude |
| steps | integer | No | Denoising steps (default: 30) |
| sampler_name | string | No | Sampling method |
| denoising_strength | float | No | How much to transform (0-1, default: 0.75) |
| width | integer | No | Output width (default: 1024) |
| height | integer | No | Output height (default: 1024) |
| seed | integer | No | Random seed (-1 for random) |
| cfg_scale | float | No | Classifier free guidance (default: 7.0) |
| mask | string | No | Base64 mask image (white = keep original) |
curl -X POST https://api.arliai.com/v1/img2img \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_IMAGE_KEY" \
-d '{
"init_images": ["BASE64_IMAGE_HERE"],
"prompt": "turn into a watercolor painting",
"denoising_strength": 0.75,
"steps": 30
}'
Upscale an image using a selected upscaler model.
| Parameter | Type | Required | Description |
| image | string | Yes | Base64-encoded image to upscale |
| upscaler_1 | string | No | Upscaler model name (use GET /v1/upscalers) |
curl -X POST https://api.arliai.com/v1/upscale-img \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_IMAGE_KEY" \
-d '{
"image": "BASE64_IMAGE_HERE",
"upscaler_1": "RealESRGAN_x4plus"
}'
OpenAI-compatible chat completions (text generation). Supports vision with base64 images.
| Parameter | Type | Required | Description |
| model | string | Yes | Model ID (use GET /v1/models) |
| messages | array | Yes | Chat messages array |
| temperature | float | No | Sampling temperature |
| max_tokens | integer | No | Max tokens to generate |
{
"model": "gpt-4o",
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "Describe this image"},
{"type": "image_url", "image_url": {"url": "data:image/png;base64,BASE64_HERE"}}
]
}]
}
Note Vision supports base64 images only (not URLs).
| Endpoint | Auth | Description |
| GET /v1/models | Text Key | List available text/chat models |
| GET /sdapi/v1/sd-models | Image Key | List available image generation models (array of name strings) |
| GET /v1/img-samplers | Image Key | List available samplers |
| GET /v1/upscalers | Image Key | List available upscaler models |
| GET /v1/img-options | Image Key | Get current image generation options |
| Code | Description |
| 400 | Bad request — missing or invalid parameters |
| 401 | Unauthorized — invalid or missing API key |
| 404 | Not found — endpoint or model not found |
| 429 | Rate limited — too many requests |
| 500 | Internal server error |
| 502 | Upstream error — Arli API returned an error |
Maximum 6 parallel requests. Exceeding this will return HTTP 429.
Request timeout: 300 seconds for image generation, 30 seconds for listing endpoints.