Authentication

Choose the right credential for backend API calls and browser embeds.

Fluo uses different credentials for different trust boundaries.

CredentialWhere it belongsUse it for
Secret API keyYour server or trusted backend jobsRunning agents, streaming threads, uploads, and other authenticated API calls.
Publishable embed keyBrowser widget snippetsPublic chat embeds for a specific published agent.
User session tokenFluo dashboard clientsInteractive platform access for signed-in users.

Secret API Keys

Send secret API keys in the x-api-key header.

curl https://api.fluo.one/api/v1/agents/agent_123/run \
  -X POST \
  -H "content-type: application/json" \
  -H "x-project-id: project_123" \
  -H "x-api-key: $FLUO_API_KEY" \
  -d '{"query":"Hello"}'

Required Headers

HeaderRequiredDescription
x-api-keyYes for secret-key API callsAuthenticates the request.
x-project-idYesSelects the project for the request.
content-typeYes for JSON bodiesUse application/json.

Publishable Embed Keys

Browser embeds should use publishable keys. These keys are not broad secrets. They should be scoped to:

  • One agent or an explicit agent allowlist.
  • One set of allowed domains.
  • A small public endpoint surface.
  • Rate limits and spend caps.

See Public Embed Keys for the complete model.

Key Handling Rules

  • Store secret API keys in environment variables or your secret manager.
  • Never put secret API keys in frontend code.
  • Rotate keys if they are exposed.
  • Use separate keys for development, staging, and production.
  • Use descriptive labels so you can revoke one integration without disrupting others.