Skip to content

Commit 5ce14f6

Browse files
feat: re-re-gen z-image-turbo/lora (remove http autoexamples)
1 parent 73143a0 commit 5ce14f6

3 files changed

Lines changed: 32 additions & 4 deletions

File tree

docs/api-references/image-models/Alibaba-Cloud/z-image-turbo-lora.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,21 @@
203203
}
204204
}
205205
},
206-
"x-hideTryItPanel": true
206+
"x-hideTryItPanel": true,
207+
"x-codeSamples": [
208+
{
209+
"lang": "cURL",
210+
"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\": \"alibaba/z-image-turbo-lora\",\n \"prompt\": \"A T-Rex relaxing on a beach, lying on a sun lounger and wearing sunglasses.\"\n }'"
211+
},
212+
{
213+
"lang": "JavaScript",
214+
"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: 'alibaba/z-image-turbo-lora',\n prompt: 'A T-Rex relaxing on a beach, lying on a sun lounger and wearing sunglasses.',\n }),\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();"
215+
},
216+
{
217+
"lang": "Python",
218+
"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\":\"alibaba/z-image-turbo-lora\",\n \"prompt\": \"A T-Rex relaxing on a beach, lying on a sun lounger and wearing sunglasses.\"\n }\n)\n\ndata = response.json()\nprint(data)"
219+
}
220+
]
207221
}
208222
}
209223
},

docs/api-references/image-models/Alibaba-Cloud/z-image-turbo.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,21 @@
180180
}
181181
}
182182
},
183-
"x-hideTryItPanel": true
183+
"x-hideTryItPanel": true,
184+
"x-codeSamples": [
185+
{
186+
"lang": "cURL",
187+
"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\": \"alibaba/z-image-turbo\",\n \"prompt\": \"A T-Rex relaxing on a beach, lying on a sun lounger and wearing sunglasses.\"\n }'"
188+
},
189+
{
190+
"lang": "JavaScript",
191+
"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: 'alibaba/z-image-turbo',\n prompt: 'A T-Rex relaxing on a beach, lying on a sun lounger and wearing sunglasses.',\n }),\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();"
192+
},
193+
{
194+
"lang": "Python",
195+
"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\":\"alibaba/z-image-turbo\",\n \"prompt\": \"A T-Rex relaxing on a beach, lying on a sun lounger and wearing sunglasses.\"\n }\n)\n\ndata = response.json()\nprint(data)"
196+
}
197+
]
184198
}
185199
}
186200
},

packages/generators-v2/src/json_for-docs_generation.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"alias": "z-image-turbo",
66
"category": "image-models",
77
"vendor": "Alibaba-Cloud",
8-
"codeSamples": "text-to-image"
8+
"codeSamples": "image-models:prompt"
99
},
1010
{
1111
"name": "alibaba/z-image-turbo-lora",
1212
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/image-generations&model=alibaba/z-image-turbo-lora",
1313
"alias": "z-image-turbo-lora",
1414
"category": "image-models",
1515
"vendor": "Alibaba-Cloud",
16-
"codeSamples": "text-to-image"
16+
"codeSamples": "image-models:prompt"
1717
}
1818
]

0 commit comments

Comments
 (0)