Face Detect API

模型 id:lumina/face-detect。

一个上下文窗口为 4K token 的聊天模型,通过 Hyperouter 兼容 OpenAI 的 API 调用。

价格

价格按每 100 万 token 计:输入 / 缓存输入 / 输出。

模型上下文价格
lumina/face-detect4K$0.0013 每次请求

用 OpenAI SDK 调用

将 HYPEROUTER_API_KEY 设为在控制台创建的 API 密钥。任何 OpenAI SDK 只要把 base URL 设为 https://api.hyperouter.app/v1 即可使用。

curl https://api.hyperouter.app/v1/chat/completions \
  -H "Authorization: Bearer $HYPEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "lumina/face-detect",
    "crop_heads": true,
    "messages": [
      {
        "content": [
          {
            "image_url": {
              "url": "https://example.com/photo.jpg"
            },
            "type": "image_url"
          }
        ],
        "role": "user"
      }
    ]
  }'

JPEG or PNG only (at most 5 MB, 3072 px on the longer side): a WebP is refused even under a .png name, so check what your CDN serves. message.content is a JSON string: parse it for faces[].corners, box, confidence and head_url.

参考

相关模型

使用 Google 或 GitHub 登录,创建 API 密钥,然后提交充值工单。按服务商的标价计费。