OPEN AI 极速开发平台

开放OPEN AI 平台接口文档


AI画图

<p>[TOC]</p> <h5>简要描述</h5> <ul> <li>通过描述生成你想要的图片</li> </ul> <h5>请求URL</h5> <ul> <li><code>http://api-openai.dtgarden.com/pic/GenImage</code> </li> </ul> <h5>请求方式</h5> <ul> <li>post</li> </ul> <h5>请求Body参数</h5> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">必选</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">desc</td> <td style="text-align: left;">是</td> <td>string</td> <td>生成图片描述</td> </tr> <tr> <td style="text-align: left;">model</td> <td style="text-align: left;">否</td> <td>int</td> <td>画图模型 默认1gpt 2mj 3sd</td> </tr> <tr> <td style="text-align: left;">identification</td> <td style="text-align: left;">否</td> <td>string</td> <td>接口套餐标识 模型为mj和sd商用时 后台获取</td> </tr> <tr> <td style="text-align: left;">smartDiscern</td> <td style="text-align: left;">否</td> <td>int</td> <td>GPT4 MJ 画图智能优化 模型为mj时默认为1开启 0不开启 mj对中文描述不友好中文时候建议开启</td> </tr> <tr> <td style="text-align: left;">midjourneyImg</td> <td style="text-align: left;">否</td> <td>entity</td> <td>mj画图配置画图配置 模型是mj重绘修改图需要配置</td> </tr> <tr> <td style="text-align: left;">identification</td> <td style="text-align: left;">否</td> <td>string</td> <td>接口服务ID 不同模型对应后台不同接口服务ID。不填写会走账号下key</td> </tr> </tbody> </table> <h5>midjourneyImg 参数实体</h5> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">必选</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">action</td> <td style="text-align: left;">否</td> <td>string</td> <td>操作类型。在第一次生成预览图时,默认该值为 generate,在后续需要对图像进行处理时,可以设置为第一次生成结果的返回值中的 actions 的任一值,代表待处理图像的操作类型。该值默认为 generate</td> </tr> <tr> <td style="text-align: left;">image_id</td> <td style="text-align: left;">否</td> <td>string</td> <td>图像 ID。在第一次生成预览图时,不需要指定该字段。在后续需要对图像进行处理时,需要指定该字段,代表待处理图像的 ID。该 ID 即为第一次生成预览图时返回的 image_id 字段</td> </tr> </tbody> </table> <h5>成功返回示例</h5> <pre><code>{ &amp;quot;success&amp;quot;: true, &amp;quot;code&amp;quot;: &amp;quot;OK&amp;quot;, &amp;quot;message&amp;quot;: &amp;quot;成功&amp;quot;, &amp;quot;timestamp&amp;quot;: &amp;quot;2023-05-30 15:07:57&amp;quot;, &amp;quot;data&amp;quot;: { &amp;quot;image&amp;quot;: { &amp;quot;gptImgEntry&amp;quot;: { &amp;quot;created&amp;quot;: 1685430476, &amp;quot;data&amp;quot;: [ { &amp;quot;url&amp;quot;: &amp;quot;https://oaidalleapiprodscus.blob.core.windows.net/private/org-ddY95wmPEUMEtlondwytGiMu/user-nRQk1heSvCsWVT4klqHCs2E5/img-w65TNVp9fQ33DeOa4knCRmOy.png?st=2023-05-30T06%3A07%3A56Z&amp;amp;se=2023-05-30T08%3A07%3A56Z&amp;amp;sp=r&amp;amp;sv=2021-08-06&amp;amp;sr=b&amp;amp;rscd=inline&amp;amp;rsct=image/png&amp;amp;skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&amp;amp;sktid=a48cca56-e6da-484e-a814-9c849652bcb3&amp;amp;skt=2023-05-29T14%3A59%3A13Z&amp;amp;ske=2023-05-30T14%3A59%3A13Z&amp;amp;sks=b&amp;amp;skv=2021-08-06&amp;amp;sig=4kF1%2BARwy4iSaqcngqte8iFhM9KeFt0/1nyrPBm9t/M%3D&amp;quot;, &amp;quot;b64_json&amp;quot;: null } ] }, &amp;quot;midjourneyImgEntry&amp;quot;: { &amp;quot;task_id&amp;quot;: &amp;quot;4687cc04-7052-4cbe-ab23-242a022d146e&amp;quot;, &amp;quot;image_id&amp;quot;: &amp;quot;1116495908503306300&amp;quot;, &amp;quot;image_url&amp;quot;: &amp;quot;https://midjourney.cdn.zhishuyun.com/attachments/1114982998840971357/1116495908503306300/kperkins_ignore4687cc04-7052-4cbe-ab23-242a022d146e_a_painting__04949330-8d19-41a0-b656-f9367db17004.png&amp;quot;, &amp;quot;actions&amp;quot;: [ &amp;quot;upsample1&amp;quot;, &amp;quot;upsample2&amp;quot;, &amp;quot;upsample3&amp;quot;, &amp;quot;upsample4&amp;quot;, &amp;quot;variation1&amp;quot;, &amp;quot;variation2&amp;quot;, &amp;quot;variation3&amp;quot;, &amp;quot;variation4&amp;quot; ], &amp;quot;channel&amp;quot;: 0 } } } } </code></pre>

页面列表

ITEM_HTML