OpenAI-Compatible Gateway

Ion Clock Lab API Docs

A clean OpenAI-compatible API gateway for chat models, image generation, embeddings, text-to-speech, and audio transcription.

Default language: English Base URL: https://llm.ionclocklab.com/v1 Gateway: LiteLLM

Quick start

Every request needs a user API key. Ask the administrator for a limited virtual key. Do not use the LiteLLM master key in applications.

Base URL

Use this base URL in OpenAI-compatible SDKs and HTTP requests:

https://llm.ionclocklab.com/v1

Authentication

Pass your key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Chat Completions

Use this endpoint for normal text chat and assistant-style responses.

POST/v1/chat/completions
curl -X POST 'https://llm.ionclocklab.com/v1/chat/completions' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [
      {"role": "user", "content": "Hello from Ion Clock Lab"}
    ]
  }'

Python example

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://llm.ionclocklab.com/v1",
)

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[
        {"role": "user", "content": "Hello from Ion Clock Lab"}
    ],
)

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

Image Generation

Use this endpoint to generate images. Recommended model: gpt-image-2

POST/v1/images/generations
curl -sS -X POST 'https://llm.ionclocklab.com/v1/images/generations' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A clean minimal logo for Ion Clock Lab",
    "n": 1,
    "size": "1024x1024"
  }' > /tmp/image_response.json

Embeddings

Use this endpoint to convert text into embedding vectors. Recommended model: text-embedding-3-small

POST/v1/embeddings
curl -sS -X POST 'https://llm.ionclocklab.com/v1/embeddings' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d '{
    "model": "text-embedding-3-small",
    "input": "Ion Clock Lab optical clock research"
  }'

Text to Speech

Use this endpoint to generate audio from text. Recommended model: tts-1

POST/v1/audio/speech
curl -sS -X POST 'https://llm.ionclocklab.com/v1/audio/speech' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d '{
    "model": "tts-1",
    "input": "Hello from Ion Clock Lab LiteLLM.",
    "voice": "alloy"
  }' --output /tmp/tts-test.mp3

Audio Transcription

Use this endpoint to transcribe audio into text. Recommended models: whisper-1, gpt-4o-mini-transcribe

POST/v1/audio/transcriptions
curl -sS --location 'https://llm.ionclocklab.com/v1/audio/transcriptions' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  --form 'file=@"/tmp/tts-test.mp3"' \
  --form 'model="whisper-1"'

Models

The public model list page reads a static JSON file generated from the LiteLLM model registry. It exposes model names and types, not API keys.

Open model list

/models/

Open model JSON

/assets/models.json

Recommended starting models

Use caseModel
Chatgpt-4o-mini
Chatgpt-4.1-mini
Chatdeepseek-chat
Imagegpt-image-2
Embeddingstext-embedding-3-small
Text to speechtts-1
Transcriptionwhisper-1

Common Errors

ErrorLikely causeFix
401 UnauthorizedMissing or wrong API keyUse a valid LiteLLM virtual key.
Model not foundThe key does not allow that model, or the model is not registered.Check the model list and key permissions.
Upstream provider errorThe upstream provider rejected the request.Check provider key, model name, and request format.