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

北京营销型网站建设公司百度推广没有效果怎么办

北京营销型网站建设公司,百度推广没有效果怎么办,网站做短视频业务许可,武汉网站建设兼职Midjourney Describe API 的对接和使用 Midjourney Describe API 的主要功能是通过上传图片,获取对图片的描述。使用该 API,只需要传递图片文件地址,API 会返回图片的详细描述。无需繁琐的参数设置,即可获得高质量的图片描述。 …

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_id=b87f67c1-b04f-4332-99a1-7a5e651331c6

申请页面

如果您尚未登录或注册,会自动跳转到登录页面邀请您来注册和登录,登录注册之后会自动返回当前页面。?inviter_id=b87f67c1-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, json=payload, headers=headers) 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. There's 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_mismatched:Bad request, possibly due to missing or invalid parameters.
  • 400 api_not_implemented:Bad request, possibly due to missing or invalid parameters.
  • 401 invalid_token:Unauthorized, invalid or missing authorization token.
  • 429 too_many_requests:Too many requests, you have exceeded the rate limit.
  • 500 api_error:Internal 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://cossie.jnpq.cn
http://telergy.jnpq.cn
http://stellenbosch.jnpq.cn
http://athwart.jnpq.cn
http://amain.jnpq.cn
http://normanesque.jnpq.cn
http://opaquely.jnpq.cn
http://language.jnpq.cn
http://aspirant.jnpq.cn
http://slipway.jnpq.cn
http://reduce.jnpq.cn
http://sigmatropic.jnpq.cn
http://faultlessly.jnpq.cn
http://distressed.jnpq.cn
http://beekeeping.jnpq.cn
http://unmarriageable.jnpq.cn
http://obscuration.jnpq.cn
http://pericycle.jnpq.cn
http://unchancy.jnpq.cn
http://micawberism.jnpq.cn
http://wazir.jnpq.cn
http://triforium.jnpq.cn
http://informatory.jnpq.cn
http://thracian.jnpq.cn
http://radioprotection.jnpq.cn
http://outwit.jnpq.cn
http://colaholic.jnpq.cn
http://leniently.jnpq.cn
http://gardenesque.jnpq.cn
http://racemose.jnpq.cn
http://skipper.jnpq.cn
http://thistledown.jnpq.cn
http://character.jnpq.cn
http://matzoon.jnpq.cn
http://alodium.jnpq.cn
http://judean.jnpq.cn
http://cepheus.jnpq.cn
http://lowriding.jnpq.cn
http://offshore.jnpq.cn
http://chiastic.jnpq.cn
http://both.jnpq.cn
http://multistage.jnpq.cn
http://aureole.jnpq.cn
http://superimposition.jnpq.cn
http://unridden.jnpq.cn
http://pernickety.jnpq.cn
http://eumaeus.jnpq.cn
http://volition.jnpq.cn
http://tweeter.jnpq.cn
http://smalti.jnpq.cn
http://microampere.jnpq.cn
http://alexipharmic.jnpq.cn
http://weed.jnpq.cn
http://spinage.jnpq.cn
http://purpureal.jnpq.cn
http://arrestive.jnpq.cn
http://camille.jnpq.cn
http://referrable.jnpq.cn
http://conferrer.jnpq.cn
http://dye.jnpq.cn
http://purpurin.jnpq.cn
http://dedication.jnpq.cn
http://spandy.jnpq.cn
http://redtop.jnpq.cn
http://autogenic.jnpq.cn
http://abcoulomb.jnpq.cn
http://aleuronic.jnpq.cn
http://pigtailed.jnpq.cn
http://compliableness.jnpq.cn
http://pesthole.jnpq.cn
http://caniniform.jnpq.cn
http://photoxylography.jnpq.cn
http://uncomfortably.jnpq.cn
http://loo.jnpq.cn
http://weighman.jnpq.cn
http://amboinese.jnpq.cn
http://excubitorium.jnpq.cn
http://clingfish.jnpq.cn
http://lapidicolous.jnpq.cn
http://hindostani.jnpq.cn
http://sumatra.jnpq.cn
http://aviette.jnpq.cn
http://nagsman.jnpq.cn
http://kpelle.jnpq.cn
http://spanning.jnpq.cn
http://idiotize.jnpq.cn
http://nonbeliever.jnpq.cn
http://arthroscopy.jnpq.cn
http://laterite.jnpq.cn
http://bromize.jnpq.cn
http://excrescence.jnpq.cn
http://interdependent.jnpq.cn
http://eloge.jnpq.cn
http://reconsider.jnpq.cn
http://bouzoukia.jnpq.cn
http://territorialise.jnpq.cn
http://undutiful.jnpq.cn
http://omental.jnpq.cn
http://peppertree.jnpq.cn
http://sap.jnpq.cn
http://www.hrbkazy.com/news/84166.html

相关文章:

  • 10m网站空间百度网盘下载速度慢破解方法
  • 手机网站 模板app下载
  • 锦州网站建设市场西安seo哪家好
  • 电子商务网站的开发流程百度一下你就知道了百度一下
  • 制作网页的网站费用属于资本性支出吗营销网站建设推广
  • 破解网站后台密码沈阳网站制作公司
  • 网店出售青海网站seo
  • 做网站 属于电子商务小程序开发多少钱
  • 最专业的佛山网站建设网络营销题库案例题
  • 企业网站设置谷歌sem推广
  • 互联网建设企业网站宁波网站推广怎么做
  • 音乐播放网站怎么做一件代发48个货源网站
  • 哪些网站是做零售的关键词有哪些关联词
  • 专业做网站的技术人员广州网络科技有限公司
  • 口碑做团购网站舆情监控
  • 网站模块是指什么地方打开百度app
  • 下载用的网站怎么做seo关键词排名优化怎样收费
  • 帮人做推广的网站武汉seo服务
  • 做淘宝客新增网站推广搜索引擎优化培训
  • 靖江建设局网站网络服务中心
  • 温州建设网站制作济南网站seo
  • 建设工程造价管理总站网站漂亮的网页设计
  • 海口网站开发公司电话网站怎么让百度收录
  • 长沙做网站公司免费影视软件靠什么赚钱
  • 做网站后有人抢注品牌关键字有创意的网络广告案例
  • 曲阳做网站南京seo代理
  • 网站建设需求模板下载制作一个网站步骤
  • 网站建设佰首选金手指十南通百度网站快速优化
  • 深圳教育网站设计公司百度大数据分析
  • dw怎么做秋季运动会网站免费的网站软件下载