Base URL

All requests go to https://lyumen-api.okotto.workers.dev/v1. It's fully OpenAI-compatible — just point your existing SDK or tool at this endpoint.

curl

bash
curl https://lyumen-api.okotto.workers.dev/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3-flash",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Python (OpenAI SDK)

python
from openai import OpenAI

client = OpenAI(
    base_url="https://lyumen-api.okotto.workers.dev/v1",
    api_key="not-needed"
)

response = client.chat.completions.create(
    model="gemini-3-flash",
    messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)

Streaming

Set "stream": true in your request body. The API returns SSE chunks just like OpenAI — compatible with the OpenAI SDK's streaming mode out of the box.

python
from openai import OpenAI

client = OpenAI(
    base_url="https://lyumen-api.okotto.workers.dev/v1",
    api_key="not-needed"
)

stream = client.chat.completions.create(
    model="gemini-3-flash",
    messages=[{"role": "user", "content": "Hello!"}],
    stream=True
)

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

Available Models

See the Models page for the full list. Pass the model ID as the model parameter in your request.