Claude, GPT and Gemini are temporarily unavailable on AIPower.

API Documentation

AIPower provides an OpenAI-compatible API with 10 AI models from 6 providers (DeepSeek, Alibaba, Zhipu, Moonshot, ByteDance, MiniMax). Change one line of code to get started.

⚡ Try without signing up — paste this in your terminal
curl (no signup, no card)
curl https://api.aipower.me/v1/chat/completions \
  -H "Authorization: Bearer sk-aipower-demo-public" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek/deepseek-chat",
    "messages": [{"role": "user", "content": "Translate good morning into Mandarin, Japanese, and Spanish. Reply in JSON."}]
  }'

The demo key is rate-limited to 5 calls per IP per day and only works on demo models (DeepSeek, Qwen Turbo, GLM-4 Flash). Create an account for 10 trial calls, then top up $5 to unlock Kimi, MiniMax, and premium reasoning models.

Quick Start

1. Create an account and copy your API key (or use sk-aipower-demo-public above for instant trial).

2. Use any OpenAI-compatible SDK with our base URL:

Base URL
https://api.aipower.me/v1

Authentication

Use Bearer token authentication with your API key:

Header
Authorization: Bearer YOUR_API_KEY

Get an API key → your API key auto-fills in all code examples. Copy & run instantly.

Chat Completions

POST /v1/chat/completions

Creates a model response for the given chat conversation. Supports streaming.

curl

curl
curl https://api.aipower.me/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek/deepseek-chat",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "What is the capital of France?"}
    ],
    "temperature": 0.7,
    "max_tokens": 1000,
    "stream": false
  }'

Get an API key → your API key auto-fills in all code examples. Copy & run instantly.

Python (OpenAI SDK)

Python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.aipower.me/v1",
    api_key="YOUR_API_KEY",
)

# Non-streaming
response = client.chat.completions.create(
    model="deepseek/deepseek-chat",
    messages=[{"role": "user", "content": "Translate 'good morning' into Mandarin, Japanese, and Spanish. Reply in JSON."}],
)
print(response.choices[0].message.content)

# Streaming
stream = client.chat.completions.create(
    model="deepseek/deepseek-chat",
    messages=[{"role": "user", "content": "Tell me a story"}],
    stream=True,
)
for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

Get an API key → your API key auto-fills in all code examples. Copy & run instantly.

Node.js (OpenAI SDK)

JavaScript
import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://api.aipower.me/v1',
  apiKey: 'YOUR_API_KEY',
});

const response = await client.chat.completions.create({
  model: 'deepseek/deepseek-chat',
  messages: [{ role: 'user', content: "Translate 'good morning' into Mandarin, Japanese, and Spanish. Reply in JSON." }],
});

console.log(response.choices[0].message.content);

Get an API key → your API key auto-fills in all code examples. Copy & run instantly.

Go

Go
package main

import (
    "context"
    "fmt"
    openai "github.com/sashabaranov/go-openai"
)

func main() {
    config := openai.DefaultConfig("YOUR_API_KEY")
    config.BaseURL = "https://api.aipower.me/v1"
    client := openai.NewClientWithConfig(config)

    resp, _ := client.CreateChatCompletion(
        context.Background(),
        openai.ChatCompletionRequest{
            Model: "deepseek/deepseek-chat",
            Messages: []openai.ChatCompletionMessage{
                {Role: "user", Content: "Translate 'good morning' into Mandarin, Japanese, and Spanish. Reply in JSON."},
            },
        },
    )
    fmt.Println(resp.Choices[0].Message.Content)
}

Get an API key → your API key auto-fills in all code examples. Copy & run instantly.

Request Parameters

ParameterTypeRequiredDescription
modelstringYesModel ID (e.g., deepseek/deepseek-chat). Use 'auto' for smart routing.
messagesarrayYesArray of message objects with role and content
temperaturenumberNoSampling temperature (0-2). Default: 1
max_tokensintegerNoMaximum tokens to generate
streambooleanNoStream response via SSE. Default: false
top_pnumberNoNucleus sampling. Default: 1
stopstring|arrayNoStop sequences

