AI-powered answers with real-time web search and source citations. Simple, predictable pricing.
Query the web for relevant sources
Extract content from top results
AI creates comprehensive response
Return answer with verifiable citations
Use llmlayer-fast for fast answers or llmlayer-web for flat pricing, or choose any other model.
from llmlayer import LLMLayerClient
client = LLMLayerClient(api_key="...")
# Flat $0.006 per request
response = client.answer(
query="What is quantum computing?",
model="llmlayer-web", # Required
citations=True
)
print(response.answer)
print(f"Sources: {len(response.sources)}")import { LLMLayerClient } from 'llmlayer';
const client = new LLMLayerClient({
apiKey: process.env.LLMLAYER_API_KEY
});
// Streaming - $0.006 flat
const stream = client.streamAnswer({
query: 'Explain machine learning',
model: 'llmlayer-web' // Required
});
for await (const chunk of stream) {
process.stdout.write(chunk.content);
}curl -X POST https://api.llmlayer.dev/api/v2/answer \
-H "Authorization: Bearer $LLMLAYER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "What is the capital of France?", "model": "llmlayer-web", "citations": true}'Token prices are per 1 million tokens. Use model parameter: provider/model-name (e.g., openai/gpt-5.1)
Real-time SSE streaming for chat interfaces
Structured responses with custom schemas
Inline [1] markers with source links
Simple pricing, no hidden costs
Custom instructions for tone and format
Run multiple searches for deeper research
Get your API key and start generating AI answers with citations. Free to start. No subscriptions.