Ultra AI is Open AI compatible. This means that you can use the OpenAI SDK in various languages to interact with Ultra AI.

All the libraries Open AI supports can be found here.

Example using Open AI JavaScript SDK

import OpenAI from "openai"

const openai = new OpenAI({
  apiKey: "your-ultraai-api-key",
  baseURL: "https://api.ultraai.app/v1",
})

const completion = await openai.chat.completions.create({
  model: JSON.stringify({
    models: ["openai:gpt-4o", "anthropic:claude-3-5-sonnet-20240620"],
  }),
  messages: [{ role: "user", content: "Hello, how are you?" }],
})