Integrate with AI
Choose a Essevin model family and give its focused integration contract to a coding agent.
Choose the model family first, then give the contract in the active tab to Codex, Claude Code, Cursor, or another coding agent. Each contract includes only the key, protocol, and endpoints required for that family.
Choose the matching model tab
| Capability | Tab | Plan key |
|---|---|---|
| Claude API or Claude Code | Claude | Claude group key |
| GPT chat, Codex Responses, or GPT Image | GPT / Codex | OpenAI / Codex group key |
| Gemini chat or Banana images | Gemini | Gemini group key |
Use one plan key per model family
In a multi-model project, use the dedicated variable named in the active contract, such as ESSEVIN_CLAUDE_API_KEY or ESSEVIN_GEMINI_API_KEY. A single-model project may keep using ESSEVIN_API_KEY. Never paste a real key into an AI conversation or place it in source code, commits, screenshots, or logs.
Integrate only Claude models through Essevin in the current project and follow this contract.
Scope
- Implement only what is required for the Claude API or Claude Code. Do not add, configure, or test an unselected model family.
- Preserve the existing framework, SDKs, and code style. Make the smallest changes required for this integration.
- Determine whether this is a local single-user tool, an internal service, or an application serving downstream customers or tenants before choosing key placement and architecture.
Key and model
- Use only a Claude-group key. In a multi-model project, prefer ESSEVIN_CLAUDE_API_KEY or the existing secret manager. Reuse ESSEVIN_API_KEY only in an explicitly single-model project.
- Do not create a key, read another model family key, or ask me to paste a real key into the conversation. Stop and ask me to configure it locally or in the secret manager when unavailable.
- First call GET https://api.essevin.com/v1/models with this key. Select only model IDs beginning with claude- from the response.
- On model_not_found, fetch /v1/models again and use a complete returned model ID. Never guess or rewrite a model name.
Connection
- Use the Anthropic protocol with https://api.essevin.com as the Base URL, without /v1.
- Use api_key with the Anthropic SDK or x-api-key for native HTTP. Existing Anthropic code should keep native authentication.
- The SDK sends Claude API requests to POST /v1/messages. Do not convert them to OpenAI Chat Completions.
- Claude Code uses ANTHROPIC_BASE_URL=https://api.essevin.com and ANTHROPIC_AUTH_TOKEN sourced from the selected Claude key.
Implementation
- Inspect the current dependencies and configuration. Reuse an installed SDK and preserve every unrelated provider configuration.
- Put the Base URL, key variable name, and default model in the existing configuration system. Update .env.example without adding a real key.
- Downstream or multi-tenant calls must keep the key on the server and reuse caller authentication with a model allowlist, request limits, timeouts, rate limits, usage attribution, and redacted logs.
- Do not add a proxy service or multi-tenant gateway to a local single-user tool.
- Choose the default only from Claude models returned by /v1/models. Do not hard-code a documentation example.
- Pass Anthropic SSE through end to end and preserve upstream 4xx or 5xx statuses and safe error details.
Validation and handoff
- Send one minimal real request after configuration. Add a streaming test only when the project actually streams.
- Ask a returned Claude model to reply with only ok through Messages and verify its content.
- Report changed files, the key variable name, model ID, endpoint, HTTP status, and a redacted response summary. Include start, verification, and rollback commands.Switching tabs updates both the contract and the copy action. The agent must discover models with only the selected family key and choose an ID from that response, preventing cross-plan key mistakes.
How downstream use is handled
| Project context | Expected architecture |
|---|---|
| Local single-user tool | Use environment variables and the matching SDK; do not add a proxy service |
| Internal service | Keep the key server-side and preserve existing authentication, limits, and error handling |
| Customer-facing or multi-tenant service | Add key isolation, caller authentication, a model allowlist, rate limits, usage attribution, unbuffered SSE, and redacted logs |
The contract adds gateway controls only when the application acts for downstream users. It does not turn a local integration into an unnecessary service layer.