promptstringобязательно
The question or prompt to answer with Google AI Mode.
https://api.sandbase.ai/v1/api/google/ai-modeAsk Google AI Mode a prompt and receive the cited answer it generates. AI Mode composes the answer at search time, so repeat calls on one prompt can differ in wording and in which sources are cited.
Ваш результат появится здесь
Заполните входные данные, затем нажмите «Запустить».
Returns the answer Google AI Mode generates for a text prompt, plus the sources it cites. It needs one input, a prompt string with the question to answer.
curl -X POST "https://api.sandbase.ai/v1/api/google/ai-mode" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "What is the Model Context Protocol and who maintains it?"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | The question or prompt to answer with Google AI Mode. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"answer": "The Model Context Protocol (MCP) is an open standard and open-source framework d…",
"answerMarkdown": "The Model Context Protocol (MCP) is an open standard and open-source framework d…",
"citations": [
{
"title": "Wikipedia",
"url": "https://en.wikipedia.org/wiki/Model_Context_Protocol"
}
],
"prompt": "What is the Model Context Protocol and who maintains it?"
},
"found": true
}
| Field | Meaning |
|---|---|
data.answer | The generated answer as plain text. |
data.answerMarkdown | The same answer in Markdown. Use it when you want to keep the formatting of the answer. |
data.citations[] | List of sources cited in the answer. |
data.citations[].title | Title of the cited source, such as a site or page name. |
data.citations[].url | Link to the cited page. |
data.prompt | The prompt that the answer was generated for. It repeats the prompt you sent. |
found | true when AI Mode returned a result for the prompt. |
prompt. The request takes no other parameters and has no pagination.outputs[0].data.Billed at the actual cost of each call, about $0.002 for the request above. Failed calls are not charged.
Начните разработку
Конечная точка платформенного API с единообразной аутентификацией и учётом использования.
curl -X POST "https://api.sandbase.ai/v1/api/google/ai-mode" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "What is the Model Context Protocol and who maintains it?"
}'Укажите свой ключ SandBase API в окружении сервера. Запросы используют аутентификацию Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Храните ключ на сервере. Не раскрывайте его в коде браузера.
promptstringобязательноThe question or prompt to answer with Google AI Mode.
Сохранённый пример ответа для этого API; при просмотре живой запрос не выполняется.
Сохранённый ответ не опубликован. Запустите API в Playground, чтобы посмотреть его ответ.
Посмотреть больше
| API | Цена | Ответ |
|---|---|---|
Google AI ModeЭтот API Google | От $0.002 за запрос | JSON |
Google | $0.01 за запрос | JSON |
Google | $0.015 за запрос | JSON |
Google | От $0.0015 за запрос | JSON |
Google | $0.01 за запрос | JSON |
Google | $0.01 за запрос | JSON |
Руководства:Best Google API in 2026: Pricing Compared
Вопросы
Отправьте POST-запрос на https://api.sandbase.ai/v1/api/google/ai-mode, указав ключ SandBase API в заголовке Authorization (Bearer), а параметры — в теле JSON. Вы также можете попробовать это в Playground на этой странице без написания кода.
От $0.002 за вызов, списывается с баланса SandBase. Оплата взимается только за сделанные вызовы; подписка не требуется.
Обязательные: prompt (string). В таблице Parameters и в Playground на этой странице перечислены все поля.
JSON-ответ, возвращаемый в том же HTTP-запросе (синхронно). В README на этой странице приведен пример ответа.
Нет. Google AI Mode работает через SandBase, поэтому один API key SandBase покрывает этот endpoint и все остальные API и модели в каталоге. Вам не нужно отдельно запрашивать доступ к API Google.