GenAI Integration
Generate image (Gemini format)
For Imagen models, use the :predict suffix (e.g., imagen-3.0-generate-001:predict). For Gemini models, use :generateContent with generationConfig.responseModalities: ["IMAGE"] in the request body.
post/genai/v1beta/models/{model}:predict
Request
- Base URLhttp://localhost:8080
- Auth
- HTTP bearer
- or HTTP basic
- or API key in header x-bf-vk
- or API key in header x-api-key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
modelstring 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).
Request body
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).
Changes
No recorded changes to this operation across all 1 revision of this API.