Skip to the page

Anything

Anything's agent connects an outside API from the chat: you describe the API, and it writes a backend function that calls it from the cloud. This guide sets that up for SpecStream's Search API, Extract API and Deep Search.

SpecStream for AnythingAgent frameworks & builders

What you need

  • An Anything account on a paid plan (Pro or Max). Building an app needs one.
  • A SpecStream account. New accounts get $10 of credit on sign-up, no card. Create one.
  1. 1. Create a SpecStream API key

    In the SpecStream workspace, open Agents & API, click Create API key, and label it for the app. Keep the permissions that are already on, because searches, page reads and Deep Search runs need Authorize paid work.

    Under Total spending limit, USD, enter the most the app may spend for all its users together. Copy the key from the next screen. SpecStream shows it once.

  2. 2. Describe SpecStream in the chat

    Tell Anything's agent what the app should do with SpecStream, and give it the docs to read. It writes a backend function for each call:

    In the Anything chat
    Connect the SpecStream API. Read https://specstream.ai/agents.md, https://specstream.ai/docs/search-api and https://specstream.ai/docs/extract-api. Create backend functions that call it from the cloud with the API key in the secret SPECSTREAM_API_KEY, sent as Authorization: Bearer <key>. Add a search box: send the text to GET https://api.specstream.ai/v1/web-search as q, and show data.answer.value with a link to data.answer.page. Add a page reader: send a URL to POST https://api.specstream.ai/v1/extract with {"urls": [url]}, and show data.results[0].text.
  3. 3. Add the key in Anything

    In your project, open Project Settings, then Saved Secrets, and click Add a new secret. Use the name the agent asks for, exactly (SPECSTREAM_API_KEY with the prompt above), and paste the key.

    The backend function reads the key on the server, so it never reaches a user's browser.

  4. 4. Add Deep Search for rows

    When the app needs many records that meet conditions, it sends the request to Deep Search. Deep Search reads the request, names the most it can cost, and runs only after the user approves that price. Add it in the chat:

    In the Anything chat
    Add SpecStream Deep Search from the same docs. Send the user's text to POST /v1/parse as q and show read_back. When status is runnable, send ast_hash to POST /v1/capacity/quotes and show maximum_cents as the price. Only when the user clicks Approve, call POST /v1/capacity/executions with quote_id, quote_hash, confirm_max_cents set to maximum_cents, and idempotency_key set to quote_id. Then list the rows from GET /v1/finds/{id}/rows, and read them again while GET /v1/finds/{id} shows status running.

Who pays

Every call runs on the key in Saved Secrets, so every user of the app spends from your SpecStream account. The key's total limit caps what the app can spend. Anything's backend functions are public by default, so ask the agent to require a signed-in user before a function calls SpecStream.

Cost

Connecting SpecStream to Anything is free. A search costs $5 per 1,000 and a page read $0.80 per 1,000, and a page that gives no text costs nothing. Neither needs a quote. Deep Search charges each matching row 5¢, 15¢ or $1, depending on how much the row needs, plus 5¢ for a person's email and 15¢ for a phone, and never more than the maximum the user approved. Balance, quotes, and billing has the details.

Remove

Delete the secret under Project Settings, then Saved Secrets, or revoke the key under Agents & API in SpecStream, and the app stops reaching SpecStream at once. Your saved results stay in your workspace. Questions go to [email protected].

More

SpecStream for Anything covers what it does in Anything 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].