Base URL <span data-api-url>https://mayfair-ai.crelloo.workers.dev</span>. All endpoints are under /v1 and need authentication. JSON in, JSON out, except streaming.
Models
| id | Name | Version | Tuned for |
|---|---|---|---|
arlo | Arlo | 3.2 | Quick answers and conversation (default) |
lucian | Lucian | 3.5 | Hard problem solving |
orion | Orion | 3.0 | Research, OSINT and data analysis |
curzon | Curzon | 3.1 | Design and coding |
Omit model to use the default. An unknown model, or one your credential may not use, answers 404 model_not_found.
POST /v1/chat/completions
OpenAI chat completions format.
| Field | Notes |
|---|---|
model | A public id. Optional: the default model is used when omitted. |
messages | Required, 1 to 200 items. Roles system, developer, user, assistant and tool. Content is a string or a list of {type:"text"} parts. Images are not supported. |
stream | true for server-sent events. stream_options.include_usage adds a final usage chunk. |
max_tokens / max_completion_tokens | Default 4096, at most 8000 (higher values are clamped). Also clamped to what is left of a key's token caps. |
temperature (0 to 2), top_p (0 to 1), stop (up to 4 strings), seed, presence_penalty, frequency_penalty | Passed through. n must be 1. |
tools, tool_choice | Function tools are passed through and the model's tool_calls come back in the OpenAI shape. Artemii does not run your tools. See Tools. |
reasoning_effort | low, medium or high. Some models fix their own level. |
user | Free text, at most 128 characters, for attribution in the usage report. |
Prompt order
The gateway builds one system message. The Artemii identity and voice come first, with the model's own guidance. A short note follows saying the call comes from an application. Your system and developer messages come last. They add to the Artemii blocks and cannot remove or override them. Do not put secrets in them: the system prompt is not a security boundary for your data. Artifact tags are not used over the API; replies are plain Markdown.
Response
{
"id": "chatcmpl-...", "object": "chat.completion", "created": 1762257600, "model": "arlo",
"choices": [{ "index": 0, "message": { "role": "assistant", "content": "Hello!" }, "finish_reason": "stop" }],
"usage": { "prompt_tokens": 120, "completion_tokens": 12, "total_tokens": 132 }
}finish_reason is stop, length or tool_calls. Every response carries x-request-id: quote it in bug reports.
GET /v1/models and GET /v1/models/{id}
{
"object": "list",
"data": [
{ "id": "arlo", "object": "model", "created": 1762257600, "owned_by": "mayfair", "label": "Arlo", "version": "3.2", "tagline": "...", "description": "..." }
]
}Only models the caller may use are listed. label, version, tagline and description are Mayfair's own wording for each model.
GET /v1/me
Who the credential is and what is left.
- Person:
{object:"me", auth:"user", id, name, email, plan, source:"api:<client>", models, usage:{ day:{pct, remainingPct, resetsAt}, week:{...}, blocked }}. Percentages only, like the Artemii app. - Service key:
{object:"me", auth:"key", id, name, app, prefix, scopes, models, expiresAt, limits:{rpm, dailyTokens, monthlyTokens}, usage:{ day:{used, limit, remainingPct, resetsAt}, month:{...} }}.
Response headers
x-request-idon every response.x-ratelimit-limit-requestsandx-ratelimit-remaining-requestsfor the requests-a-minute bucket.retry-after(seconds) on429and503.
CORS
OPTIONS preflight is answered for origins allowed for user tokens, or listed on any active key. A service-key call from a browser additionally needs its own Origin on that key's list. Responses echo the single allowed origin (never *) and expose retry-after and x-request-id.
Calling it from other languages
Any OpenAI-compatible client works. Set the base URL to <span data-api-url>https://mayfair-ai.crelloo.workers.dev</span>/v1 and use your credential as the API key. See the Quickstart for Python, JavaScript and curl.