Sand AISand AI MAGI-2MAGI-2 が SandBase に登場しました: ネイティブ音声付き 1080p 動画今すぐ試す

Brave AI Mode

APIドキュメント
https://api.sandbase.ai/v1/api/brave/ai-mode

Get the AI-generated answer Brave Search shows for a query, with answer text, cited sources and location and language options.

料金
$0.01USD / 回
メソッド
POST
レスポンス
JSON
パラメータ
必須 1 件 · 任意 9 件

プレイグラウンド

入力
Parameter defines the query you want to search.
Parameter defines from where you want the search to originate. If several locations match the location requested, we'll pick the most popular one. Head to the /locations.json API if you need more precise control. It is recommended to specify `location` at the city level in order to simulate a real user’s search. If `location` is omitted, the search may take on the location of the proxy. Parameter can't be used with `lat` or `lon` parameters.
Parameter defines a GPS latitude for the search origin. Parameter is required when using `lon` parameter. Parameter can't be used with `location` parameter.
Parameter defines a GPS longitude for the search origin. Parameter is required when using `lat` parameter. Parameter can't be used with `location` parameter.
Parameter defines the country to use for the Brave AI search. It's a two-letter country code. (e.g., `us` for the United States, `uk` for United Kingdom, or `fr` for France). Head to the Brave countries page for a full list of supported Brave AI Mode countries.
Parameter defines the language to use for the Brave AI search. It's a two-letter language code. (e.g., `en` for English, `es` for Spanish, or `fr` for French). Head to the Brave languages page for a full list of supported Brave AI Mode languages.
Parameter defines the level of filtering for adult content. It can be set to: `off` - Off `moderate` - Moderate `strict` - Strict
Parameter defines the units of measurement to use. It can be set to: `metric` - Metric `us` - Imperial (US)
Parameter defines the token used to continue a Brave AI Mode conversation. Pass this token to send a follow-up question that includes the prior exchange as context (multi-turn). The token is returned by the API from your previous request using our Brave AI Mode API. When using this token, include a new `q` for your follow-up prompt. For consistent behavior, reuse the same localization settings (`gl`, `hl`, and location) you used to obtain the token.
Parameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.
出力準備完了

出力はここに表示されます

入力を完了してから[実行]をクリックしてください。

API README

Brave AI Mode

Get the AI-generated answer Brave Search shows for a query, with answer text, cited sources and location and language options.

Request

curl -X POST "https://api.sandbase.ai/v1/api/brave/ai-mode" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q": "How does a heat pump work?"}'

The result is returned in outputs[0].data as structured JSON.

Parameters

NameTypeRequiredDescription
qstringYesParameter defines the query you want to search.
locationstringNoParameter defines from where you want the search to originate. If several locations match the location requested, we'll pick the most popular one. Head to the /locations.json API if you need more precise control. It is recommended to specif
latstringNoParameter defines a GPS latitude for the search origin. Parameter is required when using lon parameter. Parameter can't be used with location parameter.
lonstringNoParameter defines a GPS longitude for the search origin. Parameter is required when using lat parameter. Parameter can't be used with location parameter.
countrystringNoParameter defines the country to use for the Brave AI search. It's a two-letter country code. (e.g., us for the United States, uk for United Kingdom, or fr for France). Head to the Brave countries page for a full list of supported Bra
languagestringNoParameter defines the language to use for the Brave AI search. It's a two-letter language code. (e.g., en for English, es for Spanish, or fr for French). Head to the Brave languages page for a full list of supported Brave AI Mode lang
safeSearchstringNoParameter defines the level of filtering for adult content. It can be set to: off - Off moderate - Moderate strict - Strict
units_of_measurementstringNoParameter defines the units of measurement to use. It can be set to: metric - Metric us - Imperial (US)
subsequent_request_tokenstringNoParameter defines the token used to continue a Brave AI Mode conversation. Pass this token to send a follow-up question that includes the prior exchange as context (multi-turn). The token is returned by the API from your previous request us
json_restrictorstringNoParameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.

Pricing

$0.010 per successful call. Failed calls are not charged.

さらに探索

関連 APIs

すべての APIs
API価格レスポンス
Brave AI Modeこの API
Brave
$0.01 / 回JSON
Brave$0.005 / 回JSON
Brave$0.005 / 回JSON
Brave$0.005 / 回JSON
Brave$0.005 / 回JSON
Brave$0.005 / 回JSON

質問

FAQ

Brave AI Mode API はどのように使いますか?

Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/brave/ai-mode に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。

Brave AI Mode API の料金はいくらですか?

1回あたり $0.01、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。

Brave AI Mode API はどのパラメータを受け付けますか?

必須: q (string)。 任意: location (string), lat (string), lon (string), country (string), language (string) と safeSearch (string) と他 3 件。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。

Brave AI Mode API は何を返しますか?

同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。

Brave の開発者アカウントまたは API key は必要ですか?

いいえ。Brave AI Mode は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。Brave の API アクセスを別途申請する必要はありません。