API Parameters

This guide covers all available parameters for the LLMLayer search API.

Required Parameters

query
string
required
The search query or question you want to ask. Be as specific as possible for better results.Example: "What are the latest developments in quantum computing?"
model
string
required
The LLM model to use for processing the search results.Supported models : -"openai/gpt-5" -"openai/gpt-5-mini" -"openai/gpt-5-nano"
  • "openai/o3"
  • "openai/o3-mini"
  • "openai/o4-mini"
  • "openai/gpt-4.1"
  • "openai/gpt-4.1-mini"
  • "openai/gpt-4o"
  • "openai/gpt-4o-mini"
  • "groq/openai-gpt-oss-120b"
  • "groq/openai-gpt-oss-20b"
  • "groq/kimi-k2"
  • "groq/qwen3-32b"
  • "groq/llama-3.3-70b-versatile"
  • "groq/deepseek-r1-distill-llama-70b"
  • "groq/llama-4-maverick-17b-128e-instruct"
  • "deepseek/deepseek-chat"
  • "deepseek/deepseek-reasoner"
  • "anthropic/claude-sonnet-4"

Optional Parameters

return_sources
boolean
default:"false"
Include source URLs and metadata in the response. Useful for citations and verification.
return_images
boolean
default:"false"
  • Include relevant images found during the search (when available).
  • if set to true, it’s will cost an additional 0.001 $.
citations
boolean
default:"false"
Add inline citations [1] in the response text that reference the sources.
max_tokens
integer
default:"1500"
Maximum number of tokens in the LLM response. (limit is your model max tokens)
temperature
float
default:"0.7"
Controls randomness in the response. Range: 0.0-1.0.
  • Lower values (0.0-0.3): More focused and deterministic
  • Higher values (0.7-1.0): More creative and varied
search_type
string
default:"general"
Type of search to perform.Options:
  • "general": Web-wide search
  • "news": Recent news articles only
date_filter
string
default:"anytime"
Filter results by recency.Options: "anytime", "hour", "day", "week", "month", "year"
location
string
default:"us"
Country code for localized search results. See supported locations below.
response_language
string
default:"auto"
Language for the response. "auto" detects from query. See supported languages below.
search_context_size
string
default:"medium"
Size of the search context to use for the LLM.Options:
  • "low": Small context, faster but less comprehensive
  • "medium": Balanced context size (default)
  • "high": Large context, more comprehensive but slower and more expensive in input tokens
answer_type
string
default:"markdown"
Format of the response.Options:
  • "markdown": Formatted text with headers, lists, etc.
  • "html": HTML formatted response
  • "json": Structured JSON (requires json_schema)
json_schema
string
Required when answer_type="json". Defines the expected JSON structure.Example:
{
    "films":[
        {
            "title": {"type": "string"},
            "release_year": {"type": "integer"},
            "director": {"type": "string"},
            "cast": {
            "type": "array",
            "items": {"type": "string"}
            }
        }
    ]
}
domain_filter
array
Restrict search to specific domains. Useful for trusted sources.
  • Example: ["pubmed.gov", "nature.com", "arxiv.org"]
  • ["pubmed.com", "nature.com"] to include domains and add "-" to exclude domains, e.g. ["pubmed.com", "-nature.com"]
  • Never use http:// or https:// prefixes, just the domain name.
max_queries
integer
default:"1"
  • Number of search queries LLMLayer should generate internally. Range: 1-5.
  • Higher values may find more comprehensive results.
  • each search query will cost 0.004 $.
system_prompt
string
Override the default system prompt. Use this for specialized behavior.Example: "You are a medical research assistant. Focus on peer-reviewed sources."
provider_key
string
Your API key from your selected model provider.
  • this is an option we have added to allow you to use your own keys and be charged directly by the model provider.
  • sometimes we hit Rate Limits ( specially with Anthropic and Groq ), so you can use your own keys to avoid this.
  • Example: "sk-..." for OpenAI, "sk-ant-..." for Anthropic
  • we support models from 4 providers (OpenAI, Anthropic, DeepSeek, Groq) and you can use your own keys for all of them.

Supported Locations

The location parameter accepts country codes for localized results:

🇺🇸 us

United States

🇨🇦 ca

Canada

🇬🇧 uk

United Kingdom

🇲🇽 mx

Mexico

🇪🇸 es

Spain

🇩🇪 de

Germany

🇫🇷 fr

France

🇵🇹 pt

Portugal

🇧🇪 be

Belgium

🇳🇱 nl

Netherlands

🇨🇭 ch

Switzerland

🇳🇴 no

Norway

🇸🇪 se

Sweden

🇦🇹 at

Austria

🇩🇰 dk

Denmark

🇫🇮 fi

Finland

🇹🇷 tr

Turkey

🇮🇹 it

Italy

🇵🇱 pl

Poland

🇷🇺 ru

Russia

🇿🇦 za

South Africa

🇦🇪 ae

UAE

🇸🇦 sa

Saudi Arabia

🇦🇷 ar

Argentina

🇧🇷 br

Brazil

🇦🇺 au

Australia

🇨🇳 cn

China

🇰🇷 kr

Korea

🇯🇵 jp

Japan

🇮🇳 in

India

🇵🇸 ps

Palestine

🇰🇼 kw

Kuwait

🇴🇲 om

Oman

🇶🇦 qa

Qatar

🇮🇱 il

Israel

🇲🇦 ma

Morocco

🇪🇬 eg

Egypt

🇮🇷 ir

Iran

🇱🇾 ly

Libya

🇾🇪 ye

Yemen

🇮🇩 id

Indonesia

🇵🇰 pk

Pakistan

🇧🇩 bd

Bangladesh

🇲🇾 my

Malaysia

🇵🇭 ph

Philippines

🇹🇭 th

Thailand

🇻🇳 vn

Vietnam

Supported Languages

The response_language parameter controls the output language:

auto

Auto-detect (default)

en

English

fr

French

es

Spanish

de

German

it

Italian

pt

Portuguese

nl

Dutch

ja

Japanese

ko

Korean

zh

Chinese

ar

Arabic

ru

Russian

tr

Turkish

hi

Hindi