Images
Image generation from a text description. Size, quality, and number of images depend on the model — their set is listed in the parameters table.
Endpoints
POST
https://api.neuralbridge.ru/v1/images/generationsprimaryImages — generations — Generate an image from a text description.
Parameters
The set depends on the model: on the right — how many models out of 10 accept the parameter. Default and allowed values on the model page.
size9 of 10Result size as a "width×height" string.
width8 of 10Image width in pixels.
height8 of 10Image height in pixels.
seed7 of 10Pins randomness: repeating a request with the same seed and parameters returns the same result.
num_steps4 of 10Number of generation steps: more steps give more detail and take longer.
negative_prompt4 of 10What must NOT appear in the result: list unwanted objects, details or styling.
prompt4 of 10The request text: what you want to get. For video: the scene, camera movement and light; for music: genre, mood, instruments, tempo. The length limit depends on the model.
images3 of 101 to 16 PNG, JPEG or WEBP images: edits, style transfer, building a scene from objects. Up to 25 MB each, 50 MB in total.
reference_images3 of 10How many reference images can be passed.
reference_image_mb3 of 10Megabytes per image.
reference_images_total_mb3 of 10reference_image_formats3 of 10aspect_ratio2 of 10Aspect ratio of the result, for example 16:9, 9:16 or 1:1.
resolution2 of 10Video resolution, for example 720P or 1080P. Also affects the price.
quality2 of 10Generation quality: faster and cheaper versus slower and more detailed.
output_format2 of 10Codec, sample rate and bitrate: for example mp3_44100_128 is MP3, 44.1 kHz, 128 kbit/s; opus_48000_96 is Opus in an Ogg container. auto is the model default.
reference_image_megapixels1 of 10The largest size of one input image in megapixels (millions of pixels). Downscale larger images.
resolution_megapixels1 of 10Megapixels billed for an image of each resolution tier: 768sq and 1k are 1, 1.5k is 2.25, 2k is 4, 4k is 16. Without resolution it is billed as 1k, whatever the size of the edit.
custom_size1 of 10WIDTHxHEIGHT: sides divisible by 16, up to 3840 px, aspect ratio within 3:1, 655,360 to 8,294,400 pixels in total (up to 4K).
size_step1 of 10size_edge1 of 10size_pixels1 of 10size_ratio1 of 10background1 of 10auto lets the model decide, opaque gives a solid background, transparent gives none (PNG and WEBP only).
transparent_formats1 of 10compression_formats1 of 10output_compression1 of 10JPEG and WEBP compression from 0 to 100: lower gives a smaller file with more visible loss.
moderation1 of 10auto is the standard OpenAI filtering, low is less strict. Content banned by OpenAI policies is blocked either way.
complexity1 of 10How much the model plans the image before rendering: low suits simple edits, high (default) helps with dense text, complex layouts and object relations. No price impact; high is slower.
frame_count1 of 10Number of animation frames from 2 to 16 (default 9). More frames are smoother and cost more.
frame_duration_ms1 of 10How many milliseconds each frame is shown: 20 to 2000 (default 200), rounded to 10.
gif_frame_side1 of 10output_image_tokens1 of 10mask1 of 10An image the size of the edited one: white areas are edited, black areas stay as they are.
num_inference_steps1 of 10How many steps the model spends on the image, 1 to 50. Fast models need about 8; more steps take longer and are not always better.
guidance_scale1 of 10How strictly the model follows the prompt, 0 to 20. Fast (Turbo) models need 0, which is their default.
go_fast1 of 10Extra optimisations for lower latency: true or false (false by default).
output_quality1 of 10Compression of a JPG or WEBP image: 0 to 100, higher means better quality and a larger file. PNG is lossless.
enable_safety_filter1 of 10Check the prompt against the model's content policy: true or false (false by default). The most harmful categories are always blocked.
Request example
Models black-forest-labs/flux-1-schnell-08130. For another model, insert its identifier from the table below.
python
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.neuralbridge.ru/v1")
image = client.images.generate(model="black-forest-labs/flux-1-schnell-08130", prompt="Рыжий кот в скафандре")
print(image.data[0].url or image.data[0].b64_json[:64])10 models
flux 1 schnellBlack Forest Labs
black-forest-labs/flux-1-schnell-08130Fast image generation model Black Forest Labs FLUX.1 schnell for text-to-image.
flux 2 devBlack Forest Labs
black-forest-labs/flux-2-dev-08130Image generation model Black Forest Labs FLUX.2 dev for high‑quality text-to-image.
flux 2 klein 4bBlack Forest Labs
black-forest-labs/flux-2-klein-4b-08130Compact image generation model Black Forest Labs FLUX.2 klein 4B for text-to-image.
flux 2 klein 9bBlack Forest Labs
black-forest-labs/flux-2-klein-9b-08130Black Forest Labs FLUX.2 klein 9B image generation model for text-to-image.
FLUX 3 Image KleinBlack Forest Labs
black-forest-labs/flux-3-image-klein-08130A fast Black Forest Labs image model: creates images from text, edits and combines 1–10 of your images, places elements in bounding boxes. Up to 4K, renders text well. Billed per megapixel.
GPT Image 2.6 FlareOpenAI
openai/gpt-image-2.6-flare-08130OpenAI's fast image model: creates an image from text and edits from 1–16 of your images. Six quality levels, custom size up to 4K, transparent background, animated GIF. Billed per token.
xai/grok-imagine-image-2.0-08130A precise xAI image model: images from text, edits and composition from 1–5 images, mask edits. Strong at text and layout, including Cyrillic. 1K or 2K, 13 aspect ratios, one price per image plus a charge per input image.
lucid originLeonardo AI
leonardo/lucid-origin-08130Image generation model Leonardo Lucid Origin for text-to-image.
phoenix 1.0Leonardo AI
leonardo/phoenix-1.0-08130Image generation model Leonardo Phoenix 1.0 for text-to-image.
Z-Image TurboPruna AI
pruna/z-image-turbo-08130A fast photorealistic text-to-image model: about 15 seconds per image, any size from 64 to 2048 pixels, JPG, PNG or WEBP. Renders English and Chinese text well. One price per image of any size.