Skip to main content

Step 1: Account Setup

1.1 Register Account

Visit APIYI Website to register:
  • Register with email (university or corporate email recommended)
  • Verify email address
  • Login to console

1.2 Account Top-up

Top up your account in the console:
  1. Click “Top-up” menu
  2. Select top-up amount (minimum 5,get155, get 15% bonus for 100+)
  3. Complete payment (Alipay, WeChat supported)
New users get extra bonus on first top-up. Balance is credited immediately. For first-time bonus credits, add our staff on WeChat: 8765058 for manual credit.

Step 2: Create API Key

2.1 Generate Key

  1. In the backend navigation, click “Token” section: https://api.apiyi.com/token
  2. You can copy the [Default Token] directly (there’s a Copy icon on the right)
  3. Or create a new token: Click the “New” button in the upper right, name your key (e.g., test-key), click confirm to create a new token.

Step 3: Start Calling

3.1 Get Access Information

  • API Address (Base_Url): https://api.apiyi.com
  • API Key: The key you just created
  • Request Format: Fully compatible with OpenAI API format

3.2 Test Call

Quick test using curl:
curl https://api.apiyi.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "gpt-4.1-mini",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

3.3 Code Examples

  • Python
  • Node.js
  • Java
from openai import OpenAI

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

response = client.chat.completions.create(
    model="gpt-4.1-mini",
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)

print(response.choices[0].message.content)

Next Steps

Congratulations! You’ve successfully integrated APIYI. Next, you can:

FAQ

How to switch models?

Simply modify the model parameter in your request:
{
  "model": "gpt-4.1",                     // Use GPT-4.1
  "model": "claude-sonnet-4-20250514",    // Use Claude 4 Sonnet
  "model": "gemini-2.5-pro"               // Use Gemini 2.5 Pro
}

Which programming languages are supported?

APIYI is compatible with OpenAI API standards and supports all languages that OpenAI SDKs support:
  • Python
  • JavaScript/TypeScript
  • Java
  • C#/.NET
  • Go
  • Ruby
  • PHP
  • And more…

How to check balance?

Login to Console to view:
  • Account balance
  • Usage history
  • Consumption statistics

What if I encounter problems?

  1. Check API Documentation
  2. Review Common Errors
  3. Contact support: [email protected]
Tip: Save your API key securely and regularly check usage logs in the console. Every request has message history for cost optimization. Happy using!