Skip to content

Fireworks: image generation responds differs depending on model #11149

@gr2m

Description

@gr2m

Our current example for image generation using the @ai-sdk/fireworks provider works when using accounts/fireworks/models/stable-diffusion-xl-1024-v1-0 as provider.

'accounts/fireworks/models/stable-diffusion-xl-1024-v1-0',

But it fails when using accounts/fireworks/models/flux-kontext-pro. Unlike with the stable-diffusion model, flux-kontext-pro requests return a JSON object with a request_id which then needs to be sent repeatedly to https://docs.fireworks.ai/api-reference/get-generated-image-from-flux-kontex until it responds with result.status === 'Ready' and and result.result.sample set to an image URL, which then can be downloaded to retrieve the actual image.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions