Ready-to-run snippets for the Vynex API — a single OpenAI-compatible endpoint for GPT, Claude, Gemini, DeepSeek, Qwen and GLM.
Base URL: https://llm-api.vynexcloud.com/v1
export VYNEX_API_KEY="sk-..." # from https://llm-api.vynexcloud.com/register| Language | Example | What it shows |
|---|---|---|
| Python | python/chat.py |
Basic chat completion |
| Python | python/streaming.py |
SSE streaming |
| Python | python/tool-calling.py |
Function / tool calling |
| Node.js | nodejs/chat.ts |
Basic chat (TS) |
| Shell | curl/chat.sh |
No-SDK cURL |
All examples use the official OpenAI SDK with a custom base_url. Install:
pip install openai # Python
npm install openai # Node.jsSwitching models is a one-word change — try claude-sonnet-4-6,
gemini-2.5-pro, or deepseek/deepseek-v3.2.