What you can build
Call the API
Send chat requests from your server with a service key, or from a signed-in browser with a Mayfair ID token. Most OpenAI client libraries work by changing the base URL.
Embed the assistant
One script tag adds a copilot panel to your app. It knows what the person is looking at and can run the actions you give it, after they approve.
Give Artemii app tools
Publish a manifest and one endpoint, and people can ask Artemii to search their mail or create an event, as themselves.
Share memory
Read and write the same per-person memory that Artemii uses, with the person's switches and a filter for sensitive data.
The basics
- Base URL.
<span data-api-url>https://mayfair-ai.crelloo.workers.dev</span>. Every endpoint lives under/v1. - Models. The public ids
arlo,lucian,orionandcurzon. See Models for what each is for. - Identity. The Artemii identity and voice are always applied. Your own system messages add to them; they cannot remove or override them.
- Stateless. A call saves nothing: no chats, messages, files, memory or artifacts. Request text is not logged by the gateway; usage counts are.
- Text only. Messages are text. Images are not supported in requests.
Getting access
Service keys are created by a Mayfair administrator in the admin console, and apps that sign people in with Mayfair ID are added to the gateway's allowed audiences and origins. If you are building a Mayfair app and need either, email hello@mayfairmail.com with the app name and what it will do. There is no self-serve sign-up for keys yet.
Versioning
The API is versioned by path (/v1). Inside /v1 we only add: new optional request fields, new response fields, new models and new error codes, so clients must ignore unknown fields. Anything breaking becomes /v2, and /v1 keeps working alongside it with advance notice before it is retired. Model ids are stable. A model's version, shown by GET /v1/models, changes when it is tuned.
Where to go next
- Quickstart for a first request in curl, JavaScript and Python
- Authentication to choose between service keys and Mayfair ID tokens
- Errors and limits before you go to production