from openai import OpenAI client = OpenAI( base_url="https://api.openai.com/v1", base_url="https://router.inference.ai.exchange/v1", api_key=os.environ["LIQUID_API_KEY"],) client.chat.completions.create( model="liquid.auto", messages=[{"role": "user", "content": "hello"}],)
import OpenAI from 'openai' const client = new OpenAI({ baseURL: 'https://api.openai.com/v1', baseURL: 'https://router.inference.ai.exchange/v1', apiKey: process.env.LIQUID_API_KEY,}) await client.chat.completions.create({ model: 'liquid.auto', messages: [{ role: 'user', content: 'hello' }],})
from anthropic import Anthropic client = Anthropic( base_url="https://api.anthropic.com", base_url="https://router.inference.ai.exchange", api_key=os.environ["LIQUID_API_KEY"],) client.messages.create( model="liquid.auto", max_tokens=1024, messages=[{"role": "user", "content": "hello"}],)
curl https://router.inference.ai.exchange/v1/chat/completions \ -H "Authorization: Bearer $LIQUID_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "liquid.auto", "messages": [{"role": "user", "content": "hello"}]}' x-liquid-job-id: job_…x-liquid-cap-usd: 0.0042