Skip to content

Commit 8492f85

Browse files
docs: add flux/srpo/image-to-image (#480)
1 parent efbc7c5 commit 8492f85

2 files changed

Lines changed: 15 additions & 10 deletions

File tree

‎docs/api-references/image-models/flux/flux-srpo-image-to-image.json‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,16 @@
150150
"type": "number",
151151
"description": "The number of tokens consumed during generation.",
152152
"example": 120000
153+
},
154+
"usd_spent": {
155+
"type": "number",
156+
"description": "The total amount of money spent by the user in USD.",
157+
"example": 0.06
153158
}
154159
},
155160
"required": [
156-
"credits_used"
161+
"credits_used",
162+
"usd_spent"
157163
]
158164
}
159165
},
@@ -162,22 +168,23 @@
162168
}
163169
}
164170
}
165-
}
171+
},
172+
"description": "Successful response."
166173
}
167174
},
168175
"x-hideTryItPanel": true,
169176
"x-codeSamples": [
170177
{
171178
"lang": "cURL",
172-
"source": "curl -L \\\n --request POST \\\n --url 'https://api.aimlapi.com/v1/images/generations' \\\n --header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"model\": \"flux/srpo/image-to-image\",\n \"prompt\": \"Add a crown to the T-rex’s head.\",\n \"image_url\": \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png\"\n }'"
179+
"source": "curl --request POST \\\n --url 'https://api.aimlapi.com/v1/images/generations' \\\n --header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \\\n --header 'Content-Type: application/json' \\\n --data '{\"model\": \"flux/srpo/image-to-image\", \"prompt\": \"Describe what you want the model to generate.\", \"image_url\": \"https://example.com/input.jpg\"}'"
173180
},
174181
{
175182
"lang": "JavaScript",
176-
"source": "async function main() {\n const response = await fetch('https://api.aimlapi.com/v1/images/generations', {\n method: 'POST',\n headers: {\n 'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n \"model\": \"flux/srpo/image-to-image\",\n \"prompt\": \"Add a crown to the T-rex’s head.\",\n \"image_url\": \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png\"\n }),\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();"
183+
"source": "const response = await fetch('https://api.aimlapi.com/v1/images/generations', {\n method: 'POST',\n headers: {\n 'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n \"model\": \"flux/srpo/image-to-image\",\n \"prompt\": \"Describe what you want the model to generate.\",\n \"image_url\": \"https://example.com/input.jpg\"\n}),\n});\n\nconsole.log(await response.json());"
177184
},
178185
{
179186
"lang": "Python",
180-
"source": "import requests\n\nresponse = requests.post(\n \"https://api.aimlapi.com/v1/images/generations\",\n headers={\n \"Content-Type\":\"application/json\", \n \"Authorization\":\"Bearer <YOUR_AIMLAPI_KEY>\",\n },\n json={\n \"model\": \"flux/srpo/image-to-image\",\n \"prompt\": \"Add a crown to the T-rex’s head.\",\n \"image_url\": \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png\"\n }\n)\n\ndata = response.json()\nprint(data)"
187+
"source": "import requests\n\nresponse = requests.post(\n \"https://api.aimlapi.com/v1/images/generations\",\n headers={\n \"Authorization\": \"Bearer <YOUR_AIMLAPI_KEY>\",\n \"Content-Type\": \"application/json\",\n },\n json={'model': 'flux/srpo/image-to-image', 'prompt': 'Describe what you want the model to generate.', 'image_url': 'https://example.com/input.jpg'},\n)\n\nprint(response.json())"
181188
}
182189
]
183190
}
@@ -193,4 +200,4 @@
193200
}
194201
}
195202
}
196-
}
203+
}

‎docs/api-references/image-models/flux/flux-srpo-image-to-image.md‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Flux SRPO Image to Image
1+
# Flux Srpo Image To Image
22

33
{% columns %}
44
{% column width="66.66666666666666%" %}
@@ -16,9 +16,7 @@ This documentation is valid for the following list of our models:
1616

1717
## Model Overview
1818

19-
[flux/dev/image-to-image](flux-dev-image-to-image.md) model upgraded with Tencent’s SRPO technique.
20-
21-
<table data-full-width="true"><thead><tr><th width="233.8665771484375" valign="top">Model</th><th>Generated image properties</th></tr></thead><tbody><tr><td valign="top"><code>flux/srpo/image-to-image</code></td><td>Format: <strong>JPEG</strong>, <strong>PNG</strong><br>Fixed size: Matches the dimensions of the reference image.</td></tr></tbody></table>
19+
FLUX.1 SRPO image-to-image model for advanced image transformation and editing.
2220

2321
## Setup your API Key
2422

0 commit comments

Comments
 (0)