Skip to main content
POST
/
images
/
generations
Create image
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    model: '<string>',
    prompt: '<string>',
    size: '<string>',
    n: 5,
    quality: '<string>',
    response_format: '<string>',
    style: '<string>',
    user: '<string>',
    provider: {
      order: ['<string>'],
      only: ['<string>'],
      ignore: ['<string>'],
      include_alpha: true
    }
  })
};

fetch('https://api.phaseo.app/v1/images/generations', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "created": 123,
  "data": [
    {
      "url": "<string>",
      "b64_json": "<string>",
      "revised_prompt": "<string>"
    }
  ]
}
Creates one or more images from a text prompt using the configured provider for the requested model. The gateway returns a normalized response with metadata and usage where available. See the OpenAPI spec for full request/response shapes.

Authorizations

Authorization
string
header
required

Bearer token authentication

Body

application/json
model
string
required
prompt
string
required
size
string
n
integer
Required range: 1 <= x <= 10
quality
string
response_format
string
style
string
user
string
provider
object

Provider routing preferences for gateway selection.

Response

200 - application/json

Image response

created
integer
data
object[]
Last modified on February 11, 2026