Welcome to LLMLayer API

LLMLayer adds web search capabilities to 20+ LLMS. Our API lets you search the web using your preferred LLM provider - OpenAI, Anthropic, Groq, or DeepSeek - without vendor lock-in.

Key Features

Any Model

Use 20+ models from 4 providers. Switch with one parameter.

90% Cost Savings

Pay $ 0.004 per search

Real-time Search

Get current web data with citations and sources.

Streaming Support

Stream responses for better user experience.

API Endpoints

LLMLayer provides two main endpoints:

API Endpoints

  • /search - Get complete responses
  • /search_stream - Stream responses in real-time

Authentication

Authenticate using a Bearer token in your request headers:
{
  "headers": {
    "Authorization": "Bearer llm_xxxxxxxxxxxxx"
  }
}
Get your API key at llmlayer.ai. Start with $2 - no subscription required.

Getting Started

  1. Get your API key from llmlayer.ai
  2. Install the SDK: pip install llmlayer
  3. Make your first search:
from llmlayer import LLMLayerClient

client = LLMLayerClient(
    api_key="llm_xxxxxxxxxxxxx",
)

response = client.search(
    query="What happened today?",
    model="openai/o3",
    search_type="news",
    max_tokens=1000,
    temperature=0.5,
    citations=True,
    location='us'
)
See our Quickstart Guide for more examples and language support.