
Installation
General Compute offers OpenAI-compatible SDKs for Node.js and Python, providing a drop-in replacement for OpenAI’s SDK.API Key Setup
Create a key from the dashboard and configure your base URL by following the API Keys & Base URLs guide. Once the key is stored (for example, inGENERALCOMPUTE_API_KEY) you can initialize the SDKs as shown below.
Quick Start
Node.js / TypeScript
Python
Streaming
Both SDKs support streaming responses for real-time output.Build a Streaming Chat with Vercel AI SDK
The Vercel AI SDK works seamlessly with General Compute. Here’s a complete Next.js chat app with streaming. Check out the full example project in our examples/vercel-ai-chat directory.1. Install dependencies
2. Create the API route
app/api/chat/route.ts
3. Create the chat UI
app/page.tsx
4. Add your API key
.env.local
npm run dev and open http://localhost:3000 — you have a streaming chat app.
Build a Streaming Chat with Node.js
No framework needed — here’s a complete streaming chat using just Node.js and the General Compute SDK. Check out the full example project in our examples/node-streaming directory.index.ts
Migration from OpenAI
Switching from OpenAI’s SDK to GeneralCompute is a one-line change:Before (OpenAI)
After (GeneralCompute)
- Import:
openai→@generalcompute/sdk(Node) orgeneralcompute(Python) - API key:
OPENAI_API_KEY→GENERALCOMPUTE_API_KEY - Model name:
gpt-4→minimax-m2.7(or your chosen model)
- Method name:
client.chat.completions.create() - Parameters:
messages,temperature,stream, etc. - Response format: Same structure and types
- Streaming: Same async iteration pattern
Next Steps
Models & Pricing
See all available models with pricing and capabilities.
Rate Limits
Understand rate limits and plan quotas.
API Reference
Explore the complete API documentation.
Example Projects
Clone and run complete example projects.
Need help? Contact us at support@generalcompute.com or visit our documentation.

