Ion Clock Lab API Docs
A clean OpenAI-compatible API gateway for chat models, image generation, embeddings, text-to-speech, and audio transcription.
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.
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
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
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
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
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
Open model JSON
Recommended starting models
| Use case | Model |
|---|---|
| Chat | gpt-4o-mini |
| Chat | gpt-4.1-mini |
| Chat | deepseek-chat |
| Image | gpt-image-2 |
| Embeddings | text-embedding-3-small |
| Text to speech | tts-1 |
| Transcription | whisper-1 |
Common Errors
| Error | Likely cause | Fix |
|---|---|---|
| 401 Unauthorized | Missing or wrong API key | Use a valid LiteLLM virtual key. |
| Model not found | The key does not allow that model, or the model is not registered. | Check the model list and key permissions. |
| Upstream provider error | The upstream provider rejected the request. | Check provider key, model name, and request format. |