OpenAI-compatible API
Review shared authentication, endpoint, and model discovery rules, then open a client-specific guide.
Prepare a key
YOUR_API_KEY is a placeholder in public documentation. Sign in to generate a configuration using one of your API keys.
Generate configuration with my API keyConfigure the endpoint
This tool uses the OpenAI-compatible protocol. Enter the URL below as the client's Base URL.
https://token.codenodex.com/v1
Copy configuration manually
If you do not use the CLI, replace YOUR_API_KEY with your API key. For real use, prefer the personalized configuration generator after signing in.
OpenAI SDK example
Confirm authentication, Base URL, and model discovery rules, then open the guide for your client or SDK.
import OpenAI from 'openai'
const client = new OpenAI({
apiKey: 'YOUR_API_KEY',
baseURL: 'https://token.codenodex.com/v1',
})
const response = await client.chat.completions.create({
model: 'YOUR_MODEL_ID',
messages: [{ role: 'user', content: 'Hello' }],
})
console.log(response.choices[0].message.content)Choose a specific integration guide
This protocol page covers shared rules. Use the dedicated guide for client fields, SDK parameters, and verification steps.
Verify connectivity
Run this command. A successful model list means the endpoint and API key are working.
curl "https://token.codenodex.com/v1/models" -H "Authorization: Bearer YOUR_API_KEY"