Skip to content

Commit fa7b2e3

Browse files
techpro-aimlapigitbook-bot
authored andcommitted
GITBOOK-743: docs: fix gpt-image-1 edit example
1 parent 1fa3165 commit fa7b2e3

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

docs/api-references/image-models/openai/gpt-image-1.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ It does not support image input via URLs or base64 encoding.
4242
{% endhint %}
4343

4444
{% openapi-operation spec="gpt-image-1-edit" path="/v1/images/edits" method="post" %}
45-
[OpenAPI gpt-image-1-edit](https://api.aimlapi.com/docs-public-yaml)
45+
[OpenAPI gpt-image-1-edit](https://api.aimlapi.com/docs-public-json)
4646
{% endopenapi-operation %}
4747

4848
## Quick Examples
@@ -67,8 +67,8 @@ def main():
6767
"Content-Type": "application/json",
6868
},
6969
json={
70-
"prompt": "Add a crown",
7170
"model": "openai/gpt-image-1",
71+
"prompt": "A T-Rex relaxing on a beach, lying on a sun lounger and wearing sunglasses. Realistic photo.",
7272
"size": "1024x1024"
7373
}
7474
)
@@ -175,7 +175,6 @@ Let's generate an image using two input images and a prompt that defines how the
175175
```python
176176
from openai import OpenAI
177177

178-
179178
def main():
180179
client = OpenAI(
181180
api_key="<YOUR_AIMLAPI_KEY>",
@@ -193,7 +192,6 @@ def main():
193192

194193
print("Generation:", result)
195194

196-
197195
if __name__ == "__main__":
198196
main()
199197
```
@@ -206,7 +204,6 @@ if __name__ == "__main__":
206204
import fs from 'fs';
207205
import OpenAI, { toFile } from 'openai';
208206

209-
210207
const main = async () => {
211208
const client = new OpenAI({
212209
baseURL: 'https://api.aimlapi.com/v1',
@@ -274,7 +271,6 @@ In this example, we’ll provide the model with our previously generated image o
274271
```python
275272
from openai import OpenAI
276273

277-
278274
def main():
279275
client = OpenAI(
280276
api_key="<YOUR_AIMLAPI_KEY>",
@@ -287,7 +283,6 @@ def main():
287283
mask=open('t-rex-alpha_mask.png', 'rb'),
288284
prompt="Remove this from the picture"
289285
)
290-
291286
print("Generation:", result)
292287

293288

@@ -303,7 +298,6 @@ if __name__ == "__main__":
303298
import fs from 'fs';
304299
import OpenAI, { toFile } from 'openai';
305300

306-
307301
const main = async () => {
308302
const client = new OpenAI({
309303
baseURL: 'https://api.aimlapi.com/v1',

0 commit comments

Comments
 (0)