Integrations

Slafy tokens in your IDE

Cursor, Claude Code, Codex, Cline and other agents work with a Slafy key: set our API address and your key, and requests are paid from your balance. Step-by-step guides below.

01

Create a key

In your profile, API tab. The key starts with sk-slafy- and is shown once, so save it.

02

Choose a model

Model IDs are listed below and on the pricing page. For example, claude-sonnet-5-5.

03

Set the address and key

For the OpenAI format the address is https://slafy.co/v1, for Anthropic https://slafy.co. Pass the key as Bearer or x-api-key.

Cursor

Cursor chat and agent with your Slafy key, OpenAI format

  1. Create a key in the API tab and copy it.
  2. In Cursor, open Cursor Settings → Models.
  3. In the API Keys section, paste the key into the OpenAI API Key field.
  4. Turn on Override OpenAI Base URL and enter https://slafy.co/v1. Click Verify.
  5. Click Add Custom Model and enter model IDs, for example claude-sonnet-5-5 and gpt-6.1-sol.
  6. Pick the added model in chat or Agent mode.

Tab autocomplete in Cursor runs on Cursor’s own models; your key is used in chat and the agent. Cursor sends requests to our API from its own servers, so no other network setup is needed.

Claude Code

Anthropic’s terminal agent, Messages format

Set the environment variables and run claude. No Anthropic account sign-in needed.

macOS, Linux

export ANTHROPIC_BASE_URL="https://slafy.co"
export ANTHROPIC_AUTH_TOKEN="sk-slafy-your_key"
export ANTHROPIC_MODEL="claude-sonnet-5-5"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-5-5"
claude

Windows, PowerShell

$env:ANTHROPIC_BASE_URL = "https://slafy.co"
$env:ANTHROPIC_AUTH_TOKEN = "sk-slafy-your_key"
$env:ANTHROPIC_MODEL = "claude-sonnet-5-5"
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL = "claude-haiku-5-5"
claude

To avoid setting them every time

Add the variables to ~/.claude/settings.json:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://slafy.co",
    "ANTHROPIC_AUTH_TOKEN": "sk-slafy-your_key",
    "ANTHROPIC_MODEL": "claude-sonnet-5-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-5-5"
  }
}

You can switch models with the /model command right in Claude Code, for example to claude-opus-5-5.

Codex CLI

OpenAI’s terminal agent, Responses format

  1. Add the provider to ~/.codex/config.toml:
model = "gpt-6.1-sol"
model_provider = "slafy"

[model_providers.slafy]
name = "Slafy"
base_url = "https://slafy.co/v1"
env_key = "SLAFY_API_KEY"
wire_api = "responses"
  1. Put the key into the SLAFY_API_KEY variable and run codex.
export SLAFY_API_KEY="sk-slafy-your_key"
codex

On Windows, set the variable with setx SLAFY_API_KEY "sk-slafy-your_key" and reopen the terminal.

Images in Codex

Ask Codex to draw an icon, a mockup or an illustration. GPT models draw with the built-in image_generation tool in the Responses API, and the image generation skill calls the Images API. The skill needs the same address and key:

export OPENAI_BASE_URL="https://slafy.co/v1"
export OPENAI_API_KEY="sk-slafy-your_key"

Slafy accepts the names gpt-image-2, gpt-image-1 and sends them to gpt-image-2.5-sunburst. One image costs $0.199, which is 500,000 balance tokens, the text of the answer is billed as usual.

Cline

Agent in VS Code, “OpenAI Compatible” provider

  1. Open Cline in VS Code and click the settings gear.
  2. Fill in the fields and click Done:
API Provider
OpenAI Compatible
Base URL
https://slafy.co/v1
API Key
sk-slafy-your_key
Model ID
claude-sonnet-5-5

For Claude, GPT, Gemini and Grok models turn on Supports Images: they understand screenshots.

Roo Code

Agent in VS Code, “OpenAI Compatible” provider

  1. Open Roo Code, then Settings → Providers.
  2. Choose the provider and fill in the fields:
API Provider
OpenAI Compatible
Base URL
https://slafy.co/v1
API Key
sk-slafy-your_key
Model
claude-sonnet-5-5

Continue

Assistant for VS Code and JetBrains

Add the model to ~/.continue/config.yaml:

name: Slafy
version: 1.0.0
schema: v1
models:
  - name: Claude Sonnet 5.5
    provider: openai
    model: claude-sonnet-5-5
    apiBase: https://slafy.co/v1
    apiKey: sk-slafy-your_key
    roles: [chat, edit, apply]

Other clients

Open WebUI, LibreChat, LobeChat, Chatbox, Jan and any app that supports the OpenAI API

Choose the OpenAI or OpenAI Compatible connection type and fill in three fields. The client usually loads the model list by itself.

API address
https://slafy.co/v1
Key
sk-slafy-your_key
Model
claude-sonnet-5-5

Addresses, endpoints, SDKs and error codes are on the API page.