Skip to content

Quickstart

Complete these three steps to verify your integration. Examples never contain real credentials.

Copy your API key from the account entry point provided by MomoyAI and store it in a server-side environment variable:

Terminal window
export MOMOYAI_API_KEY="your-api-key"
Terminal window
curl https://cpa.momoyai.com/v1/models \
-H "Authorization: Bearer $MOMOYAI_API_KEY"

Select a model from data[].id, or browse the model catalog.

Terminal window
curl https://cpa.momoyai.com/v1/chat/completions \
-H "Authorization: Bearer $MOMOYAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.4-mini",
"messages": [
{"role": "user", "content": "Introduce MomoyAI in one sentence."}
]
}'

A JSON response containing choices confirms the basic connection. Production applications should also set timeouts, bounded retries, and log redaction.

import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.MOMOYAI_API_KEY,
baseURL: "https://cpa.momoyai.com/v1",
});
const response = await client.chat.completions.create({
model: "gpt-5.4-mini",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0]?.message.content);

Next, review authentication and streaming.