Introduction
OneKeyModel provides a unified OpenAI-compatible API for working with available AI models such as DeepSeek and Qwen. This guide shows you how to get started in 5 minutes.
Step 1: Register and Get an API Key
- Sign up on the platform
- Go to the Tokens section
- Create a new API key
Step 2: Configure the Client
from openai import OpenAI
client = OpenAI(
api_key="your-api-key",
base_url="https://api.onekeymodel.com/v1"
)Step 3: Your First Request
response = client.chat.completions.create(
model="deepseek-chat",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)Conclusion
That's it! You can now test available models for code, writing, translation, and automation by changing the model parameter.