Morphic
Point Morphic's SearXNG search at SpecStream with two settings: SEARCH_API=searxng, and SEARXNG_API_URL with your key in the address. Morphic then searches the live web through SpecStream's Search API at $1 per 1,000 searches. You need no Tavily key and no SearXNG instance of your own.
SpecStream for MorphicAI assistantsWhat you need
- Morphic from github.com/miurla/morphic (opens in a new tab), run with
bun devor with Docker Compose. - A SpecStream API key that can search. New accounts get $10 of credit, no card. Create one.
- 1
1. Make a SpecStream key
In SpecStream, open Agents & API, choose API keys, then Create API key. Turn on Authorize paid work and give the key a Total spending limit. The key is shown once.
- 2
2. Set the two variables in .env.local
Morphic chooses its search provider from
SEARCH_APIand reads the SearXNG address fromSEARXNG_API_URL. WithoutSEARCH_APIit uses Tavily, its default.In
.env.local, add these two lines with your key in place of YOUR_SPECSTREAM_KEY. Morphic adds/searchandformat=jsonitself, so the address ends at your key. Then start Morphic again withbun dev..env.local - 3
3. With Docker Compose, put them in .env
Morphic's
docker-compose.yamlsets both variables on the morphic service itself:SEARCH_APIfalls back tosearxngandSEARXNG_API_URLtohttp://searxng:8080, the SearXNG container it starts. Those lines win over.env.local.Compose fills them from your shell or from a file named
.envbesidedocker-compose.yaml, and never from.env.local. Put the same two lines in.env, then rundocker compose upagain. The bundled SearXNG container can keep running. Morphic stops calling it..env (beside docker-compose.yaml) - 4
4. Check it works
Ask Morphic about something from this week. The answer cites results from the live web that SpecStream returned.
Each search is in your account's request log with the SearXNG route as its endpoint and its price.
GET https://api.specstream.ai/v1/account/requestslists them, newest first.
What changes in Morphic
| Setting | Morphic today | With SpecStream |
|---|---|---|
SEARCH_API | tavily with bun, searxng with Docker Compose | searxng |
SEARXNG_API_URL | http://localhost:8080 in the example file, http://searxng:8080 in Docker Compose | https://api.specstream.ai/searxng/YOUR_SPECSTREAM_KEY |
| Search key | TAVILY_API_KEY or EXA_API_KEY | None: the key is in the address |
BRAVE_SEARCH_API_KEY | Optional, for video and image results | Leave it as it is |
What each search costs
Each search Morphic sends to the SearXNG address is one Search API call on the fast tier: $1 per 1,000 searches of up to 10 results, a fifth of the default search's $5. Morphic sends no result count, so each call gets one page of 10 results at that price, and a search that returns nothing costs nothing.
Searches come out of your balance with no quote and no approval. New accounts start with $10 of credit, no card. Questions go to [email protected].
Limits and errors
- When search is busy, SpecStream answers
429with aRetry-Afterheader and charges nothing. - A key SpecStream does not accept answers
401. Morphic logsSearXNG API error (401):with SpecStream's message. Check the key in the address, and that it can search. - A key over its spending limit answers
403. Raise the limit under API keys in Agents & API.
Keep the key private
Morphic calls the SearXNG address from its server, so the key stays in .env.local or .env and never reaches the browser. Keep both files out of git. To end a key's access, revoke it under API keys in Agents & API and make a new one.
Read pages and get rows too
The same key reads pages with the Extract API at $0.80 per 1,000 pages, and a page with no text is not charged. For a dataset, add SpecStream's MCP server at https://api.specstream.ai/mcp and ask for the records in plain words. Deep Search returns every match as structured rows at 5¢, 15¢ or $1 a row, under a maximum you approve. See MCP.
Go back
Remove the two lines, or set SEARCH_API=tavily with a TAVILY_API_KEY, and restart Morphic. Then revoke the key in your workspace if you no longer use it.
More
SpecStream for Morphic covers what it does in Morphic 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].