# Brave AI Mode

Get Brave AI Answers data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by LiteScrape, pass parameters such as country, language, q, and retrieve structured data including generated answer text, answer block text, reference indexes, source reference index, and source title for cited research views, and conversational discovery.

Documentation: https://openany.si/brave/brave-ai-mode/15dae969-80d3-4017-af88-ff101cc583be/
API ID: 15dae969-80d3-4017-af88-ff101cc583be
Provider: litescrape
Contract revision: 4
Method: POST
Endpoint: https://api.openany.si/v1/agent-apis/litescrape/api/brave/ai-mode
Page update time: 2026-12-03T02:48:58.370Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: application/json
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.00015 / call
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:48:57.750Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "150",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## Brave AI Answers API

POST q for a new answer or q with the latest continuation\_token for a follow-up. answer and text\_blocks reference indexed sources in references; omitted preferences can carry over from the conversation token.

## What You Can Build

- **Cited research views**: Connect answer blocks to their indexed source references.
- **Conversational discovery**: Continue a conversation with the latest returned token.

## Returned Data

| Field | Meaning |
| --- | --- |
| `answer` | Generated answer text. |
| `text_blocks[].snippet` | Answer block text. |
| `text_blocks[].reference_indexes[]` | Reference indices associated with a text block. |
| `references[].index` | Source reference index. |
| `references[].title` | Source title. |
| `references[].link` | Source URL. |
| `follow_up_questions[]` | Suggested follow-up question. |
| `continuation_token` | Opaque token for continuing the same conversation. |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Brave AI Mode request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "timeout": {
          "type": "number",
          "description": "Total request execution budget in seconds, greater than 0 and at most 90. Supply in the query string for GET or POST. page_timeout cannot extend this budget.",
          "maximum": 90
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    },
    "body": {
      "additionalProperties": false,
      "examples": [
        {
          "country": "us",
          "language": "en",
          "q": "How do rainbows form?",
          "safeSearch": "moderate",
          "units_of_measurement": "us"
        }
      ],
      "properties": {
        "continuation_token": {
          "anyOf": [
            {
              "maxLength": 4096,
              "minLength": 1,
              "pattern": "^ct2_[A-Za-z0-9_-]{100,}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Token from the previous response. Send with a new q to continue that conversation.\n\nOmitted preferences carry over from the token; supplied preferences override them. Use the latest token returned by each successful response. Treat this token as a conversation credential and keep it private. Prefer JSON POST for follow-ups. Tokens expire after one hour and require the same API key and endpoint; omit the token to start again.",
          "title": "Continuation Token",
          "x-litescrape": {
            "group": 0,
            "label": "Continuation token",
            "notes": [
              "Omitted preferences carry over from the token; supplied preferences override them. Use the latest token returned by each successful response.",
              "Treat this token as a conversation credential and keep it private. Prefer JSON POST for follow-ups. Tokens expire after one hour and require the same API key and endpoint; omit the token to start again."
            ],
            "summary": "Token from the previous response. Send with a new q to continue that conversation."
          }
        },
        "country": {
          "default": "us",
          "description": "Two-letter country preference, or all for all regions. Brave determines regional availability.",
          "pattern": "^(?:[a-z]{2}|all)$",
          "title": "Country",
          "type": "string",
          "x-litescrape": {
            "group": 1,
            "label": "Country",
            "summary": "Two-letter country preference, or all for all regions. Brave determines regional availability."
          }
        },
        "language": {
          "default": "en",
          "description": "Search language preference such as en, de or de-de. Brave also considers the language of your question when generating its answer.",
          "pattern": "^[a-z]{2}(?:-[a-z]{2})?$",
          "title": "Language",
          "type": "string",
          "x-litescrape": {
            "group": 1,
            "label": "Language",
            "summary": "Search language preference such as en, de or de-de. Brave also considers the language of your question when generating its answer."
          }
        },
        "lat": {
          "anyOf": [
            {
              "maximum": 90,
              "minimum": -90,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Latitude from -90 to 90. Supply with lon; explicit coordinates take precedence over location.",
          "title": "Lat",
          "x-litescrape": {
            "group": 1,
            "label": "Latitude",
            "summary": "Latitude from -90 to 90. Supply with lon; explicit coordinates take precedence over location."
          }
        },
        "location": {
          "anyOf": [
            {
              "maxLength": 256,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "City or postal code from the location catalog, such as Berlin, Germany or Austin, Texas, United States.\n\nQualify ambiguous names with a state or country. Unknown locations fail; lat and lon take precedence when supplied together. On follow-ups, a supplied location replaces inherited coordinates. Send location: null in JSON to clear an inherited location. Resolved coordinates are returned in search_parameters.",
          "title": "Location",
          "x-litescrape": {
            "group": 1,
            "label": "Location",
            "notes": [
              "Qualify ambiguous names with a state or country. Unknown locations fail; lat and lon take precedence when supplied together.",
              "On follow-ups, a supplied location replaces inherited coordinates. Send location: null in JSON to clear an inherited location. Resolved coordinates are returned in search_parameters."
            ],
            "summary": "City or postal code from the location catalog, such as Berlin, Germany or Austin, Texas, United States."
          }
        },
        "lon": {
          "anyOf": [
            {
              "maximum": 180,
              "minimum": -180,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Longitude from -180 to 180. Supply with lat.",
          "title": "Lon",
          "x-litescrape": {
            "group": 1,
            "label": "Longitude",
            "summary": "Longitude from -180 to 180. Supply with lat."
          }
        },
        "q": {
          "description": "Question for Brave AI Mode. Required for both a new conversation and each follow-up.",
          "maxLength": 2048,
          "minLength": 1,
          "title": "Q",
          "type": "string",
          "x-litescrape": {
            "group": 0,
            "label": "Question",
            "summary": "Question for Brave AI Mode. Required for both a new conversation and each follow-up."
          }
        },
        "safeSearch": {
          "default": "moderate",
          "description": "Adult-content filtering preference: off, moderate or strict.",
          "enum": [
            "off",
            "moderate",
            "strict"
          ],
          "title": "Safesearch",
          "type": "string",
          "x-litescrape": {
            "group": 2,
            "label": "Safe search",
            "summary": "Adult-content filtering preference: off, moderate or strict."
          }
        },
        "units_of_measurement": {
          "default": "us",
          "description": "Unit preference: us for US customary units or metric for metric units.",
          "enum": [
            "us",
            "metric"
          ],
          "title": "Units Of Measurement",
          "type": "string",
          "x-litescrape": {
            "group": 2,
            "label": "Units of measurement",
            "summary": "Unit preference: us for US customary units or metric for metric units."
          }
        }
      },
      "required": [
        "q"
      ],
      "title": "Request",
      "type": "object",
      "description": "Get Brave AI answers with citations."
    }
  },
  "required": [
    "path",
    "query",
    "headers",
    "body"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "answer": {
      "type": "string"
    },
    "continuation_token": {
      "type": "string"
    },
    "follow_up_questions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "references": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer"
          },
          "link": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        }
      }
    },
    "search_metadata": {
      "type": "object",
      "properties": {
        "brave_ai_mode_url": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "json_endpoint": {
          "type": "string"
        },
        "processed_at": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "total_time_taken": {
          "type": "number"
        }
      }
    },
    "search_parameters": {
      "type": "object",
      "properties": {
        "country": {
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "q": {
          "type": "string"
        },
        "safeSearch": {
          "type": "string"
        },
        "units_of_measurement": {
          "type": "string"
        }
      }
    },
    "submit_feedback_for_this_response_here": {
      "type": "string"
    },
    "text_blocks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "reference_indexes": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "snippet": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

## Request example
Scenario: Official example
```bash
curl \
  'https://api.openany.si/v1/agent-apis/litescrape/api/brave/ai-mode' \
  -X POST \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "country": "us",
  "language": "en",
  "q": "How do rainbows form?",
  "safeSearch": "moderate",
  "units_of_measurement": "us"
}'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "answer": "Rainbows form when sunlight is refracted, reflected and dispersed by water droplets.",
  "continuation_token": "<opaque token returned by a successful request>",
  "follow_up_questions": [
    "Why are the colors in that order?"
  ],
  "references": [
    {
      "index": 1,
      "link": "https://www.nesdis.noaa.gov/about/k-12-education/optical-phenomena/what-causes-rainbow",
      "title": "What Causes a Rainbow?"
    }
  ],
  "search_metadata": {
    "brave_ai_mode_url": "https://search.brave.com/ask?q=How+do+rainbows+form%3F",
    "created_at": "2026-10-09T12:00:00+00:00",
    "id": "brave-ai-example",
    "json_endpoint": "https://api.litescrape.com/api/brave/ai-mode",
    "processed_at": "2026-10-09T12:00:05+00:00",
    "status": "Success",
    "total_time_taken": 5.0
  },
  "search_parameters": {
    "country": "us",
    "language": "en",
    "q": "How do rainbows form?",
    "safeSearch": "moderate",
    "units_of_measurement": "us"
  },
  "submit_feedback_for_this_response_here": "https://ecll-litescrape-v3--site-api-web.modal.run/api/feedback/example-not-a-valid-token",
  "text_blocks": [
    {
      "reference_indexes": [
        1
      ],
      "snippet": "Rainbows form when sunlight is refracted, reflected and dispersed by water droplets.",
      "type": "text"
    }
  ]
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### How do I continue a conversation?
Send a new q with the latest continuation_token. Tokens expire after one hour and require the same API key and endpoint; omit the token to start again and keep it private as a conversation credential.

### How do citations connect to the answer?
Match text_blocks reference_indexes to references index values and retain the associated source links. A cited answer is generated text; consult the linked source when checking a claim.

### How do location preferences carry over?
lat and lon must be supplied together and take precedence over location. On follow-ups, a supplied location replaces inherited coordinates; location:null clears an inherited location in JSON.

### Do language and units change the question?
language is a search-language preference and the answer also considers the question’s language. units_of_measurement selects us or metric; country accepts a two-letter preference or all.

### Where should I set the request timeout?
Set timeout in the query string, including for POST requests. It must be greater than 0 and at most 90 seconds; page_timeout cannot extend this total execution budget.

### Can I add arbitrary parameters to the JSON body?
Use the body fields exposed by this implementation. Its JSON schema rejects additional properties; query parameters such as timeout belong outside the JSON body.

## Available implementations
- litescrape: https://openany.si/brave/brave-ai-mode/15dae969-80d3-4017-af88-ff101cc583be/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
