Apinoa Docs

Answer

向 Gemini 提问并获取回答,附带引用、来源、卡片和提及。

查看原始 .mdx
POST /v1/gemini/answer

以 JSON 请求体发送输入。回答需要数秒,请将超时设为最多 120 秒。

请求

curl -X POST "https://gateway.apinoa.com/v1/gemini/answer" \
  -H "x-api-key: $APINOA_API_KEY" \
  -H "content-type: application/json" \
  -d '{"prompt": "What are the best running shoes for beginners?", "country": "US"}'

参数

参数类型必填说明
promptstring是The question, as a person would type it.
conversationstringAn earlier answer's conversation.id: ask a follow-up in the same conversation.
countrystringThe market the answer is asked from, as an ISO 3166 country code. Each engine's page lists its countries.
includeenum listpage: also return the answer as a self-contained HTML page, in page.

这些参数及所有响应类型也写在OpenAPI 文档中。

响应

在 data 中返回 Answer。 真实响应的节选:数组只保留前几项,长文本已截断。

{
  "success": true,
  "data": {
    "engine": "gemini",
    "outcome": "answered",
    "prompt": "What are the best running shoes for beginners?",
    "askedAt": "2026-10-30T01:00:44.498Z",
    "country": "US",
    "language": "en",
    "title": "Best Running Shoes for Beginners",
    "blocks": [
      {
        "type": "paragraph",
        "markdown": "When starting out as a runner, the best shoes share a few key traits: **generous comfort** to protect your joints as your body adapts, a **forgiving fit** that…"
      },
      {
        "type": "paragraph",
        "markdown": "The top-rated, most reliable running shoes for beginners feature several standout models tailored to different preferences:"
      }
    ],
    "text": "When starting out as a runner, the best shoes share a few key traits: generous comfort to protect your joints as your body adapts, a forgiving fit that doesn’t…",
    "markdown": "When starting out as a runner, the best shoes share a few key traits: **generous comfort** to protect your joints as your body adapts, a **forgiving fit** that…",
    "citations": [{"start": 0, "end": 258, "sources": [0]}, {"start": 443, "end": 491, "sources": [0]}],
    "sources": [
      {
        "url": "https://www.fleetfeet.com/running-shoe-buyers-guide/best-running-shoes-women",
        "title": "The 10 Best Women's Running Shoes 2026 - Fleet Feet",
        "site": "Fleet Feet",
        "favicon": "https://encrypted-tbn2.gstatic.com/favicon-tbn?q=tbn%3AANd9GcQTW69jHapZCXp40IeOUlcK9pl3Uqjv9AfQz4UK9yWZJzexnB8DlIx8FEp1QlJMdcyn62qSLSzVxWKbjG00g2yeWYdoHkxcWHAPB…",
        "snippet": "The nitrogen-infused DNA Loft v3 cushioning provides soft, protective comfort without feeling overly squishy or unstable — giving you the confidence to run, wal…",
        "cited": true,
        "ext": {
          "quotes": ["The nitrogen-infused DNA Loft v3 cushioning provides … gear as you build your new habit."],
          "snippets": [
            "The nitrogen-infused DNA Loft v3 cushioning provides soft, protective comfort without feeling overly squishy or unstable — giving you the confidence to run, wal…"
          ]
        }
      },
      {
        "url": "https://www.fleetfeet.com/blog/our-top-6-running-shoes-for-beginners-this-summer",
        "title": "Our Top 6 Running Shoes for Beginners This Summer - Fleet Feet",
        "site": "Fleet Feet",
        "favicon": "https://encrypted-tbn2.gstatic.com/favicon-tbn?q=tbn%3AANd9GcQTW69jHapZCXp40IeOUlcK9pl3Uqjv9AfQz4UK9yWZJzexnB8DlIx8FEp1QlJMdcyn62qSLSzVxWKbjG00g2yeWYdoHkxcWHAPB…",
        "snippet": "Plus, it's available in Fleet Feet exclusive colorways, helping you stand out from the crowd. Read the full review. Sale. Women's ASICS Gel-Cumulus 25. Women's…",
        "cited": true,
        "ext": {
          "quotes": ["Plus, it's available in Fleet Feet exclusive … decade, mostly because it's so aptly named."],
          "snippets": [
            "Plus, it's available in Fleet Feet exclusive colorways, helping you stand out from the crowd. Read the full review. Sale. Women's ASICS Gel-Cumulus 25. Women's…"
          ]
        }
      }
    ],
    "mentions": [],
    "cards": [],
    "suggestions": [
      {
        "text": "Compare neutral vs. stability running shoes",
        "prompt": "What is the difference between neutral and stability running shoes, and how do I know which one I need?"
      },
      {
        "text": "Tips for starting a Couch-to-5K running routine",
        "prompt": "Give me a beginner-friendly Couch-to-5K running plan and tips to avoid injury."
      }
    ],
    "ext": {
      "model": "3.5 Flash-Lite",
      "steps": [{"label": "Searched the web", "tool": "Google Search", "pages": 8}],
      "classifier": [
        [{"label": "Academic - Other", "score": 1.2308828e-05}, {"label": "Coding", "score": 8.606076e-06}],
        [
          {"label": "Action Execution / Device Control - Other", "score": 2.9255574e-05},
          {"label": "Advice & Opinion - Other", "score": 0.00015245765}
        ]
      ],
      "modifiers": ["Longer", "Shorter"],
      "suggestionHeading": "To help you narrow down your choice:"
    },
    "conversation": {"id": "c_GLVf-d67JzX_h9UkuWw87Q", "turn": 1, "expiresAt": "2026-10-30T01:30:51.206Z"}
  }
}

错误

状态代码含义
400INVALID_PARAMS参数缺失、未知、超出范围,或该引擎不接受。消息中会指出是哪一个。
401UNAUTHORIZED缺少 x-api-key 请求头,或密钥已吊销或未知。
402INSUFFICIENT_BALANCE余额不足以支付本次调用。请在控制台充值。
429MARKETPLACE_SATURATED并发调用过多。请等待 Retry-After 秒后重试。
502UPSTREAM_ERROR引擎返回了无法使用的内容。请退避后重试。
502UPSTREAM_TIMEOUT引擎未能及时回答。请重试。
503SERVICE_UNAVAILABLE临时故障。请退避后重试。

全部错误代码见 Errors。失败的调用不计费。

价格

价格 每次调用 $0.0012。标价;单日调用超过 1,000 次后单价下调。

说明

  • 要追问,把回答中的 conversation.id 作为 conversation 传入。
  • Gemini 用提问所用的语言回答。

本页内容