Smart Routing

Use smart model IDs to automatically route to the best model for your task:

ParameterTypeRequiredDescription
automodelNoAuto-select the best model based on the prompt
auto-cheapmodelNoRoute routine work to a cost-control model
auto-fastmodelNoRoute to the fastest model
auto-freemodelNoRoute demos and simple experiments to a utility model
Example
response = client.chat.completions.create(
    model="deepseek/deepseek-chat",  # Choose an available Chinese model
    messages=[{"role": "user", "content": "Write a React component"}],
)

Responses API

POST /v1/responses

OpenAI-compatible Responses API. Simpler interface for single-turn interactions.

curl
curl https://api.aipower.me/v1/responses \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek/deepseek-chat",
    "input": "What is the meaning of life?"
  }'

Get an API key → your API key auto-fills in all code examples. Copy & run instantly.

Available Models

GET /v1/models — Returns all available models with live pricing.

Per-token pricing in USD. Pay only for what you use. Top up via credit card, WeChat Pay, or Alipay.

Chinese Models (10)

Model IDNameInput $/MOutput $/MContext
deepseek/deepseek-chatDeepSeek V3$0.34$0.5064K
deepseek/deepseek-reasonerDeepSeek R1$0.34$0.5064K
qwen/qwen-plusQwen Plus$0.13$1.87128K
qwen/qwen-turboQwen Turbo$0.08$0.31128K
zhipu/glm-5.1GLM-5.1$1.25$4.00128K
zhipu/glm-4-flashGLM-4 Flash$0.01$0.01128K
moonshot/kimi-k2.5Kimi K2.5$0.24$1.20256K
moonshot/moonshot-v1-8kMoonshot v1 8K$0.14$0.148K
doubao/doubao-pro-256kDoubao Pro 256K$0.07$0.12256K
minimax/minimax-text-01MiniMax Text 01$0.36$1.441M

Error Codes

ParameterTypeRequiredDescription
400NoBad request — malformed JSON or invalid parameters. Check model name, messages format.
401NoInvalid or missing API key. Use `Authorization: Bearer sk-aipower-xxx`.
402NoInsufficient credits. Top up at /dashboard/billing.
403NoModel not allowed on the trial tier. Top up $5+ to unlock premium models (GLM-5.1, Kimi, MiniMax).
404NoModel not found. List models via GET /v1/models.
429NoRate limit exceeded. Back off and retry with exponential delay.
502NoUpstream provider error (auto-failover will try backup). Usually transient.
503NoProvider temporarily unavailable. Retry or route to a different model.

Billing

AIPower uses a prepaid credits system. Add credits via Stripe (credit card, WeChat Pay, or Alipay). WeChat Pay and Alipay are listed on aipower.me for China-friendly top-up. Checkout steps follow the billing page.

AIPower is a cross-border AI API gateway. Self-serve prepaid credits from $5. Team plan $149/mo (prepaid). BYOK beta $49/mo. Enterprise committed-use pilots from $299/mo; GO-1 onboarding from $699 prepaid (separate). WeChat Pay and Alipay are listed on aipower.me for China-friendly top-up. Default commercial terms are prepaid — not default Net 30.
AIPower 是跨境 AI API 网关。自助预付额度自 $5 起;Team $149/月(先款);BYOK 测试 $49/月;企业 committed-use pilot 自 $299/月起;开通包 GO-1 自 $699 先款(另计)。站内公开支持微信/支付宝充值。默认先款,不默认 Net 30。

Same fact block on pricing. Product pages: Team · BYOK. Setup forms: Team intake · BYOK intake.

Trial tier: 10 trial calls on signup. No credit card required. Premium models unlock after a $5+ top-up.

First top-up bonus: any amount ≥ $5 on your first-ever top-up gets +100 bonus credits (one-time).

Larger top-ups earn up to 35% bonus credits:

  • $5 / $20: base credits + first-payment bonus (if first time)
  • $50: +10% bonus credits
  • $100: +20% bonus credits
  • $500: +30% bonus credits
  • $2000: +35% bonus credits

Check your balance, top up, or set a daily spending cap at /dashboard/billing.