当前位置: 首页 > news >正文

网站空间域名注册游戏ui培训

网站空间域名注册,游戏ui培训,淘宝客怎么自己做网站,搜索引擎营销的主要模式有哪些Midjourney Describe API 的对接和使用 Midjourney Describe API 的主要功能是通过上传图片#xff0c;获取对图片的描述。使用该 API#xff0c;只需要传递图片文件地址#xff0c;API 会返回图片的详细描述。无需繁琐的参数设置#xff0c;即可获得高质量的图片描述。 …Midjourney Describe API 的对接和使用 Midjourney Describe API 的主要功能是通过上传图片获取对图片的描述。使用该 API只需要传递图片文件地址API 会返回图片的详细描述。无需繁琐的参数设置即可获得高质量的图片描述。 支持多种图片格式无论是 JPEG、PNG 还是 GIF 等主流图片格式均能被轻松识别和处理。 本文档将详细介绍 Midjourney Describe API 的对接说明帮助您轻松集成并充分利用该 API 的强大功能。通过 Midjourney Describe API您可以轻松实现图片描述的自动化提高业务效率。 申请流程 要使用 Midjourney Describe API需要先到 申请页面 Midjourney Describe API 申请相应的服务进入页面之后点击「Acquire」按钮如图所示?inviter_idb87f67c1-b04f-4332-99a1-7a5e651331c6 如果您尚未登录或注册会自动跳转到登录页面邀请您来注册和登录登录注册之后会自动返回当前页面。?inviter_idb87f67c1-b04f-4332-99a1-7a5e651331c6 首次申请时会有免费额度赠送可以免费使用该 API。 请求示例 我们以一张图片为例演示如何使用该 API。假设我们有一张风景图片接下来演示如何上传该图片并获取描述。 请求示例图 设置请求头和请求体 Request Headers 包括 accept指定接收 JSON 格式的响应结果这里填写为 application/json。authorization调用 API 的密钥申请之后可以直接下拉选择。 Request Body 包括 image_url上传的图片文件地址。 设置如下图所示 代码示例 可以发现在页面右侧已经自动生成了各种语言的代码如图所示 部分代码示例如下 CURL bash curl -X POST https://api.acedata.cloud/midjourney/describe \ -H accept: application/json \ -H authorization: Bearer {token} \ -H content-type: application/json \ -d { image_url: https://cdn.zhishuyun.com/80ce2143-0523-41de-8e9f-c46f6e05dbac.png } Python python import requests url https://api.acedata.cloud/midjourney/describe headers { accept: application/json, authorization: Bearer {token}, content-type: application/json } payload { image_url: https://cdn.zhishuyun.com/80ce2143-0523-41de-8e9f-c46f6e05dbac.png } response requests.post(url, jsonpayload, headersheaders) print(response.json()) 响应示例 请求成功后API 将返回图片的 4 条描述信息。例如 json { descriptions: [ A cross-shaped road sign stands in the middle of an outdoor park, surrounded by trees and grasslands. The background is sunny with warm colors. There is sunlight shining through the leaves onto part of it. On one side of that street post there was also another sign with the lettering \Kunming Park\, which looked very beautiful. This photo shows how wonderful nature can be. It gives people feelings like relaxation or tranquility in the style of nature. --ar 75:44, A photo of a \K鬥\ road sign in the park, with trees and grass on both sides. In front is a light yellow metal pole with two signs attached to it. The background features sunlight shining through green leaves onto one side of the street, creating a warm atmosphere. There is also water mist floating around. It was taken in the style of Sony A7R IV camera using Leica M lens. This scene conveys tranquility and harmony between nature and human creation. --ar 75:44, A cross-shaped street sign stands in the middle of an open park, surrounded by trees and grassland. The sun shines through the leaves on part of it, creating a warm light effect. In front is a road leading to another green space. Theres also some information about \Inside Shilin Park\ on one side of that post. This scene gives people feelings of tranquility and harmony with nature. Natural lighting, 3D rendering in the style of Unreal Engine, Realistic photography style. --ar 75:44, A cross-shaped signpost stands in the park, surrounded by lush trees and vibrant green grass under sunlight. Signs say \VIDEO ANNattacks\ in an unknown language, creating an atmosphere of mystery and intrigue. The scene is captured with high-definition photography using Canon EOS R5 cameras, presenting a stunning visual effect that showcases intricate details in the style of modern photography. --ar 75:44 ] } 可以看到结果中有一个 descriptions 字段里面包含了四个结果每个结果都是一个候选的描述内容。 错误处理 在调用 API 时如果遇到错误API 会返回相应的错误代码和信息。例如 400 token_mismatchedBad request, possibly due to missing or invalid parameters.400 api_not_implementedBad request, possibly due to missing or invalid parameters.401 invalid_tokenUnauthorized, invalid or missing authorization token.429 too_many_requestsToo many requests, you have exceeded the rate limit.500 api_errorInternal server error, something went wrong on the server. 错误响应示例 { success: false, error: { code: api_error, message: fetch failed }, trace_id: 2cf86e86-22a4-46e1-ac2f-032c0f2a4e89 } 结论 通过本文档您已经了解了如何使用 Midjourney Describe API 进行图片描述。希望本文档能帮助您更好地对接和使用该 API。如有任何问题请随时联系我们的技术支持团队。
http://www.hkea.cn/news/14465245/

相关文章:

  • 专业平台建设网站关了吗潍坊网站建设潍坊
  • 网站的主要功能模块米课的wordpress
  • 长春网站建设排名苏州公司网络搭建
  • 做网站需要审批不商务网站建设教学视频
  • 误给传销公司做网站算犯罪吗wordpress $post
  • 怎样做微网站商城开发价格
  • 东莞网站制作支付通道高端网约车有哪些平台
  • 石家庄免费网站设计二手交易网站设计怎么做
  • 泸州做网站企业地址如何地图添加
  • 做网站主页用html做网站的背景图怎么弄
  • 中国人在国外做网站网站代理网站建设工程师是做什么的
  • 关于网站制作的评价谷歌网站入口
  • 选择常州网站建设公司wordpress手动获取相关文章
  • 自由设计师网站招标网站建设申请
  • 公司网站建设哪家正规python18+21
  • ftp 企业网站网站如何转做app
  • 网站开发有什么工作内容热点新闻事件素材
  • 上海网站商城建设网站建设费计什么科目
  • 自己做电影网站需要的成本阿里云虚拟主机wordpress建站
  • 鄂州网站建设企业推广三合一做网站
  • 对重庆电子政务网站建设评价什么是可信网站认证
  • 网站开发项目名长沙有实力seo优化公司
  • 网站添加锚点店面设计费
  • 网站推广的技巧live writer wordpress
  • 长沙市做网站公司排名内衣网站建设推广
  • 网站怎么做页面解析跳转企业管理咨询服务合同范本
  • 如何做百度推广网站广州哪里有做公司网站 什么价
  • 杭州网站建设公司官网云服务器和云虚拟主机
  • 大连网站建设微信群html制作旅游景点网页
  • 设计的网站有哪些个人相册网站模板