# Brave LLM Context > Web search for AI agents from Brave's independent index - returns pre-extracted, relevance-ranked snippets per source, sized to a token budget, ready to drop into an LLM prompt. 12 credits per request. - **Provider**: brave-llm-context - **Model ID**: brave/llm-context - **Category**: web_search - **Credits**: 12 per request - **Pricing Type**: fixed ## API Endpoint Base URL: https://api.core.today/v1 ### Create Prediction POST /predictions ### Get Status GET /predictions/{job_id} ### Cancel DELETE /predictions/{job_id} ## Authentication Header: `X-API-Key: YOUR_API_KEY` ## Input Parameters - `q` (string, **required**): The search query (max 600 characters, 75 words). - `maximum_number_of_snippets` (integer, optional): Max text snippets in the context (1-256, default 50). (Range: min: 1, max: 256) - `maximum_number_of_snippets_per_url` (integer, optional): Max snippets per URL (1-100, default 50). (Range: min: 1, max: 100) - `country` (string, optional): Country the results come from (ALL for worldwide). (Default: `US`; Options: `AR`, `AU`, `AT`, `BE`, `BR`, `CA`, `CL`, `DK`, `FI`, `FR`, `DE`, `GR`, `HK`, `IN`, `ID`, `IT`, `JP`, `KR`, `MY`, `MX`, `NL`, `NZ`, `NO`, `CN`, `PL`, `PT`, `PH`, `RU`, `SA`, `ZA`, `ES`, `SE`, `CH`, `TW`, `TR`, `GB`, `US`, `ALL`) - `safesearch` (string, optional): Adult content filtering. (Options: `off`, `moderate`, `strict`) - `count` (integer, optional): Search results considered for context selection (1-50, default 20). (Range: min: 1, max: 50) - `context_threshold_mode` (string, optional): Relevance threshold for including content - strict keeps less, lenient keeps more. (Options: `disabled`, `strict`, `lenient`, `balanced`) - `freshness` (string, optional): Page age filter - pd (24h), pw (7 days), pm (31 days), py (365 days) or YYYY-MM-DDtoYYYY-MM-DD. - `maximum_number_of_urls` (integer, optional): Max distinct URLs in the context (1-50, default 20). (Range: min: 1, max: 50) - `maximum_number_of_tokens` (integer, optional): Approximate max tokens in the context (1024-32768, default 8192). (Range: min: 1,024, max: 32,768) - `spellcheck` (boolean, optional): Spell-check the query and search with the correction. (Default: `true`) - `goggles` (array, optional): Up to 3 Goggles (URL or inline definition) to re-rank results. - `enable_source_metadata` (boolean, optional): Add site name, favicon, thumbnail and description to sources. (Default: `false`) - `maximum_number_of_tokens_per_url` (integer, optional): Max tokens per URL (512-8192, default 4096). (Range: min: 512, max: 8,192) - `search_lang` (string, optional): Search language, e.g. ko, en, ja, en-gb, zh-hans. (Default: `en`) ## Example Request ```json { "model": "brave/llm-context", "input": { "q": "latest AI video generation models", "country": "US", "search_lang": "en", "maximum_number_of_tokens": 4096 } } ``` ## Response Format ```json { "job_id": "abc123", "status": "pending", "provider": "brave-llm-context", "model": "brave/llm-context", "created_at": "2026-01-01T00:00:00Z", "result": null, "error": null, "credits_used": null } ``` Status values: `pending`, `processing`, `completed`, `failed`, `cancelled` When the job is `completed`, `result` holds the output URL(s) or data and `credits_used` the net credits charged. When it is `failed`, `error` and `error_code` say why and the charge is refunded. ## Usage Flow 1. POST /predictions with model and input → receive job_id 2. Poll GET /predictions/{job_id} until status is `completed` or `failed` 3. Result contains output URL(s) or data ## Pricing - 12 credits per request These are list prices. The amount charged is rounded, and large charges are discounted progressively. `POST /predictions/estimate` with the same `model` and `input` returns the charge for that input without creating a job (an estimate when the price depends on the output). ## Output Type json ## Tags brave, search, llm-context, grounding, rag, agent ## Documentation https://api-dashboard.search.brave.com/api-reference/ai/llm_context/get