agentsclimarketplace

Apertis migrate

Skill apertis-ai/apertis-skills/skills/apertis-migrate

Agent skills for Apertis AI — use 500+ models in Claude Code, Cursor, Copilot, and 45+ AI tools

Install
npx -y skills add apertis-ai/apertis-skills --skill apertis-migrate

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Migrate from OpenAI SDK to Apertis API in one line. Works with Python, TypeScript/JavaScript, curl, LangChain, and the Vercel AI SDK. Same SDK, just change the base URL.

SKILL.md

5.0 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it

Migrate from OpenAI to Apertis

Apertis is 100% OpenAI-compatible. Migration is one line — change base_url / baseURL and your API key. No other code changes needed.

Model IDs change frequently. You can keep your existing OpenAI model names (they still work), or check https://apertis.ai/pricing?utm_source=apertis-skills&utm_medium=skill-doc&utm_campaign=ecosystem for the full current list across 500+ models.

Python

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

# After — only base_url changes
from openai import OpenAI
client = OpenAI(
    base_url="https://api.apertis.ai/v1",
    api_key="YOUR_APERTIS_KEY"
)

Everything else stays identical: client.chat.completions.create(), client.embeddings.create(), streaming, async — all unchanged.

TypeScript / JavaScript

// Before
import OpenAI from "openai";
const openai = new OpenAI({ apiKey: "sk-..." });

// After — only baseURL changes
import OpenAI from "openai";
const openai = new OpenAI({
  baseURL: "https://api.apertis.ai/v1",
  apiKey: process.env.APERTIS_API_KEY,
});

Environment Variables

# Remove
OPENAI_API_KEY=sk-...

# Add
APERTIS_API_KEY=sk-...   # your Apertis key from apertis.ai

curl

# Before
curl https://api.openai.com/v1/chat/completions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{"model": "gpt-4o", "messages": [...]}'

# After — only the URL changes
curl https://api.apertis.ai/v1/chat/completions \
  -H "Authorization: Bearer $APERTIS_API_KEY" \
  -d '{"model": "gpt-4o", "messages": [...]}'

LangChain (Python)

# Before
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(model="gpt-4o")

# After
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
    model="gpt-4o",
    openai_api_base="https://api.apertis.ai/v1",
    openai_api_key="YOUR_APERTIS_KEY"
)

LangChain (TypeScript)

import { ChatOpenAI } from "@langchain/openai";

const llm = new ChatOpenAI({
  modelName: "gpt-4o",
  configuration: {
    baseURL: "https://api.apertis.ai/v1",
    apiKey: process.env.APERTIS_API_KEY,
  },
});

Vercel AI SDK

If your app or agent is built on the Vercel AI SDK (OpenCode, Kilo Code, Cursor, etc.), use the native Apertis provider instead of the OpenAI-compatible base URL:

npm install @apertis/ai-sdk-provider ai
// Before
import { openai } from "@ai-sdk/openai";
import { generateText } from "ai";
const { text } = await generateText({ model: openai("gpt-4o"), prompt: "..." });

// After — swap the provider import
import { apertis } from "@apertis/ai-sdk-provider";
import { generateText } from "ai";
const { text } = await generateText({ model: apertis("gpt-4o"), prompt: "..." });

Set APERTIS_API_KEY in your environment. Everything else (streamText, tool, embed) stays identical.

Model Names After Migration

You can keep your existing OpenAI model names — they still work:

model="gpt-4o"        # still works
model="gpt-4o-mini"   # still works
model="gpt-4-turbo"   # still works

Or switch to any of 500+ models across all providers:

model="claude-sonnet-4-6"      # Anthropic — best coding per dollar
model="gemini-3-flash-preview"  # Google — cheap, 1M token context
model="deepseek-r1"             # DeepSeek — reasoning tasks
model="deepseek-v3"             # DeepSeek — budget coding option

Check the full current model list and pricing at https://apertis.ai/pricing?utm_source=apertis-skills&utm_medium=skill-doc&utm_campaign=ecosystem

Codebase Migration — Let Your AI Assistant Do It

Ask your AI coding assistant to:

  1. Find all OpenAI client initializations:

    • new OpenAI( (TypeScript/JS)
    • OpenAI(api_key= or openai.OpenAI( (Python)
  2. Add base_url="https://api.apertis.ai/v1" (Python) or baseURL: "https://api.apertis.ai/v1" (TypeScript)

  3. Replace OPENAI_API_KEYAPERTIS_API_KEY in .env files

  4. Update .env.example with the new variable

What You Unlock After Migration

Add :web to any model for real-time web search:

model="gpt-4o:web"
# response includes: web_sources → [{title, url, snippet}]

Access 500+ models without switching SDKs:

model="claude-sonnet-4-6"      # Anthropic
model="gemini-3-flash-preview"  # Google
model="deepseek-r1"             # DeepSeek — reasoning
model="minimax-m1"              # MiniMax — long context alternative

Get Your API Key

  1. Go to https://apertis.ai?utm_source=apertis-skills&utm_medium=skill-doc&utm_campaign=ecosystem
  2. Sign up or log in
  3. Navigate to API Keys
  4. Create a new key

Your key starts with sk- (PAYG) or sk-sub_ (subscription).

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.