---
title: "Answer"
description: "向 ChatGPT 提问并获取回答，附带引用、来源、卡片和提及。"
---

> Every apinoa docs page as markdown: https://apinoa.com/llms.txt (all in one file: https://apinoa.com/llms-full.txt; this API family in one file: https://apinoa.com/docs/answers/llms.txt)

```http
POST /v1/chatgpt/answer
```

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

## 请求

```bash tab="cURL"
curl -X POST "https://gateway.apinoa.com/v1/chatgpt/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"}'
```

```js tab="JavaScript"
const res = await fetch("https://gateway.apinoa.com/v1/chatgpt/answer", {
  method: "POST",
  headers: { "x-api-key": process.env.APINOA_API_KEY, "content-type": "application/json" },
  body: JSON.stringify({ prompt: "What are the best running shoes for beginners?", country: "US" }),
});
const { success, data, error } = await res.json();
```

```python tab="Python"
import os

import requests

res = requests.post(
    "https://gateway.apinoa.com/v1/chatgpt/answer",
    json={"prompt": "What are the best running shoes for beginners?", "country": "US"},
    headers={"x-api-key": os.environ["APINOA_API_KEY"]},
    timeout=120,
)
body = res.json()
```

## 参数

| Parameter | Type | Required | Notes |
|---|---|---|---|
| `prompt` | string | yes | The question, as a person would type it. |
| `conversation` | string |  | An earlier answer's `conversation.id`: ask a follow-up in the same conversation. |
| `country` | string |  | The market the answer is asked from, as an ISO 3166 country code. Each engine's page lists its countries. |
| `include` | enum list |  | `page`: also return the answer as a self-contained HTML page, in `page`. |
| `photos` | string[] |  | Up to four photos to ask about: https URLs, or `data:image/…;base64,` URLs. |

The same parameters, and every response type, are in the OpenAPI document: https://apinoa.com/openapi.json

## 响应

