Перейти к основному содержанию

Documentation Index

Fetch the complete documentation index at: https://docs.omniakey.com/llms.txt

Use this file to discover all available pages before exploring further.

This guide uses the OpenAI-compatible endpoint. For Claude Code, Cursor, Codex, Cline, or aider, see Tools & SDKs.

Step 1: Create an API key

Create a key in the API Keys dashboard. Every request uses:
Authorization: Bearer your-omniakey-api-key

Step 2: Install an SDK

pip install openai

Step 3: Send a request

Set base_url to https://api.omniakey.com/v1 and copy a model id from Models.
from openai import OpenAI

client = OpenAI(
    api_key="your-omniakey-api-key",
    base_url="https://api.omniakey.com/v1",
)

response = client.chat.completions.create(
    model="claude-opus-4-8",
    messages=[{"role": "user", "content": "Explain what a race condition is."}],
)

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

Stream responses

stream = client.chat.completions.create(
    model="claude-opus-4-8",
    messages=[{"role": "user", "content": "Write a haiku about clean code."}],
    stream=True,
)

for chunk in stream:
    if chunk.choices[0].delta.content is not None:
        print(chunk.choices[0].delta.content, end="")