{% extends "base.html" %} {% block title %}Get started - Invincible{% endblock %} {% block content %}

Get started

Two steps and your AI clients are running through {{ base_url }}.

{% if has_provider and has_key %}
You're all set. πŸŽ‰ Chat requests with your key route through your connected providers. The MCP tools connect separately from your AI client and approve in the browser.
{% endif %}
{# ------------------------------------------------------------------ #}
{% if has_provider %}✓{% else %}01{% endif %}

Connect a provider

{% if has_provider %}Connected{% else %}Not done yet{% endif %}

Your key routes only through providers you connect β€” your account, your billing. Pick one to start (you can add more later):

Go to Providers β†’

{# ------------------------------------------------------------------ #}
{% if has_key %}✓{% else %}02{% endif %}

Create your API key

{% if has_key %}Key exists ({{ api_key_prefix }}…){% else %}Not done yet{% endif %}

One personal key, pasted into your AI client's config. Shown once β€” revoke and re-mint anytime.

Go to Account β†’ create a key

{# ------------------------------------------------------------------ #}
{% if has_provider and has_key %}✓{% else %}03{% endif %}

Point your AI client at the gateway

{% if has_provider and has_key %}Ready to paste{% else %}Complete steps 1–2 first{% endif %}
{% if has_key %}

Claude Code β€” shell profile (~/.bashrc, ~/.zshrc) or session:

export ANTHROPIC_BASE_URL="{{ base_url }}" export ANTHROPIC_AUTH_TOKEN="<your inv_ key from Account>"

No /v1 suffix here β€” Claude appends /v1/messages itself. Newer Claude Code versions read ANTHROPIC_AUTH_TOKEN; older ones read ANTHROPIC_API_KEY instead β€” if one is ignored, set the other to the same inv_ key (the gateway accepts both). Windows PowerShell: $env:ANTHROPIC_BASE_URL="{{ base_url }}" and $env:ANTHROPIC_AUTH_TOKEN="…". Model slugs are exact: deepseek-v4.1-flash-free and deepseek-v4.1-flash:free are different models β€” copy the id verbatim from curl {{ base_url }}/v1/models -H "Authorization: Bearer …".

Codex CLI β€” paste into ~/.codex/config.toml:

model = "{{ codex_model }}" model_provider = "invincible" [model_providers.invincible] name = "Invincible" base_url = "{{ base_url }}/v1" env_key = "INVINCIBLE_API_KEY" wire_api = "responses"

The model line above is pre-filled with your connected default β€” not a fixed example β€” switch anytime with /model. Codex reads the key from that env var β€” set it before launching (export INVINCIBLE_API_KEY=… on Mac/Linux, or on Windows setx INVINCIBLE_API_KEY "…" then open a new terminal; PowerShell-only session: $env:INVINCIBLE_API_KEY="…"), and restart Codex after editing the config.

OpenAI SDK (Python etc.) β€” config or environment:

OPENAI_BASE_URL={{ base_url }}/v1 OPENAI_API_KEY=<your inv_ key from Account>

Works with any OpenAI-compatible client or SDK β€” point it at {{ base_url }}/v1 with your inv_ key.

MCP tools connect separately from chat: add {{ base_url }}/mcp in your client's MCP settings and approve it in the browser when prompted. MCP uses OAuth there β€” never paste your inv_ key into the MCP settings.

{% else %}

The exact copy-paste config appears here once your key exists.

{% endif %}
{% endblock content %}