Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.llmlayer.ai/llms.txt

Use this file to discover all available pages before exploring further.

Welcome to LLMLayer API

LLMLayer adds web search capabilities to multiple LLMs. Our API lets you search the web using your preferred model - OpenAI models or LLMLayer’s own optimized models - without vendor lock-in.

Key Features

Any Model

Use multiple models from top 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 the following endpoints:

Answer API

/api/v2/answer - AI-powered answers with web search

Answer Stream

/api/v2/answer_stream - Stream answers in real-time

Web Search

/api/v2/web_search - Raw search results

Scraper

/api/v2/scrape - Extract page content

Map

/api/v2/map - Discover website URLs

Crawl

/api/v2/crawl_stream - Multi-page crawling

YouTube Transcript

/api/v2/youtube_transcript - Extract video transcripts

PDF Content

/api/v2/get_pdf_content - Extract PDF text

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="llmlayer-web",  # Recommended
    search_type="news",
    max_tokens=1000,
    temperature=0.5,
    citations=True,
    location='us'
)
See our Answer API Guide for full examples and language support.