Endpoints
Images
POST https://relumen.ai/v1/images/generations
Generate an image with a model available to your key's group. Image models use the Images endpoint rather than Chat Completions.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer YOUR_API_KEY |
Content-Type | Yes | application/json |
Body
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Exact image-model call name from Model Plaza. |
prompt | string | Yes | Describe the image to generate. |
size | string | Model-dependent | Image dimensions supported by the selected model. |
n | integer | Model-dependent | Number of images to generate. |
response_format | string | Model-dependent | Output format, such as b64_json, when supported. |
Parameter support varies by image model. The example follows the image-generation format in the source guide; check the model's current options before changing size, count, or output format.
Example request
Replace both placeholders. Select a model that supports the parameters shown.
curl https://relumen.ai/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_MODEL_ID",
"prompt": "An orange cat beside a window in a cyberpunk city",
"size": "1024x1024",
"n": 1,
"response_format": "b64_json"
}'Connect an image client
Select an Images or Image Generation client type and set the base URL to https://relumen.ai/v1. Use a supported image model, including a supported Grok image model when available to your group.
Channel monitoring may test text requests only. Confirm image availability with the Images endpoint itself. See Errors & troubleshooting if the call fails.