Image Generation
Generate NSFW-capable images through OffRail's OpenAI-compatible image route.
Image Generation
Create images with POST /v1/images/generations. Select the image model from
the public catalogue; its model page is the source
of truth for pricing and supported behavior.
Request
curl "https://api.offrail.ai/v1/images/generations" \
-H "Authorization: Bearer $OFFRAIL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-image-2-0",
"prompt": "Cinematic portrait, warm neon rim light, fine film grain"
}'| Field | Required | Description |
|---|---|---|
model | Yes | Public image model ID |
prompt | Yes | Description of the image to generate |
size | Model-specific | Requested dimensions when supported |
quality | Model-specific | Requested quality when supported |
Response
The route returns a generated result or a task response according to the model contract. Your integration should read the documented response shape instead of assuming every image model is synchronous.
{
"created": 1788000000,
"data": [
{
"url": "https://example.com/generated-image.png"
}
]
}Image editing and vision-assisted workflows are not part of the first public preview.
Content boundaries
The route is intended for adult content involving adults. Minors, non-consensual content, and real-person impersonation remain prohibited. You must have the rights to submitted source material.
When the provider's content filter blocks a generation, the request fails with
HTTP 400 and error.code set to moderation_blocked, matching OpenAI's images
API. The request is still recorded in your activity history.
See the image API reference for the complete request and response schema.

