Guide

Migration Guide

Switching to AI AdPilot takes minutes. Your existing code works with minimal changes.

From OpenAI

Just change the base_url and use your AdPilot API key:

Python
from openai import OpenAI

# Before: OpenAI
# client = OpenAI(api_key="sk-openai-...")

# After: AI AdPilot — same SDK, different URL + key
client = OpenAI(
    api_key="YOUR_ADPILOT_KEY",
    base_url="https://api.aipilotads.com/v1"
)

# Everything else stays exactly the same
response = client.chat.completions.create(...)

From Anthropic

Python
import anthropic

client = anthropic.Anthropic(
    api_key="YOUR_ADPILOT_KEY",
    base_url="https://api.aipilotads.com/v1"
)

message = client.messages.create(
    model="claude-opus-4-20250514",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello!"}]
)

What Changes?

Same API format (OpenAI-compatible)
Same SDKs work (Python & JS OpenAI SDK)
Same streaming format (SSE)
Same error format
Same function calling format
Use your AdPilot API key instead of provider key
Base URL changes to api.aipilotads.com/v1
Pricing may differ — check Models & Pricing page