Search documentation

Search tools, API guides and billing.

to navigateEnter to openEsc to close
Agent, CLI and REST API
Get started

Agent, CLI and REST API

Three ways to use the same Sorit APIs.

Agent Skill

Give your agent this instruction:

text
Read https://sorit.dev/SKILL.md and install the Sorit skill.

Read the Skill. Create a key in API keys, set SORIT_API_KEY in the agent’s environment, then copy the instruction from an API’s Agent tab. The Skill covers discovery, parameter inspection, calls and results.

Bun CLI

The @sorit/cli package is prepared for its first release. The following installation command will work once it is published; use REST in the meantime.

bash
bun install --global @sorit/cli
export SORIT_API_KEY='<YOUR_API_KEY>'
sorit discover --tool tiktok
sorit inspect '<API_ID>'
export SORIT_REQUEST_KEY="$(bun -e 'console.log(crypto.randomUUID())')"
sorit run '<API_ID>' --input @input.json \
  --idempotency-key "$SORIT_REQUEST_KEY" --wait
sorit get '<REQUEST_ID>' --wait

Requires Bun 1.2+. The CLI defaults to the production API at https://sorit.dev; only SORIT_API_KEY needs to be configured. For local development, override the origin with SORIT_URL, for example SORIT_URL=http://localhost:3010 sorit tools. input.json must match the inspected API’s inputSchema. Each API detail provides a command using its ID and your parameters. Use sorit --help for the command list, sorit run --help for command-specific help, and sorit balance for credits.

Discovery only returns callable APIs. Disabled, unconfigured and unmapped APIs are excluded from CLI and REST search results, counts and filters. Integration states are managed in the admin console.

REST API

Use HTTP directly with Authorization: Bearer <SORIT_API_KEY>. Each API’s API tab contains its request, polling example and parameter schema.

RequestPurpose
GET /api/toolsDiscover platform tools.
GET /api/endpoints?tool=tiktok&status=available&page=1List APIs, 24 per page.
GET /api/tools/{apiId}Read schema, availability, price and limits.
POST /api/jobsSubmit {"kind":"<apiId>","input":{...}}.
GET /api/jobs/{request_id}Read status, business data and credits.

Submit the API ID as kind. The parent tool ID is for discovery. Native parameters belong in body, query and path only when declared. See requests and responses.

Results and retries

Poll while queued or running. On succeeded, read data; on failed or rejected, read error. credits contains charged and refunded totals. Calls share your account’s balance and availability rules.

Keep the same idempotency key and identical input when retrying an uncertain submission. A polling timeout does not cancel the call; resume with its request_id.