Skip to Content
Integration

Usage

  1. Get your API key from the dashboard .
  2. Use with OpenAI SDK by changing the base URL:
import openai client = openai.OpenAI( api_key='your-api-key', base_url='https://backend.ai.ml/openai' ) response = client.chat.completions.create( model="llama-3.1-8b-instruct", messages=[{"role": "user", "content": "Hello!"}] )
import OpenAI from 'openai'; const openai = new OpenAI({ apiKey: 'your-api-key', baseURL: 'https://backend.ai.ml/openai', }); const response = await openai.chat.completions.create({ model: "llama-3.1-8b-instruct", messages: [{role: "user", content: "Hello!"}] });
curl -X POST https://backend.ai.ml/openai/chat/completions\ -H "Authorization: Bearer your-api-key" \ -H "Content-Type: application/json" \ -d '{"model": "llama-3.1-8b-instruct", "messages": [{"role": "user", "content": "Hello!"}]}'
Last updated on