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, higher amounts get more bonuses, view promotion policy)
  3. Complete payment (Alipay, WeChat supported)
New users get extra bonus on first top-up. Balance is credited immediately. For first-time bonus credits, contact us on Enterprise WeChat 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

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:

View API Documentation

Learn about complete API interface documentation

Explore Model List

View all supported AI models

Integrate into Apps

Integrate APIYI into various tools

View Usage Statistics

Monitor usage in console

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: support@apiyi.com
Tip: Save your API key securely and regularly check usage logs in the console. Every request has message history for cost optimization. Happy using!