
Installation
General Compute offers OpenAI-compatible SDKs for Node.js and Python, providing a drop-in replacement for OpenAI’s SDK.Quick Start
Node.js / TypeScript
Python
API Key Setup
You can provide your API key in two ways:- Environment variable (recommended):
- Constructor option:
Streaming
Both SDKs support streaming responses for real-time output.Migration from OpenAI
Switching from OpenAI’s SDK to GeneralCompute is simple:Before (OpenAI)
After (GeneralCompute)
- Import:
openai→@generalcompute/sdk(Node) orgeneralcompute(Python) - API key:
OPENAI_API_KEY→GENERALCOMPUTE_API_KEY - Model name:
gpt-4→llama-3.3-70b(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
Model Compatibility
| Model ID | Model Name | Notes |
|---|---|---|
| llama3.1-8b | Llama 3.1 8B | Fast, cost-effective |
| llama-3.3-70b | Llama 3.3 70B | High capability, latest generation |
| qwen-3-32b | Qwen 3 32B | Balanced performance and speed |
| qwen-3-235b-a22b-instruct-2507 | Qwen 3 235B Instruct | Largest model, highest capability |
| gpt-oss-120b | OpenAI GPT OSS | Open-source GPT alternative |
| zai-glm-4.7 | Z.ai GLM 4.7 | Advanced reasoning capabilities |
OpenAI Model Equivalents
| OpenAI Model | Recommended GeneralCompute Model | Notes |
|---|---|---|
| gpt-3.5-turbo | llama3.1-8b | Fast, cost-effective |
| gpt-4 | llama-3.3-70b | High capability, similar performance |
| gpt-4-turbo | qwen-3-235b-a22b-instruct-2507 | Highest capability option |
Next Steps
API Reference
Explore the complete API documentation.
Error Handling
Learn how to handle errors and rate limits.
Advanced Usage
Custom timeouts, headers, and configurations.
List Models
Discover all available models via the API.
Need help? Contact us at support@generalcompute.com or visit our documentation.

