🌟 Before You Start
Get started with LaoZhang API in just 5 minutes. All you need: 1️⃣ Create an account (free trial credits included) 2️⃣ Get your API key (takes 30 seconds) 3️⃣ Change one line of code (replace base URL) This guide will show you how to:- ✅ Access 200+ AI models through a single API
- ✅ Use existing OpenAI SDK with zero code changes
- ✅ Switch between models with one parameter
- ✅ Start building immediately with free credits
Step 1: Create Account and Get API Key
📧 Create Account (Free Trial Credits Included)
1
Sign Up
Visit LaoZhang API to create your account🎁 New User Bonus: Free trial credits automatically added upon registration
2
Verify Email
- Enter your email address
- Create a secure password (8+ characters)
- Verify your email via the confirmation link
3
Access Console
Log in to your console dashboardYou’ll see:
- Account balance with trial credits
- Usage statistics and history
- API key management
🎉 Trial Credits: New users receive free credits to test all features. Start building immediately without payment information.
Step 2: Get Your API Key
🔑 Generate Your API Key
- Use Default Key (Quickest)
- Create Custom Key
- Navigate to Token Management
- Locate your Default Token
- Click Copy to clipboard
Security Best Practices:
- API keys are shown only once - save securely immediately
- Never commit keys to version control (use
.gitignore
) - Store keys in environment variables
- Rotate keys periodically for enhanced security
Step 3: Make Your First API Call
🎯 Test Your Integration
- Online Playground (Recommended)
- cURL Command
Test instantly in the API Playground:
- Select a model (e.g.,
gpt-4o-mini
) - Enter a test prompt: “Hello, introduce yourself”
- Click Send
🔧 Integration Configuration
Remember These Three Things
💻 Complete Examples in Different Languages
- Python (Most Common)
- Node.js / TypeScript
- Curl / Command Line
Best Practice: Store API key in environment variables
Next Steps
Congratulations! You’ve successfully integrated LaoZhang API. Next you can:View API Documentation
Learn about complete API interface documentation
Explore Model List
View all supported AI models
Integrate into Apps
Integrate LaoZhang API into various tools
View Usage Statistics
Monitor usage in console
🔥 Common Questions Quick Reference
How to tell if integration is successful?
How to tell if integration is successful?
Three signs:
- ✅ API call returns normal results (no errors)
- ✅ Response time under 1 second
- ✅ Can see call records in console
How to choose the right model?
How to choose the right model?
Choose by scenario:💻 Programming Development:
- First choice:
claude-sonnet-4-20250514
- Alternative:
deepseek-coder-v3
- First choice:
gpt-4o
- Alternative:
claude-3.5-sonnet
- First choice:
gpt-4.1-mini
- Alternative:
gemini-2.5-flash
- First choice:
deepseek-v3
- Alternative:
qwen-max
What if my API key is leaked?
What if my API key is leaked?
Immediate actions:
- Go to Token Management
- Revoke the compromised key immediately
- Generate a new API key
- Update the key in all your applications
- Always use environment variables
- Never hardcode keys in source code
- Set spending limits per key
- Rotate keys every 90 days
What happens when trial credits run out?
What happens when trial credits run out?
Options available:
- Add credits to your account via the billing page
- Switch to more cost-effective models (e.g.,
gpt-4o-mini
,gemini-flash
) - Optimize your usage with
max_tokens
limits
- Monitor usage in the console dashboard
- Set budget alerts
- Use streaming for better user experience
How do I add more credits?
How do I add more credits?
Visit the billing page to add credits to your account.Payment options:
- Credit/debit cards
- Cryptocurrency (USDT)
- Wire transfer for enterprise accounts
Tip: Save your API key properly and check usage logs in the console regularly. Every request has message history for reasonable cost optimization.
Enjoy using LaoZhang API~