Chat completions
POST /v1/chat/completions works like the OpenAI endpoint, and the same models also answer on /v1/completions and on /v1/responses, which keeps no state between calls.
Request
curl https://api.openmayhem.ai/v1/chat/completions \
-H "Authorization: Bearer $OPENMAYHEM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "hauhaucs/qwen3.6-35b-a3b-uncensored",
"messages": [{"role": "user", "content": "Hello"}],
"max_tokens": 2000,
"temperature": 0.7
}'Or with the OpenAI SDK, changing only the base URL and key:
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.openmayhem.ai/v1",
apiKey: process.env.OPENMAYHEM_API_KEY,
});
const completion = await client.chat.completions.create({
model: "hauhaucs/qwen3.6-35b-a3b-uncensored",
messages: [{ role: "user", content: "Hello" }],
max_tokens: 2000,
});Parameters
Everything you send beyond the required fields passes through to the network, which validates it against the model’s signed contract. An unsupported attribute is rejected with a 400 before any provider runs, so it costs nothing. Each model’s catalog page lists its supported parameters, for example qwen3.6 accepts tools, response_format, temperature, seed and more.
Idempotency
Send an Idempotency-Key header to prevent a retry from running or billing twice. Reuse it only while retrying one invocation; use a new key for a new invocation because inference content is not retained.
