Skip to main content
POST
Error

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your provider API key or Bifrost authentication token. Virtual keys (prefixed with sk-bf-) can also be passed here.

Path Parameters

model
string
required

Model name with action suffix. For Imagen models, use :predict (e.g., imagen-3.0-generate-001:predict). For Gemini models with image generation, use :generateContent (e.g., gemini-1.5-pro:generateContent).

Body

application/json
model
string

Model field for explicit model specification

contents
object[]

Content for the model to process

systemInstruction
object

System instruction for the model

generationConfig
object
safetySettings
object[]
tools
object[]
toolConfig
object
cachedContent
string

Cached content resource name

labels
object

Labels for the request

requests
object[]

Batch embedding requests

fallbacks
string[]

Response

Successful response. Returns JSON with generated image data in candidates[0].content.parts[0].inlineData. When streaming, events are sent via Server-Sent Events (SSE).

candidates
object[]
promptFeedback
object
usageMetadata
object
modelVersion
string

The model version used to generate the response

responseId
string

Response ID for identifying each response (encoding of event_id)

createTime
string<date-time>

Timestamp when the request was made to the server