curl https://api.momor.ai/v1/chat/completions \
-H "Authorization: Bearer $MOMOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.4-mini",
"max_tokens": 1024,
"messages": [
{ "role": "user", "content": "Summarise this contract in three points." }
]
}'import os
from openai import OpenAI
client = OpenAI(base_url="https://api.momor.ai/v1", api_key=os.environ["MOMOR_API_KEY"])
reply = client.chat.completions.create(
model="openai/gpt-5.4-mini",
max_tokens=1024,
messages=[{"role": "user", "content": "Summarise this contract in three points."}],
)
print(reply.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.momor.ai/v1", apiKey: process.env.MOMOR_API_KEY });
const reply = await client.chat.completions.create({
model: "openai/gpt-5.4-mini",
max_tokens: 1024,
messages: [{ role: "user", content: "Summarise this contract in three points." }],
});
console.log(reply.choices[0].message.content);using System.ClientModel;
using OpenAI;
using OpenAI.Chat;
var client = new ChatClient(
model: "openai/gpt-5.4-mini",
credential: new ApiKeyCredential(Environment.GetEnvironmentVariable("MOMOR_API_KEY")!),
options: new OpenAIClientOptions { Endpoint = new Uri("https://api.momor.ai/v1") });
ChatCompletion reply = await client.CompleteChatAsync(
[new UserChatMessage("Summarise this contract in three points.")],
new ChatCompletionOptions { MaxOutputTokenCount = 1024 });
Console.WriteLine(reply.Content[0].Text);Gateway accepts the OpenAI Chat Completions format, so existing SDKs work once you change the base URL and key. Momor’s own API, POST /models, adds typed messages, file processing and a choice of what a broken stream does. Start with the quickstart.
Where to go next
- StartQuickstartGet a key and send your first request in a few minutes.Read the quickstart
- ModelsModel catalogEvery model, the providers that serve it, its limits and price.Browse models
- ReferenceCreate a chat completionEvery field Gateway reads, the response, and the errors you can get.Open the reference
- ProvidersProvider failoverWhat happens when a provider fails before it answers, and when it fails mid-answer.How failover works
- FilesFile processingSend documents, images and recordings to any model. Gateway converts what the model can’t read when you ask it to.Read about files
- KeysBring your own keysRun calls on your own provider accounts, sent with a call or saved for your organization.Set up your keys