AIAPIZZ 登录 免费注册

图片、语音与向量

共 14 篇

图片理解(视觉)

把图片地址或 base64 放进 content 数组:

{
  "model": "gpt-4o-mini",
  "messages": [{
    "role": "user",
    "content": [
      {"type": "text", "text": "这张图里有什么?"},
      {"type": "image_url", "image_url": {"url": "https://example.com/a.jpg"}}
    ]
  }]
}

base64 写法:"url": "data:image/png;base64,iVBORw0KGgo..."。注意请求体大小限制(Nginx 的 client_max_body_size,宝塔默认 50M),大图建议先上传再传 URL。

文生图

curl https://aiapizz.com/v1/images/generations \
  -H "Authorization: Bearer sk-你的密钥" \
  -H "Content-Type: application/json" \
  -d '{"model":"dall-e-3","prompt":"一只戴墨镜的柴犬,扁平插画风格","n":1,"size":"1024x1024"}'
端点用途
/v1/images/generations文生图
/v1/images/edits图片编辑 / 图生图(multipart,字段含 image、prompt)
/v1/images/variations基于一张图生成变体

绘图类模型是按次计费:单次价格 × n(n 的取值以请求里的 n 为准,默认 1)。

语音

端点用途形态
/v1/audio/transcriptions语音转文字multipart,字段 file、model
/v1/audio/translations语音翻译成英文multipart
/v1/audio/speech文字转语音JSON,返回音频二进制
curl https://aiapizz.com/v1/audio/transcriptions \
  -H "Authorization: Bearer sk-你的密钥" \
  -F file=@./test.mp3 \
  -F model=whisper-1

上传音频时网关会把 model 字段一起改写成上游需要的真实模型名,其余表单字段原样转发。

向量与重排

curl https://aiapizz.com/v1/embeddings \
  -H "Authorization: Bearer sk-你的密钥" \
  -H "Content-Type: application/json" \
  -d '{"model":"text-embedding-3-small","input":["第一段文本","第二段文本"]}'

/v1/rerank 用于重排序(返回相关性分数),字段与上游一致:query、documents、top_n。这两个端点都按 token 计费。

Midjourney / Suno

以 /mj/ 和 /suno/ 开头的请求会原样透传给配置了对应服务的上游渠道,路径、请求体、返回体都不改写(这类上游通常是第三方中转实现,接口形态各有差异)。用法与上游服务自身的说明一致,把域名换成本站即可。

你的接口地址是 https://aiapizz.com/v1。 注册后即可在控制台创建密钥。
AIAPIZZ  · 模型广场  · 接口文档  · 服务条款  · 隐私政策
This website is independently developed and operated by the AIAPIZZ team. It is not affiliated with, authorized by, endorsed by, or otherwise associated with any other AI website, platform, brand, or service provider.
© 2026 AIAPIZZ