Compatibility
OpenAI format
For apps, IDEs and SDKs built for OpenAI. Change the base URL and the key, keep everything else.
| Value | |
|---|---|
| Base URL | https://api.unaligned.pw/openai/v1 |
| Chat | POST /chat/completions |
| Responses | POST /responses (stateless, see below) |
| Models | GET /models |
| Key | Authorization: Bearer … or x-api-key: … |
With the OpenAI SDK
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.unaligned.pw/openai/v1", api_key=os.environ["UNALIGNED_KEY"])
reply = client.chat.completions.create(
model="gpt-6-luna",
messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)Supported
messageswithsystem,user,assistantandtoolroles.max_tokens,temperature,top_p,stop,seed,presence_penalty,frequency_penalty.stream, withstream_options.include_usage.toolsandtool_choice, andresponse_formatJSON mode, on models that support them.
The Responses API (/responses, what Codex uses) works with every model, streamed or not, with function and custom tools. Nothing is stored: send the whole conversation each time, with store: false; previous_response_id is refused.
Images in messages (image_url parts, input_image on Responses) go inline, as data URLs: JPEG, PNG, GIF or WebP, up to 5 MB each, on models with vision. Nothing is fetched: a remote URL or a file id is refused.
Not supported: embeddings, image generation, audio, the Assistants API. Unknown parameters are ignored rather than refused, so existing code keeps working.