1clic.ai
Log inStart free
Browse docs
Getting started
  • Quickstart
  • Core concepts
  • Yoda onboarding
Building agents
  • Agent specs
  • Tools & actions
  • The Playground
Personas & memory
  • Writing a great persona
  • Soul documents
  • Memory system
Platform
  • Integrations
  • Connecting WhatsApp
  • Analytics
  • Benchmarking models
  • API & embedding
  • Embedding the chat widget
  • The bridge, the wallet & billing
Docs / Platform / API & embedding

API & embedding

Call your agents programmatically, embed the chat widget on your site, or connect over webhook. Below are the essentials to get going.

Authentication

Create an API key from Settings → API keys and send it as a bearer token on every request.

curl https://api.1clic.ai/v1/agents \
  -H "Authorization: Bearer $TOKEN"

Run an agent

POST a message to an agent to get a response. Each run's tokens are charged to your wallet at the provider's published rate; the response carries usage and cost_usd.

curl https://api.1clic.ai/v1/agents/"nova"/chat \
  -H "Authorization: Bearer $TOKEN" \
  -d '{ "message": "Help a customer with a refund." }'

Embed the widget

Drop the widget script anywhere in your site's HTML and point it at an agent:

<script src="https://1clic.ai/widget.js"
  data-agent="nova"></script>

Errors & rate limits

The API uses standard HTTP status codes — 401 for a bad key, 429 when you exceed your rate limit, 402 when the wallet is empty or the workspace has no live bridge, 403 when the agent is still in sandbox. Error bodies include a message field.

📓
Full endpoint reference coming soon. The complete list of endpoints (tasks, run history, webhooks) is being migrated into these docs.
← Previous
Benchmarking models
Next →
Embedding the chat widget
On this page
  • Authentication
  • Run an agent
  • Embed the widget
  • Errors & rate limits
$5 of credit to start · $129/month · no cardStart free
© 2026 1clic.ai
PricingDocsSee it liveContact