> ## Documentation Index
> Fetch the complete documentation index at: https://docs.senderz.app/llms.txt
> Use this file to discover all available pages before exploring further.

# AI provider (your own key)

> Bring your own Claude, Gemini or OpenAI key to power Senderz AI features.

Senderz never resells AI tokens. Every AI feature — the natural-language segment builder, subject-line and email generation, the marketing calendar, the assistant chat — runs on **your own** provider key, fetched per request and never logged.

## Supported providers

<CardGroup cols={2}>
  <Card title="Claude" icon="brain">
    Anthropic models via your API key.
  </Card>

  <Card title="Gemini" icon="google">
    Google models via your API key.
  </Card>

  <Card title="OpenAI" icon="robot">
    OpenAI models via your API key.
  </Card>

  <Card title="Custom endpoint" icon="server">
    Any AI SDK-compatible provider (OpenAI- or Anthropic-compatible base URL).
  </Card>
</CardGroup>

## Configuring

In **Settings → AI provider**, pick your provider, model and (for custom) base URL, then paste your key. Keys are write-only — the API returns presence flags, never key material.

<Info>
  Keys are stored in a secrets manager keyed by workspace + provider, fetched
  into request scope, used, and dropped. They're never cached across requests
  or written to logs.
</Info>

## What AI powers

<AccordionGroup>
  <Accordion title="Assistant chat" icon="comments">
    A tool-using agent over your workspace — contacts, segments, campaigns,
    flows, analytics, billing, compliance. Read tools by default; optional
    write tools (draft campaign/segment/flow/template, schedule, create
    coupon) all go through the normal service layer.
  </Accordion>

  <Accordion title="Segment builder" icon="filter">
    Describe an audience in plain language; the agent verifies its draft
    against your data and proposes a valid v1 filter.
  </Accordion>

  <Accordion title="Email studio" icon="envelope">
    Generate a full subject + HTML + text email matching your brand kit, and
    translate between Hebrew and English. Merge tags are never translated.
  </Accordion>

  <Accordion title="Marketing calendar & agent" icon="calendar">
    Propose an editable calendar or 3–8 draft campaigns/flows/segments from a
    goal. Proposals are never auto-sent — you accept them and they materialise
    as normal drafts.
  </Accordion>
</AccordionGroup>

## Safety model

<Warning>
  The AI can never bypass compliance. Every AI-initiated action runs through
  the same pipeline — RLS confines it to your workspace, the approval workflow
  still gates campaigns, and quiet hours, consent, suppression and the SMS
  wallet all apply at send time. AI-initiated actions are audit-logged
  distinctly from UI actions.
</Warning>

## If your key fails

If your provider returns 401/429/insufficient-quota, the AI surface pauses for your workspace with a clear "fix your API key" banner. There's no silent fallback to another key — the request fails, because the whole point is that you pay the provider directly.

<Note>
  Product copy uses "your API key", not "BYOK". The default models are the
  capable tiers (quality over latency) for tool-using surfaces.
</Note>
