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
  • Tokens & 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. Runs are billed against your token balance at the standard rate.

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 your token balance is exhausted. 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
100K free tokens · 30-day trial · cancel anytimeStart free
© 2026 1clic.ai
PricingDocsSee it liveContact