Generate images from a local runtime.
OpenAI-compatible image generation against an installed local runtime that serves the image modality. Pass a `model` id from `GET /v1/models`.
POST
/v1/images/generations
OpenAI-compatible image generation against an installed local runtime
that serves the image modality. Pass a `model` id from `GET /v1/models`.
Authentication
Bearer Token (b3iq_local) API Key (header: X-B3IQ-API-Key) Bearer Token API Key (header: X-B3IQ-Router-Signature)
Request Body required
application/jsonmodel
string
REQUIRED
prompt
string
REQUIRED
n
integer
size
string
Requested image size, e.g. 512x512.
steps
integer
response_format
string
runtime_id
string
Responses
200
Generated images (base64-encoded by default).
application/jsoncreated
integer
data
object[]
Array of:
b64_json
string
default
B3IQ-native problem response.
curl -X POST 'http://127.0.0.1:8831/v1/images/generations' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "model": "string", "prompt": "string", "n": 1, "size": "string", "steps": 0, "response_format": "string", "runtime_id": "string"}'
const response = await fetch('http://127.0.0.1:8831/v1/images/generations', { method: 'POST', headers: { "Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json" }, body: JSON.stringify({ "model": "string", "prompt": "string", "n": 1, "size": "string", "steps": 0, "response_format": "string", "runtime_id": "string" })});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('http://127.0.0.1:8831/v1/images/generations', headers=headers, json={ "model": "string", "prompt": "string", "n": 1, "size": "string", "steps": 0, "response_format": "string", "runtime_id": "string"})print(response.json())
200
Response
{ "created": 123, "data": [ { "b64_json": "<string>" } ]}
API Playground
Try this endpoint
POST
/v1/images/generations

