Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

YingSuan AI - API Examples

Quick start examples for the YingSuan AI LLM API platform.

Curious about the gateway behind these examples? See our open teaching scaffold: yingsuan-ai/gateway-from-scratch

Dual-node Listed on Yunnan Data Exchange

Our LLM API Gateway service and AI Computing Scheduling service are dual-node listed on the Yunnan Data Circulation Trading Platform (provincial platform + regional node). View listing

Features

  • OpenAI-compatible API - Just change base_url, no code rewrite needed
  • No credit card required - Pay via Wise bank transfer
  • DeepSeek models - deepseek-chat and deepseek-reasoner
  • Kimi K3 (2.8T MoE, 1M context) - call the open-weight flagship via OpenAI SDK
  • Free tier - 100 free calls, 3 permanent-free models, no credit card
  • Targeted for Southeast Asia - Optimized for developers in VN/TH/ID/PH/MY/SG

Quick Start

Get Your API Key

Email yingsuan_service@163.com with your name, country, and desired plan.

Python

from openai import OpenAI

client = OpenAI(
    api_key="sk-your-yingsuan-key",
    base_url="https://yingsuan.top/v1"
)

response = client.chat.completions.create(
    model="deepseek-chat",
    messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)

See examples/python/ for full examples.

Node.js

import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'sk-your-yingsuan-key',
  baseURL: 'https://yingsuan.top/v1',
});

const response = await client.chat.completions.create({
  model: 'deepseek-chat',
  messages: [{ role: 'user', content: 'Hello!' }],
});

See examples/nodejs/ for full examples.

cURL

curl https://yingsuan.top/v1/chat/completions   -H "Authorization: Bearer sk-your-yingsuan-key"   -H "Content-Type: application/json"   -d '{"model":"deepseek-chat","messages":[{"role":"user","content":"Hello!"}]}'

Kimi K3 (2.8T MoE, 1M context)

The open-weight flagship from Moonshot AI. Streaming works out of the box.

from openai import OpenAI

client = OpenAI(
    api_key="sk-your-yingsuan-key",
    base_url="https://yingsuan.top/v1"
)

stream = client.chat.completions.create(
    model="kimi-k3",
    messages=[{"role": "user", "content": "Write a small agent that uses tool-calling to check the weather"}],
    stream=True,
)
for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

Kimi K3 is outside the free tier. Upgrade via Wise to unlock it.

Free Tier

Get 100 free API calls (no credit card) with 3 permanent-free models: glm-4-flash (128K), glm-4.7-flash (200K), Qwen2.5-7B.

👉 Get your free key →

API Reference

Endpoint Method Description
/v1/chat/completions POST Chat completions
/v1/models GET List models
/v1/usage GET Check usage

Full docs: yingsuan.top/api.html

Pricing

Plan RPM Minimum
Starter 10 $50
Standard 30 $200
Professional 60 $500
Enterprise Unlimited Custom

License

MIT


yingsuan.top - GPU & LLM API for Southeast Asia

About

YingSuan AI API Examples - Python, Node.js, cURL quickstart for DeepSeek/OpenAI-compatible LLM API

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors