Skip to the page

uni-api

Add SpecStream to uni-api's api.yaml as a search provider, beside or in place of Jina and Tavily, and uni-api's /v1/search endpoint answers from the live web through the SpecStream Search API.

SpecStream for uni-apiAgent frameworks & builders

What you need

  • uni-api with an api.yaml you can edit, mounted in the container or loaded from CONFIG_URL.
  • A SpecStream API key. New accounts start with $10 of credit, no card. Create an account.
  1. 1. Get a SpecStream key

    Get your key on the Search API screen of your SpecStream workspace.

  2. 2. Add the provider to api.yaml

    uni-api sends Tavily's search request to every search provider that is not Jina. SpecStream answers Tavily's request at its own address, so the provider needs only that address and your key. Add it with the search model, and allow specstream/search on each uni-api key that may search:

    api.yaml
    providers:
    - provider: specstream
    base_url: https://api.specstream.ai/tavily/search
    api:
    - YOUR_SPECSTREAM_KEY
    model:
    - search
    preferences:
    search_defaults:
    max_results: 10
    api_keys:
    - api: sk-xxx
    model:
    - specstream/search
  3. 3. Give it its own name

    Keep the provider name specstream, or any name other than jina. A provider named jina, or one whose base_url contains api.jina.ai, always sends its searches to Jina's own address. Your other providers and keys stay as they are.

  4. Restart the container so uni-api reads the new file, then search with GET /v1/search and the question in q. uni-api answers search only by GET: a POST gets Method not allowed.

    Terminal
    docker restart uni-api
    curl 'http://localhost:8001/v1/search?q=uni-api%20release%20notes' \
    --header 'Authorization: Bearer sk-xxx'

What uni-api sends

POST https://api.specstream.ai/tavily/search with your SpecStream key as a Bearer token and Tavily's body: query, topic general, search_depth basic, chunks_per_source 3 and max_results 7, or the values in search_defaults. The Search API answers in Tavily's shape, results[].title, url and content, and uni-api returns them as data[] with title, url, description and content.

We ran this file in the yym68686/uni-api:latest image on November 12, 2026 and read the request it sent: the address, the Bearer key and the body above, with search_defaults applied.

Settings in search_defaults

Set these under preferences, search_defaults on the provider. They apply to every search the provider takes.

SettingWhat SpecStream does
max_resultsReturns up to that many results. Up to 10 is one search at the base price.
topic: newsRuns a news search: dated items, newest first, at the web search price.
topic: generalRuns a web search. This is the default.

Next to Jina and Tavily

uni-api picks a search provider from the ones the key allows. To send every search to SpecStream, list only specstream/search under that key's model. To keep Jina or Tavily for some keys, give those keys jina/search or tavily/search instead.

The SpecStream Search API is the most accurate web search API on SimpleQA Verified and WideSearch. The scores and the method are on the benchmarks page. Moving a whole product off Tavily is on the Tavily migration page.

Searches that a model makes for itself, through the -search model suffix with google_search, or Anthropic's web_search tool, run inside the model provider and do not go through /v1/search. This setting changes only the /v1/search endpoint.

Cost

Each search is one Search API call at $5 per 1,000 searches of up to 10 results. It comes out of your balance, with no quote and no approval. With max_results at 10 or fewer, every search is billed at the base price, and a search that returns no results costs nothing. New accounts start with $10 of credit, no card.

Remove it

Delete the specstream provider and specstream/search from api.yaml, then restart uni-api. To end the key's access, revoke it under Agents & API in your SpecStream workspace. Questions go to [email protected].

More

SpecStream for uni-api covers what it does in uni-api on one page. Every other tool has its guide in Connect your tools. You see the most a request can cost before it starts, and the matches are paid from your balance. Billing has the details. For help, email [email protected].