B2B API Docs— Documentation

B2B API Overview

The FindUsefulAgents B2B API lets businesses run AI agents programmatically. Use it to power internal workflows, embed agents into your product, or build automated pipelines that process data at scale.

🔑

Dedicated API keys

Your organisation gets isolated credentials. No shared limits with consumer traffic.

Agent runs

POST to run any agent with custom inputs. Structured JSON output returned synchronously.

💬

Chat sessions

Stateful multi-turn conversations. Create a session, send messages, get agent responses.

💳

Credit billing

Pre-purchase credit packs. Enable auto-reload to never interrupt production workflows.

Getting Started

  1. 1

    Register your organisation

    Submit your company name, URL slug, and email at /b2b/register. We review applications within 24 hours.

  2. 2

    Receive your credentials

    On approval you'll receive 100 free credits and a temporary password by email. Log in at /b2b/login.

    Change your password immediately after first login.

  3. 3

    Generate your API key

    In the portal under Settings → API Keys, click Generate Key. Copy and store it securely — it won't be shown again.

    Keep the secret key server-side only. Never expose it in frontend code.

  4. 4

    Make your first API call

    Pass the key in the Authorization header. See the Run Agent section below for the full request format.

Authentication

All B2B API requests require a Bearer token in the Authorization header.

Authorization: Bearer b2b_YOUR_SECRET_KEY

Key Rotation

To rotate your key without downtime: generate a new key in the portal (Settings → API Keys → Rotate). The old key remains valid for 1 hour after rotation, giving you time to deploy the new key to your infrastructure.

Rotating a key immediately invalidates the old one after the 1-hour grace period. Always deploy the new key before the grace period expires.

Run an Agent

Use POST /api/b2b/run to execute any agent with your inputs. The request is synchronous — the response contains the full output.

Request

POST /api/b2b/run
Authorization: Bearer b2b_YOUR_SECRET_KEY
Content-Type: application/json

{
  "agent_id": "competitor-research-v1",
  "input": {
    "company_name": "Acme Corp",
    "focus": "pricing and recent funding"
  }
}

Response

{
  "session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "output": {
    "summary": "Acme Corp raised Series B ($18M) in Q3 2024...",
    "pricing_tier": "Enterprise: $500-2000/mo",
    "recent_news": ["Launched new API product", "Expanded EU offices"]
  },
  "credits_used": 2,
  "credits_remaining": 98
}

Error codes

HTTPCodeMeaning
401unauthorizedMissing or invalid API key
402insufficient_creditsNot enough credits. Top up in the portal.
403org_inactiveOrganisation is pending or suspended
404agent_not_foundagent_id doesn't exist or is not live
429rate_limitedToo many requests. Retry after 60s.
500execution_errorAgent failed. Credits NOT deducted.

Chat Sessions

For multi-turn interactions, use chat sessions. A session maintains conversation history so the agent can refer back to previous messages — ideal for embedded support agents or guided workflows.

1. Create a session

POST /api/b2b/sessions
Authorization: Bearer b2b_YOUR_SECRET_KEY

{
  "agent_id": "customer-support-v1",
  "metadata": { "user_id": "usr_123", "plan": "pro" }
}

2. Send a message

POST /api/b2b/sessions/{session_id}/message
Authorization: Bearer b2b_YOUR_SECRET_KEY

{
  "message": "I need to cancel my subscription"
}

Response

{
  "session_id": "sess_abc123",
  "reply": "I can help with that. Your subscription is currently active...",
  "credits_used": 1,
  "turn": 2
}
Sessions are billed per message turn, not per session creation. Creating an empty session costs 0 credits.

Credits & Billing

B2B billing is credit-based. Your organisation maintains a shared credit pool used across all API calls and chat sessions.

One-Time Credit Packs

Starter Pack

$149.99

200 credits

~$0.75/credit

Most popular

Growth Pack

$249.99

300 credits

~$0.83/credit

Scale Pack

$499.99

600 credits

~$0.83/credit

Monthly Subscriptions (Auto-reload)

Starter Monthly

$149.99

300 credits/mo

Billed monthly · cancel anytime

Most popular

Growth Monthly

$249.99

400 credits/mo

Billed monthly · cancel anytime

Scale Monthly

$499.99

700 credits/mo

Billed monthly · cancel anytime

Credit deduction policy

Credits deducted only on successful agent completion.
No credits deducted if the agent execution fails (500 error).
⏱️Credits are reserved at request start and confirmed or released on completion.

B2B Portal

The B2B portal at /b2b/login gives you a dashboard to manage your organisation's API usage.

Dashboard

/b2b/portal

Credit balance, run count, and usage overview.

Generate, view, and rotate your API secret key.

Purchase credit packs and enable auto-reload.

Detailed log of all API calls, credits used per call.

FAQ

How long does approval take?

We review all applications within 24 hours, usually faster. You'll receive an email with your credentials.

Can I test before purchasing credits?

Yes. All approved organisations receive 100 free credits on activation — enough to run ~50-100 basic agent tasks.

Is there a rate limit?

Default rate limit is 60 requests/minute per API key. Contact us for higher limits.

Can multiple team members share an account?

Yes. B2B orgs have a shared credit pool and a single API key used across your team or infrastructure.

What happens if an agent run fails?

Credits are NOT deducted on failure (HTTP 500). You only pay for successful completions.

Can I use the B2B API in a frontend app?

No. The API key must be kept server-side. Never expose it in browser code. Use a backend proxy pattern instead.

Share feedback

How would you rate your experience?