per-query$4.3B vector DB + web search

Per-Query Billing for Search and RAG Pipelines

Bill every web search, vector retrieval, and document query your AI agents make. Per-query metering for Brave, Exa, Pinecone, Weaviate, and any search API.

How it works

TypeScript
import { settlegrid } from '@settlegrid/mcp'

const sg = settlegrid.init({
  toolSlug: 'my-search-api',
  pricing: {
    defaultCostCents: 2,
    methods: {
      'web_search': { costCents: 2 },
      'vector_query': { costCents: 5 },
    },
  },
})

const billedSearch = sg.wrap(async (args: { query: string }) => {
  const results = await braveSearch(args.query)
  return { content: [{ type: 'text', text: JSON.stringify(results) }] }
})

Supported providers

SettleGrid works with any provider. Here are the most common ones for search & rag.

ProviderPricing
Brave SearchWeb search API -- $0.002/query
ExaNeural search -- $0.001-0.004/query
TavilyAI-optimized search -- $0.003/query
PineconeVector database -- per-read pricing
WeaviateVector search -- per-query pricing
QdrantOpen-source vector DB -- self-hosted or cloud
Billing model: per-query

Why per-query billing?

Search and RAG pipelines naturally bill per-query because each retrieval has a discrete cost. Whether your agent calls a web search API, runs a vector similarity query, or fetches documents from a knowledge base, SettleGrid meters each operation independently. You can set different rates for different retrieval methods.

$4.3B

Total Addressable Market

6

Supported Providers

2 min

Setup Time

Frequently asked questions

Can I bill differently for web search vs vector queries?
Yes. SettleGrid supports method-level pricing, so you can charge 2 cents for a web search and 5 cents for a vector query. Just pass the method name when calling sg.wrap().
How does billing work for multi-step RAG pipelines?
Each step in your RAG pipeline (retrieval, re-ranking, generation) can be wrapped separately with its own pricing. Or wrap the entire pipeline as a single billable unit -- your choice.
What about hybrid search (keyword + vector)?
Wrap the hybrid search as a single operation with a combined price, or break it into separate billable calls. SettleGrid is flexible -- you define what constitutes a billable event.
Can I pass search costs through to my users?
Yes. Set your SettleGrid pricing to your upstream cost plus your margin. Your users see a clear per-query price, and you pocket the difference automatically.

Start billing search & rag today

Add per-query billing to your search & rag service in under 2 minutes. No upfront costs, no contracts.

SettleGrid Help

AI-powered support

How can I help?

Ask me anything about SettleGrid