GET
/
inference
/
v1
/
workflows
/
accounts
/
fireworks
/
models
/
{model}
/
get_result
import requests

url = "https://api.fireworks.ai/inference/v1/workflows/accounts/fireworks/models/{model}/get_result"
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer $API_KEY",
}
data = {
    id: "request_id"
}

response = requests.post(url, headers=headers, json=data)

print(response.text)
{
  "id": "<string>",
  "status": {},
  "result": "<any>",
  "progress": {},
  "details": {}
}

Replace model with flux-kontext-pro in the API to get the result.

Path

model
string
required

The model to use for image generation. Use flux-kontext-pro or flux-kontext-max as the model name in the API.

Headers

Content-Type
string

The media type of the request body.

Authorization
string
required

Your Fireworks API key.

Request Body

id
string
required

Request id generated from create/edit image request.

import requests

url = "https://api.fireworks.ai/inference/v1/workflows/accounts/fireworks/models/{model}/get_result"
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer $API_KEY",
}
data = {
    id: "request_id"
}

response = requests.post(url, headers=headers, json=data)

print(response.text)

Response

id
string
required

Task id for retrieving result

status
enum<string>
required

Available options: Task not found, Pending, Request Moderated, Content Moderated, Ready, Error

result
any
progress
number | null
details
object | null