Rend API

Endpoints

Images

One picture per request, in the OpenAI images format, from rend-image: Rend’s own picture engine, with no editorial filter, up to 4K, priced by the pixels it makes. Your prompt goes to the model as written. Send up to 16 reference pictures to keep a face, a product or a style.

Request body

POSThttps://rend.ai/api/v1/images/generations

Field Type Description
prompt string required What to make, up to 12,000 characters. Sent to the model as written.
model string rend-image, the default and only picture model. Like every model it needs the account’s 18+ terms.
size string 1024x1024 (the default), 1024x1536, 1536x1024 or 1008x1792, each made at its shape at about 4 megapixels. Larger pictures, up to 4K: 2048x2048, 1920x1080, 1080x1920, 2560x1440, 1440x2560, 3840x2160, 2160x3840, 4096x4096, or any WxH with sides that are multiples of 32, at least 256, up to 16.8 megapixels. Sizes like 1920x1080 are made at the nearest multiple of 32 (1920x1088); the reply’s size says what was made.
output_format string png (the default) or jpeg. Pictures above 4.2 megapixels always come back as JPEG.
images array Reference pictures. Each item is an https address, a data URI, plain base64, {"url": "..."} or {"image_url": {"url": "..."}}. PNG, JPEG or WebP, up to 3 MiB each and 12 MiB in all. Up to 16.
n integer Always 1.
response_format string b64_json (the default) returns the picture in the reply. url returns only a signed link, valid 24 hours.
store boolean false deletes the saved file after 24 hours, whatever the plan. The default is true.
project string A project id of yours. The picture is also added to that project’s media.
folder string The Library folder to save in, made if missing. The default is API.
tags array Up to 10 short words added to the file’s tags in the Library.

Reference addresses must be public https addresses. Rend follows up to 3 redirects and refuses private networks and IP addresses.

Example
POST/v1/images/generations
curl https://api.rend.ai/v1/images/generations \
-H "Authorization: Bearer $REND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "model": "rend-image",
  "prompt": "A red bicycle against a yellow wall, morning light, 35mm film",
  "size": "1024x1536"
}' | jq -r '.data[0].b64_json' | base64 --decode > bicycle.png

With reference pictures

Send up to 16 pictures in images. Each is an https address or a base64 picture.

curl https://api.rend.ai/v1/images/generations \
-H "Authorization: Bearer $REND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "model": "rend-image",
  "prompt": "The woman from the first picture holding the bottle from the second, on a beach at sunset",
  "images": ["https://example.com/model.jpg", "https://example.com/bottle.png"]
}'

Response

Decode b64_json to get the picture (output_format says PNG or JPEG; size what was made). Every picture is also saved in your Library: file_id is its permanent id, url a signed link that lasts 24 hours (url_expires_at), and expires_at when the file is deleted, or null while you keep it (see Where results go). storage_note explains a 24-hour file. usage.cost is what the picture cost, in dollars. The x-request-id header carries the request’s id.

ResponseJSON
{
  "created": 1796500000,
  "model": "rend-image",
  "output_format": "png",
  "data": [{
    "b64_json": "iVBORw0KGgo...",
    "file_id": "file_3f9a0c1d2b7e4a6f8c0d1e2f",
    "url": "https://rend.ai/api/media/...?grant=...",
    "url_expires_at": 1796586400,
    "expires_at": null
  }],
  "usage": { "images": 1, "cost": 0.1, "tier": "4mp" }
}

Save to a project or folder

Name a project to add the picture to that project’s media, a folder to file it in the Library, and tags to find it later. Send response_format: "url" to get a link instead of base64.

curl https://api.rend.ai/v1/images/generations \
-H "Authorization: Bearer $REND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "prompt": "A red bicycle against a yellow wall",
  "project": "project-1a2b3c",
  "folder": "Spring campaign",
  "tags": ["bicycle", "spring"],
  "response_format": "url"
}' | jq -r '.data[0].url'

Price

Each picture delivered costs one flat price for the pixels it makes:

Tier Size made Price
4mp Up to 4.2 megapixels: every named size, 2048x2048, 2560x1440 and smaller 10¢
8mp Up to 8.4 megapixels: 4K UHD, 3840x2160 20¢
16mp Up to 16.8 megapixels: 4096x4096 35¢

The reply’s usage.tier names the tier and usage.cost the price. GET /v1/models lists the live prices. A picture that is refused or fails costs nothing.

Errors

Status Code Why
400 content_policy_violation The prompt or the finished picture was refused. Nothing is charged.
400 image_refused The model could not make this picture. Nothing is charged.
400 (none) A bad field, an unreadable reference or references over the limits. The message says which.
403 project_not_owned project is shared with you; files can only join your own projects.
404 project_not_found No project with that id on this account. Nothing is charged.
402 insufficient_credit Not enough credit for the picture.
403 adult_confirm The account has not accepted the 18+ terms. Accept them once.
503 (none) Pictures are briefly unavailable. Nothing is charged; try again shortly.