100% Protocol Compatible · Zero Refactoring

OpenAI-Compatible API Quickstart

AlphaTech fully adheres to the official OpenAI REST API specification. If your software or agents already use the official openai SDK, transition requires modifying only two settings.

Step 1: Obtain Credentials and Base Endpoint

Sign up at the AlphaTech dashboard and generate an API token (starts with sk-). The universal base URL is:

Base URL: https://alphatech.net.cn/v1
Open Console & Generate Token →

Step 2: Configure in Your Stack

Python (Official openai Library)

from openai import OpenAI

client = OpenAI(
    api_key="sk-your-alphatech-token",
    base_url="https://alphatech.net.cn/v1"
)

response = client.chat.completions.create(
    model="deepseek-v4-pro-0813",
    messages=[
        {"role": "user", "content": "Give me your analysis."}
    ]
)
print(response.choices[0].message.content)

Node.js / TypeScript

import OpenAI from 'openai';

const openai = new OpenAI({
  apiKey: process.env.ALPHATECH_API_KEY,
  baseURL: 'https://alphatech.net.cn/v1'
});

async function run() {
  const completion = await openai.chat.completions.create({
    messages: [{ role: 'user', content: 'Generate a typed LRU cache in TypeScript' }],
    model: 'deepseek-v4-pro-0813',
  });
  console.log(completion.choices[0].message.content);
}
run();

Step 3: One-Click Import into CC Switch

If you manage multiple API providers with CC Switch, copy the one-click import configuration from the console's /keys page instead of entering the Base URL and key by hand. Supported apps include:

Claude CodeCodexGemini CLIOpenCodeOpenClawHermesGrokBuild

For other CLI and desktop tools that follow standard OpenAI environment variable conventions, export the variables in your environment:

export OPENAI_API_BASE="https://alphatech.net.cn/v1"
export OPENAI_BASE_URL="https://alphatech.net.cn/v1"
export OPENAI_API_KEY="sk-your-alphatech-token"

Supported API Features

  • Streaming (SSE): Seamless token-by-token streaming via stream=true.
  • Tool Calling / Function Calling: Full support for tools and tool_choice.
  • Reasoning / Thinking Tokens: Native support for reasoning-model trajectories.
  • Vision Modalities: Supports multi-turn conversations with image attachments.
The example model deepseek-v4-pro-0813 is taken from the public pricing endpoint https://alphatech.net.cn/api/pricing (fetched 2026-10-11T08:10:39.293Z); 41 text models are currently published.