qstringआवश्यक
Parameter defines the query you want to search.
https://api.sandbase.ai/v1/api/brave/ai-modeGet the AI-generated answer Brave Search shows for a query, with answer text, cited sources and location and language options.
आपका आउटपुट यहाँ दिखाई देगा
इनपुट पूरा करें, फिर Run पर क्लिक करें।
Get the AI-generated answer Brave Search shows for a query, with answer text, cited sources and location and language options.
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.
| Name | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Parameter defines the query you want to search. |
location | string | No | 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 specif |
lat | string | No | Parameter defines a GPS latitude for the search origin. Parameter is required when using lon parameter. Parameter can't be used with location parameter. |
lon | string | No | Parameter defines a GPS longitude for the search origin. Parameter is required when using lat parameter. Parameter can't be used with location parameter. |
country | string | No | 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 Bra |
language | string | No | 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 lang |
safeSearch | string | No | Parameter defines the level of filtering for adult content. It can be set to: off - Off moderate - Moderate strict - Strict |
units_of_measurement | string | No | Parameter defines the units of measurement to use. It can be set to: metric - Metric us - Imperial (US) |
subsequent_request_token | string | No | 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 us |
json_restrictor | string | No | 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. |
$0.010 per successful call. Failed calls are not charged.
बिल्डिंग शुरू करें
एकीकृत authentication और usage tracking के साथ Platform API endpoint.
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?"
}'अपने SandBase API key को अपने सर्वर environment में सेट करें। Requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"अपना key सर्वर पर रखें। इसे browser code में expose न करें।
qstringआवश्यकParameter defines the query you want to search.
locationstringParameter 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.
latstringParameter defines a GPS latitude for the search origin. Parameter is required when using `lon` parameter. Parameter can't be used with `location` parameter.
lonstringParameter defines a GPS longitude for the search origin. Parameter is required when using `lat` parameter. Parameter can't be used with `location` parameter.
countrystringParameter 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.
languagestringParameter 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.
safeSearchstringParameter defines the level of filtering for adult content. It can be set to: `off` - Off `moderate` - Moderate `strict` - Strict
units_of_measurementstringParameter defines the units of measurement to use. It can be set to: `metric` - Metric `us` - Imperial (US)
subsequent_request_tokenstringParameter 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.
json_restrictorstringParameter 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 के लिए सेव किया गया example response; इसे देखते समय कोई live request नहीं की जाती।
कोई सेव response प्रकाशित नहीं किया गया है। इसका response देखने के लिए Playground में API चलाएँ।
और जानें
| 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 |
प्रश्न
https://api.sandbase.ai/v1/api/brave/ai-mode पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।
$0.01 प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।
आवश्यक: q (string)। वैकल्पिक: location (string), lat (string), lon (string), country (string), language (string) और safeSearch (string) और 3 और। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।
एक JSON response जो उसी HTTP request में लौटाया जाता है (synchronous)।
नहीं। Brave AI Mode SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से Brave API access के लिए आवेदन करने की आवश्यकता नहीं है।