Text Capabilities#

Omnio is also a powerful AI model for text-to-text applications. Omnio performs on-par with GPT-4o, Mistral Large 2 and Claude 3.5 Sonnet on text-to-text benchmarks. Visit our Omnio blog post for benchmark information.

Example#

Make sure you have created a Soniox account and set the API key. You can find the instructions here.

export SONIOX_API_KEY="your_soniox_api_key_here"

Install OpenAI SDK for Python using pip:

pip install openai

Create a file called example.py with the following code:

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["SONIOX_API_KEY"],
    base_url="https://api.llm.soniox.com/v1",
)

completion = client.chat.completions.create(
    model="omnio-chat-text-preview",
    messages=[{"role": "user", "content": "Explain how matrix multiplication works."}],
)

print(completion.choices[0].message.content)

Run the code with python example.py, and in a few moments you should see the response from the API.