Image reference
Generate, edit, and vary images across providers.
Endpoints
| Method | Path | Scope | Description |
|---|---|---|---|
| POST | /v1/image/generate | image:generate | Text-to-image generation. Returns a job id. |
| POST | /v1/image/edit | image:edit | Edit an image with an instruction prompt + optional mask. |
Quickstart
curl -X POST https://api.valienz.io/v1/image/generate \
-H "Authorization: Bearer $VALIENZ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-class",
"prompt": "A misty mountain landscape at golden hour",
"size": "1024x1024",
"n": 1
}'Notes
Async by default
Image generation can take 10–60 s. Poll /dashboard/image/requests/{id} or subscribe to image.job.completed via webhooks.
Errors
| Code | HTTP | Description | Resolution |
|---|---|---|---|
| E_CONTENT_POLICY | 400 | Prompt blocked by upstream content policy. | Rephrase the prompt. The error body includes the offending category. |