Compatibility

OpenAI format

For apps, IDEs and SDKs built for OpenAI. Change the base URL and the key, keep everything else.

Value
Base URLhttps://api.unaligned.pw/openai/v1
ChatPOST /chat/completions
ResponsesPOST /responses (stateless, see below)
ModelsGET /models
KeyAuthorization: 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

  • messages with system, user, assistant and tool roles.
  • max_tokens, temperature, top_p, stop, seed, presence_penalty, frequency_penalty.
  • stream, with stream_options.include_usage.
  • tools and tool_choice, and response_format JSON 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.