import requests
url = "https://api.fireworks.ai/inference/v1/workflows/accounts/fireworks/models/{model}"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer $API_KEY",
}
data = {
"prompt": "A beautiful sunset over the ocean",
"input_image": "<string>",
"seed": 42,
"aspect_ratio": "<string>",
"output_format": "jpeg",
"webhook_url": "<string>",
"webhook_secret": "<string>",
"prompt_upsampling": False,
"safety_tolerance": 2
}
response = requests.post(url, headers=headers, json=data)
import requests
url = "https://api.fireworks.ai/inference/v1/workflows/accounts/fireworks/models/{model}"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer $API_KEY",
}
data = {
"prompt": "A beautiful sunset over the ocean",
"input_image": "<string>",
"seed": 42,
"aspect_ratio": "<string>",
"output_format": "jpeg",
"webhook_url": "<string>",
"webhook_secret": "<string>",
"prompt_upsampling": False,
"safety_tolerance": 2
}
response = requests.post(url, headers=headers, json=data)
💡 Note that this API is async and will return the request_id instead of the image. Call the get_result API to obtain the generated image.Documentation Index
Fetch the complete documentation index at: https://fireworks.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
jpeg, pngimport requests
url = "https://api.fireworks.ai/inference/v1/workflows/accounts/fireworks/models/{model}"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer $API_KEY",
}
data = {
"prompt": "A beautiful sunset over the ocean",
"input_image": "<string>",
"seed": 42,
"aspect_ratio": "<string>",
"output_format": "jpeg",
"webhook_url": "<string>",
"webhook_secret": "<string>",
"prompt_upsampling": False,
"safety_tolerance": 2
}
response = requests.post(url, headers=headers, json=data)
Was this page helpful?