SOLARI data, right in your code.

Pull creator and brand data through the API. The tools in the CLI and MCP are one HTTP request away. With the TypeScript and Python SDKs, it's a single function call.

LIVE · v1https://solari.sh/mcp/api/v1

Two ways to get a bearer token.

For code, CI, and servers, create an API key on My page and keep it in a secret store. On a computer where you are already logged in, the solari CLI can issue a short-lived token instead.

solari_sk_…
A long-lived API key. Create it on My page → API keys in the SOLARI app. It is shown only once, so copy it right away. It works until you revoke it, and calls made with it are counted under the API channel on your usage page.
solari auth token
Prints the access token of the logged-in account, and refreshes it first if it has expired. The token is valid for eight hours and only the CLI can renew it, so use an API key for anything that runs unattended.
SOLARI_TOKEN
The SDKs and the CLI read this variable. It can hold an API key or a token issued by the CLI. You can also pass it to the SDKs as token.

Send it as Authorization: Bearer <token> on every request.

Create an API key →

Four endpoints, one for each job.

Tool names, arguments, and results match what solari help all --json and the MCP server describe.

GET/tools
Every tool this account can call, with its JSON input schema.
GET/tools/{name}
One tool's schema and description.
POST/tools/{name}
Runs a tool. The JSON body holds its arguments, and the response is its result.
GET/me
The account the token belongs to.

Find a brand with one call.

The response is the same JSON the CLI prints with --json: found, and items sorted with the best match first.

curl -sS https://solari.sh/mcp/api/v1/tools/solari_catalog_instagram_account_search \
  -H "Authorization: Bearer $SOLARI_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query":"nike","limit":3}'

Use a client instead of raw HTTP.

Both clients are small wrappers around these endpoints, with no dependencies. Dotted paths map to tool names, so catalog.instagram.account.search calls solari_catalog_instagram_account_search.

TypeScript · Node, Bun, Deno, Workers, browsers

npm install @brandazine/solari-sdk
import { Solari } from "@brandazine/solari-sdk";

const solari = new Solari({ token: process.env.SOLARI_TOKEN });
const hits = await solari.tools.catalog.instagram.account.search({ query: "nike", limit: 3 });

Python 3.9+ · standard library only

pip install solari-sdk
from solari_sdk import Solari

solari = Solari()  # reads SOLARI_TOKEN
hits = solari.tools.catalog.instagram.account.search(query="nike", limit=3)

Six methods, the same in both languages.

Each method maps to one endpoint above. Results are the tool's JSON, unchanged, and nothing is cached on the client.

TSnew Solari({ token?, baseUrl?, fetch?, timeoutMs?, userAgent? })
PYSolari(token=None, base_url=…, timeout=150, user_agent=None, transport=None)
Creates a client. If token is not set, it reads SOLARI_TOKEN. baseUrl defaults to solari.sh. Pass your own fetch or transport to test without a network.
TSawait solari.listTools()
PYsolari.list_tools()
GET /tools — every tool this account can call, with its JSON input schema.
TSawait solari.getTool(name)
PYsolari.get_tool(name)
GET /tools/{name} — one tool's schema and description.
TSawait solari.call<T>(name, args)
PYsolari.call(name, arguments=None, **kwargs)
POST /tools/{name} — run a tool by its full name. TypeScript lets you type the result.
TSawait solari.tools.catalog.instagram.account.search(args)
PYsolari.tools.catalog.instagram.account.search(**kwargs)
The same call written as a dotted path. Paths are generated from the tool registry, so paths, argument names, and enum values are type-checked in TypeScript and by pyright/mypy in Python.
TSawait solari.me()
PYsolari.me()
GET /me — the account the token belongs to.

One error type with the full error details.

Non-2xx responses raise SolariError with the API's status, code, message, and tool. For 429, 502, 503, and 504, retryable is true, and the Retry-After seconds are included when the server sends them. Network failures raise the same type with status 0.

import { Solari, SolariError } from "@brandazine/solari-sdk";

try {
  await solari.call("solari_insight_instagram_brand_overview", { username: "nike" });
} catch (error) {
  if (error instanceof SolariError && error.retryable) {
    // error.status, error.code, error.tool, error.retryAfterSeconds
  }
}
from solari_sdk import Solari, SolariError

try:
    solari.call("solari_insight_instagram_brand_overview", username="nike")
except SolariError as error:
    if error.retryable:
        ...  # error.status, error.code, error.tool, error.retry_after_seconds

Errors are returned as JSON.

Non-2xx responses include error.code and error.message, plus error.tool when a tool was involved. Rate-limited responses and apps that are still starting also include a Retry-After header.

{
  "error": {
    "code": "invalid_arguments",
    "message": "limit: expected number, received string",
    "tool": "solari_catalog_instagram_account_search"
  }
}
400invalid_arguments
The body did not match the tool's input schema. The message names the field.
400invalid_json
The body was not a JSON object.
400tool_error
The tool rejected the call, for example because no account was given.
401unauthorized
The token is missing, expired, or revoked. Create a new API key or get a new CLI token.
402credit_exhausted
This SOLARI account has no credit left, or its trial has not started because email verification or card setup is incomplete. The call was not charged, and retrying will not help. Check the balance with solari_usage_get. The message tells you what to do next.
402account_blocked
Tool calls are paused for this SOLARI account. The call was not charged. The message tells you who to contact.
403forbidden
Your SOLARI account cannot use this tool.
404tool_not_found
This account has no tool with that name. List the tools to see which ones are available.
429rate_limited
Too many calls. Wait the number of seconds in Retry-After.
502upstream_error
SOLARI could not complete the call. Retry shortly.
503app_warming_up
The tool is starting up. Retry after the number of seconds in Retry-After.
504upstream_timeout
The call took longer than the time limit. Narrow the request or retry.

The same tools over MCP.

Agents and MCP hosts connect to the MCP server with the same token. Use whichever one suits your setup.

https://solari.sh/mcpConnect over MCP →