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

# Integrations

> Plug AdSkull into every coding agent, AI app, and automation tool that accepts a custom API endpoint.

# Plug AdSkull into anything

If a tool exposes **`base URL` + `API key`** fields, AdSkull works in it. That covers basically every modern AI app.

There is **no SDK install**, **no proxy**, **no extra service** — just two values:

| What                | Value                                                                                                |
| ------------------- | ---------------------------------------------------------------------------------------------------- |
| API key             | An AdSkull key starting with `sk_live_…` (create one in the [dashboard](https://app.adskull.io/api)) |
| OpenAI-style URL    | `https://api.adskull.io/openai/v1`                                                                   |
| Anthropic-style URL | `https://api.adskull.io/anthropic/v1`                                                                |

Pick whichever protocol the tool speaks — they're both backed by the **same model catalog, same credits, same usage logs**.

<Note>
  **About `Idempotency-Key`:** it's an *optional* header. Coding agents and chat UIs don't send it, and that's fine — they just won't get automatic dedup on retry. Set it only when you're calling AdSkull from a workflow tool (n8n, Zapier, your own backend) that may retry on network errors. Details in the [Direct API section](#direct-api--workflows).
</Note>

***

## Coding agents

### Claude Code (Anthropic CLI)

```bash theme={"theme":"github-dark"}
export ANTHROPIC_BASE_URL="https://api.adskull.io/anthropic"
export ANTHROPIC_API_KEY="sk_live_..."
claude
```

Then pick a model with `/model claude-opus-4.7`, or any [AdSkull model id](/public/models).

### OpenCode

```bash theme={"theme":"github-dark"}
export ANTHROPIC_BASE_URL="https://api.adskull.io/anthropic"
export ANTHROPIC_API_KEY="sk_live_..."
opencode
```

### Cline (VS Code extension)

Settings → Cline → **API Provider**: `Anthropic` (or `OpenAI Compatible`).

* Anthropic base URL: `https://api.adskull.io/anthropic`
* API key: `sk_live_...`

### Roo Code (VS Code fork of Cline)

Same as Cline. Roo Code's **OpenAI Compatible** provider also works — point it at `https://api.adskull.io/openai/v1`.

### Continue (`continue.dev`)

`~/.continue/config.json`:

```json theme={"theme":"github-dark"}
{
  "models": [
    {
      "title": "Claude Opus 4.7 via AdSkull (Anthropic)",
      "provider": "anthropic",
      "model": "claude-opus-4.7",
      "apiBase": "https://api.adskull.io/anthropic",
      "apiKey": "sk_live_..."
    },
    {
      "title": "Gemini 3 Pro via AdSkull (OpenAI-compat)",
      "provider": "openai",
      "model": "gemini-3-pro",
      "apiBase": "https://api.adskull.io/openai/v1",
      "apiKey": "sk_live_..."
    }
  ]
}
```

### Aider

```bash theme={"theme":"github-dark"}
export OPENAI_API_BASE="https://api.adskull.io/openai/v1"
export OPENAI_API_KEY="sk_live_..."
aider --model claude-opus-4.7
```

Or Anthropic flavour:

```bash theme={"theme":"github-dark"}
export ANTHROPIC_API_BASE="https://api.adskull.io/anthropic"
export ANTHROPIC_API_KEY="sk_live_..."
aider --model claude-opus-4.7
```

### Cursor

Cursor → Settings → **Models** → Add a custom OpenAI-compatible model.

* Base URL: `https://api.adskull.io/openai/v1`
* API key: `sk_live_...`
* Model: any id from `GET /openai/v1/models` (e.g. `claude-opus-4.7`, `claude-sonnet-4.6`, `gemini-3-pro`).

### Codex CLI

```bash theme={"theme":"github-dark"}
export OPENAI_API_BASE="https://api.adskull.io/openai/v1"
export OPENAI_API_KEY="sk_live_..."
codex
```

### Zed AI Assistant

Zed → Settings → `assistant.providers.openai`:

```jsonc theme={"theme":"github-dark"}
{
  "assistant": {
    "providers": {
      "openai": {
        "api_url": "https://api.adskull.io/openai/v1",
        "api_key": "sk_live_..."
      }
    }
  }
}
```

***

## Chat UIs

### OpenWebUI

Admin Settings → **Connections** → Add OpenAI connection:

* API Base URL: `https://api.adskull.io/openai/v1`
* API Key: `sk_live_...`

All AdSkull models will appear in the model dropdown automatically.

### LibreChat

`librechat.yaml`:

```yaml theme={"theme":"github-dark"}
endpoints:
  custom:
    - name: "AdSkull"
      apiKey: "sk_live_..."
      baseURL: "https://api.adskull.io/openai/v1"
      models:
        default: ["claude-opus-4.7", "claude-sonnet-4.6", "gemini-3-pro"]
        fetch: true
      titleConvo: true
```

### AnythingLLM

Settings → **LLM Preference** → "Generic OpenAI" → set base URL + key.

### Jan.ai / LM Studio

Both accept any OpenAI-compatible base URL. Use `https://api.adskull.io/openai/v1`.

***

## Frameworks & SDKs

### LangChain (Python)

```python theme={"theme":"github-dark"}
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    base_url="https://api.adskull.io/openai/v1",
    api_key="sk_live_...",
    model="claude-opus-4.7",
)
print(llm.invoke("Hello").content)
```

Or the Anthropic adapter:

```python theme={"theme":"github-dark"}
from langchain_anthropic import ChatAnthropic

llm = ChatAnthropic(
    base_url="https://api.adskull.io/anthropic",
    api_key="sk_live_...",
    model="claude-opus-4.7",
)
```

### LlamaIndex

```python theme={"theme":"github-dark"}
from llama_index.llms.openai_like import OpenAILike

llm = OpenAILike(
    api_base="https://api.adskull.io/openai/v1",
    api_key="sk_live_...",
    model="claude-opus-4.7",
    is_chat_model=True,
)
```

### LiteLLM proxy

`config.yaml`:

```yaml theme={"theme":"github-dark"}
model_list:
  - model_name: gemini-3-pro
    litellm_params:
      model: openai/gemini-3-pro
      api_base: https://api.adskull.io/openai/v1
      api_key: sk_live_...
  - model_name: claude-opus-4.7
    litellm_params:
      model: anthropic/claude-opus-4.7
      api_base: https://api.adskull.io/anthropic
      api_key: sk_live_...
```

### OpenAI Python SDK (drop-in)

```python theme={"theme":"github-dark"}
from openai import OpenAI

client = OpenAI(
    base_url="https://api.adskull.io/openai/v1",
    api_key="sk_live_...",
)

resp = client.chat.completions.create(
    model="claude-opus-4.7",
    messages=[{"role": "user", "content": "Hello"}],
)
```

### Anthropic Python SDK (drop-in)

```python theme={"theme":"github-dark"}
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.adskull.io/anthropic",
    api_key="sk_live_...",
)

msg = client.messages.create(
    model="claude-opus-4.7",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)
```

### Vercel AI SDK

```ts theme={"theme":"github-dark"}
import { createOpenAI } from "@ai-sdk/openai";

const adskull = createOpenAI({
  baseURL: "https://api.adskull.io/openai/v1",
  apiKey: process.env.ADSKULL_API_KEY!,
});

const result = await adskull.chat("claude-opus-4.7").generate({ prompt: "Hello" });
```

***

## Workflow & automation tools

### n8n

Use the **HTTP Request** node.

* Method: `POST`
* URL: `https://api.adskull.io/openai/v1/chat/completions` *(or any AdSkull endpoint — image, video, voice, transcribe, etc.)*
* Authentication: **Header Auth** → `Authorization: Bearer sk_live_...`
* Body (JSON): your request payload
* *(Recommended)* Add header `Idempotency-Key: {{ $execution.id }}` so retried n8n runs don't double-charge.

n8n also has a built-in **OpenAI** node — set its credential's "Base URL" override to `https://api.adskull.io/openai/v1` and it works out of the box for chat, vision, and transcription.

### Zapier / Make.com

Both have generic "Webhook / HTTP" actions. Same recipe as n8n.

### Pipedream

```js theme={"theme":"github-dark"}
import { OpenAI } from "openai";

export default defineComponent({
  async run({ steps, $ }) {
    const openai = new OpenAI({
      baseURL: "https://api.adskull.io/openai/v1",
      apiKey: process.env.ADSKULL_API_KEY,
    });
    return openai.chat.completions.create({
      model: "claude-opus-4.7",
      messages: [{ role: "user", content: steps.trigger.event.prompt }],
    });
  },
});
```

***

## Direct API & workflows

These are the only cases where you *should* care about `Idempotency-Key`:

| Caller                                            | Send `Idempotency-Key`? |
| ------------------------------------------------- | ----------------------- |
| Coding agent (Claude Code, Cursor, Cline…)        | No — they don't retry.  |
| Chat UI (OpenWebUI, LibreChat…)                   | No.                     |
| Your own backend with retry logic                 | **Yes.**                |
| n8n / Zapier / Make.com / cron                    | **Yes.**                |
| LangChain/LlamaIndex agents with retry middleware | **Yes.**                |

When set, the same key + same body within 24h returns the **cached response** instead of re-running and re-charging.

```bash theme={"theme":"github-dark"}
curl https://api.adskull.io/v1/llm/chat \
  -H "Authorization: Bearer sk_live_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-opus-4.7",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
```

***

## What about media endpoints?

The `/v1/images`, `/v1/videos`, `/v1/voice`, `/v1/talking-avatars` endpoints are **AdSkull-only** — they're not part of OpenAI or Anthropic's spec, so coding agents won't auto-discover them. But any tool that can hit an HTTPS URL (n8n, Zapier, your backend, LangChain `RequestsTool`, Cursor's `@web` etc.) can call them directly. See [Images](/public/feature-images), [Videos](/public/feature-videos), [Voice](/public/feature-voiceover), [Talking Avatars](/public/feature-talking-avatars).

For **vision / transcription / video understanding** specifically, both `/openai/v1/chat/completions` (with image\_url or input\_audio content blocks) and the native [`/v1/llm/vision/describe`, `/v1/llm/audio/transcribe`, `/v1/llm/video/describe`](/public/feature-llm-multimodal) endpoints work.

***

## Troubleshooting

* **"Model not found"** — call `GET /openai/v1/models` (or `/anthropic/v1/models`) with your key to see the current list. Aliases like `gpt-4o`, `claude-3-opus`, `gemini-1.5-pro` are auto-mapped to AdSkull equivalents, but new providers' brand-new IDs may not be aliased yet.
* **`402 insufficient_credits`** — your account has 0 credits. Top up at [billing](https://app.adskull.io/billing).
* **`403 plan_required`** — LLM endpoints require **Creator plan or higher**.
* **`429 stream_concurrency_limit`** — you have more than 8 concurrent streams open from a single account. Wait for one to finish or upgrade your plan.
* **Tool sends `x-api-key: Bearer sk_…`** — AdSkull's Anthropic shim strips a redundant `Bearer ` prefix automatically, so this works.