在 `data` 中返回 [`Answer`](/docs/api-reference/answers/response-schema#answer)。 真实响应的节选：数组只保留前几项，长文本已截断。

```json
{
  "success": true,
  "data": {
    "engine": "chatgpt",
    "outcome": "answered",
    "prompt": "What are the best running shoes for beginners?",
    "askedAt": "2026-10-30T01:00:31.899Z",
    "country": "US",
    "blocks": [
      {
        "type": "paragraph",
        "markdown": "If you're just getting into running, I'd recommend starting with a pai…"
      },
      {"type": "paragraph", "markdown": "Here are my top recommendations for beginners in 2026."},
      {"type": "cards", "cards": [0]}
    ],
    "text": "If you're just getting into running, I'd recommend starting with a pai…",
    "markdown": "If you're just getting into running, I'd recommend starting with a pai…",
    "citations": [],
    "sources": [
      {
        "url": "https://www.rtings.com/running-shoes/reviews/best/beginners",
        "cited": false,
        "title": "The 6 Best Running Shoes for Beginners of 2026 - RTINGS.com",
        "site": "www.rtings.com",
        "favicon": "https://www.google.com/s2/favicons?domain=https://www.rtings.com&sz=32"
      }
    ],
    "mentions": [
      {
        "name": "Brooks Ghost 18",
        "kind": "product",
        "category": "product",
        "at": 305,
        "ext": {"badges": ["Best overall"]}
      }
    ],
    "cards": [
      {
        "type": "image",
        "title": "Brooks Ghost 18 Men's Primer Grey/Oyster Mushroom – Holabird Sports",
        "url": "https://www.holabirdsports.com/products/brooks-ghost-18-mens-primer-gr…",
        "image": "https://images.openai.com/static-rsc-4/gdRYkLjq-bR17fW27V3af80NtFn4L9l…",
        "thumbnail": "https://images.openai.com/static-rsc-4/aoryHYHPeH-VtbKe9AMq-CeuVyRNzQu…",
        "width": 800,
        "height": 800,
        "sponsored": false,
        "ext": {
          "original": "https://www.holabirdsports.com/cdn/shop/files/044666_1_800x.jpg?v=1779…",
          "query": "Brooks Ghost 18 running shoes"
        }
      }
    ],
    "suggestions": [
      {
        "text": "Find my best running shoes",
        "prompt": "Recommend the best beginner running shoes based on these preferences:…"
      }
    ],
    "ext": {
      "useCase": "shopping",
      "modelExperience": "instant",
      "steps": ["Searching the web"],
      "layout": {
        "program": "function __dilSafe(evaluate,failureValue){try{return evaluate()}catch{…",
        "constants": {
          "0": "If you're just getting into running, I'd recommend starting with a pai…",
          "1": "comfortable, well-cushioned daily running shoes",
          "2": ". You don't need expensive racing shoes or anything overly technical.",
          "3": "Here are my top recommendations for beginners in 2026.",
          "4": "🏃 Best running shoes for beginners",
          "5": "a588d0a9-b3f2-5d84-b96a-e7dbc7573701",
          "6": "Best overall",
          "7": "1. ",
          "8": "Brooks Ghost 18",
          "9": "3ffebd24-1b61-5e95-8b90-4667c80853e6",
          "10": "$150",
          "11": "Comfortable, balanced cushioning.",
          "12": "Great for everyday road running.",
          "13": "A reliable first running shoe.",
          "14": "Best if you want one shoe for most runs.",
          "15": "339f3929-b005-5464-9db1-8a1b00da4b7e",
          "16": "Best cushioned all-rounder",
          "17": "2. ",
          "18": "ASICS Novablast 6",
          "19": "8b156f63-e995-50c6-9723-932c37fb8cb4",
          "20": "Soft, responsive cushioning.",
          "21": "Lightweight feel.",
          "22": "Great for building up running distance.",
          "23": "Best if you want comfort with a little bounce.",
          "24": "caeda85d-331b-5956-b5d3-e030ea256046",
          "25": "3. ",
          "26": "HOKA Clifton 11",
          "27": "0fc28757-f71e-5bfe-a04f-e3f232ba79fb",
          "28": "$155",
          "29": "Soft, protective cushioning.",
          "30": "Lightweight for its cushioning level.",
          "31": "Excellent for run/walk training.",
          "32": "Best if you're starting with a Couch to 5K plan.",
          "33": "6a501449-4b60-543b-91b6-71a191bd9f68",
          "34": "4. ",
          "35": "Nike Vomero 18",
          "36": "5212da76-3de1-5bcb-80f1-b7b378478858",
          "37": "$155",
          "38": "Plush, maximum cushioning.",
          "39": "Comfortable for longer easy runs.",
          "40": "Soft and responsive underfoot.",
          "41": "Best if comfort is your biggest priority.",
          "42": "eac36d13-dd19-5522-8e8e-ff2ed1602705",
          "43": "5. ",
          "44": "New Balance Fresh Foam 680 v9",
          "45": "1bbf6e8f-3c49-5733-af2d-0e07430e50e3",
          "46": "Practical everyday trainer.",
          "47": "Comfortable cushioning.",
          "48": "A good option for budget-conscious beginners.",
          "49": "Best for an affordable first pair.",
          "50": "a4e63692-5937-5d73-bfab-3b417068dc56",
          "51": "6. ",
          "52": "Brooks Adrenaline GTS 25",
          "53": "386c636a-91f2-503d-a31e-c46a6537de44",
          "54": "Supportive stability design.",
          "55": "Comfortable cushioning.",
          "56": "Useful if you prefer more guidance underfoot.",
          "57": "Best if you need a stability shoe.",
          "58": "Prices are approximate US retail prices. Recommendations informed by ",
          "59": "Runner's World",
          "60": "25bfac6e-fbcd-5e68-a028-1e13eb99de53",
          "61": " and ",
          "62": "RTINGS 2026 testing",
          "63": "dedf923e-efb9-5796-821d-1bd07d4a9183",
          "64": ".",
          "65": "What should you look for as a beginner?",
          "66": "My advice:",
          "67": "Cushioning:",
          "68": " Look for comfortable cushioning, but not necessarily the thickest sol…",
          "69": "Fit:",
          "70": " Leave about a thumb's width of space between your longest toe and the…",
          "71": "Width:",
          "72": " Your toes should be able to spread naturally.",
          "73": "Weight:",
          "74": " Avoid unnecessarily heavy shoes.",
          "75": "Support:",
          "76": " Don't assume you need stability shoes just because you're a beginner.",
          "77": "Try shoes on later in the day when your feet are slightly swollen, and…",
          "78": "Let me narrow it down to the best shoe for you",
          "79": "A few details will help me recommend the right pair rather than just t…",
          "80": "1. What's your budget?",
          "81": "Under $80",
          "82": "$80–$100",
          "83": "$100–$150",
          "84": "$150–$200",
          "85": "No limit",
          "86": "2. What's your main goal?",
          "87": "Start running / lose weight",
          "88": "Train for a 5K",
          "89": "Run a 10K or longer",
          "90": "Improve fitness and endurance",
          "91": "Run and walk for general health",
          "92": "3. Where will you run?",
          "93": "Road / pavement",
          "94": "Treadmill",
          "95": "Trails / parks",
          "96": "Combination of surfaces",
          "97": "4. What's most important?",
          "98": "Maximum comfort and cushioning",
          "99": "Lightweight and flexible",
          "100": "Extra stability and support",
          "101": "Best value for money",
          "102": "Find my best running shoes",
          "103": "I'll use your answers to narrow it down to the three shoes I'd recomme…"
        }
      },
      "forms": [
        {
          "suggestion": 0,
          "submit": "Find my best running shoes",
          "prompt": "Recommend the best beginner running shoes based on these preferences:…",
          "fields": [
            {
              "name": "budget",
              "control": "radio-group",
              "options": [{"value": "Under $80", "label": "Under $80"}],
              "default": "100–150",
              "label": "1. What's your budget?"
            }
          ]
        }
      ]
    },
    "conversation": {"id": "c_f2Yfh5reFisXUt4Wga6Mkw", "turn": 1, "expiresAt": "2026-10-30T04:00:43.744Z"}
  }
}
```

## 错误

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

全部错误代码见 [Errors](/docs/errors)。失败的调用不计费。

## 价格

**Price** $0.0012 per call. [List price](https://apinoa.com/en/pricing); the rate steps down above 1,000 calls a day.

## 说明

- 要追问，把回答中的 `conversation.id` 作为 `conversation` 传入。
- `photos` 最多接受四张要提问的图片，格式为 https URL 或 `data:image/…;base64,` URL。
- ChatGPT 用提问所用的语言回答。
