OpenAI API
The OpenAI API is not a Model Context Protocol client, and the ChatGPT website does not call Unimatrix on its own. This guide covers the OpenAI provider id openai (the setup slug is openai-api) and the memory tools you call separately. It does not import old ChatGPT threads.
Memory tools
Settings → API Keys mints umx_ plus 32 hex characters and shows the raw key once. Use Authorization: Bearer on Unimatrix routes.
MCP clients connect to https://www.deployunimatrix.com/api/mcp. Settings → MCP Tokens issues a different value, umx_<8 hex>_<56 hex>, for that server.
GET /api/tools lists tool schemas. POST /api/tools/call accepts toolName, args, and optional sourceLlm. Use sourceLlm: "openai" so a stored memory can file into the OpenAI History location under LLM Histories after you connect the provider. unimatrix_recall takes query. unimatrix_store_memory takes content. Confirm every other field with GET /api/tools. The gateway does not add recalled text to the OpenAI request for you.
Capture gateway
Settings → AI Providers lists gpt-4o, gpt-4-turbo, gpt-4o-mini, and o1 for OpenAI. The key link is https://platform.openai.com/api-keys. Connecting runs Reply with exactly: ok with maxTokens 8 and temperature 0 through OpenAIProvider. That class posts to https://api.openai.com/v1/chat/completions unless the saved row includes a base URL, which the factory passes through as the endpoint.
Call POST /api/llm-providers/<provider-id>/chat with a Unimatrix API key or a session cookie. Send 1 to 50 messages. Roles are system, user, or assistant. Content is required, up to 50,000 characters. Optional options.maxTokens is an integer from 1 to 32000, temperature is 0 to 2, and topP is 0 to 1. options.stream is rejected.
The route forwards those messages with the decrypted key and then tries to store the exchange. Tags on a stored memory are source:openai, llm-source:openai, and model:<model>. The response JSON is the adapter result plus capture. capture.captured is true and capture.memoryId is set only after storage succeeds. A failed store still returns the provider result when the adapter produced one, with capture.captured false and capture.warning.
OpenAIProvider.complete reports some HTTP failures as a result object instead of throwing. The gateway still attempts capture and returns that object with the capture status. Do not treat a saved provider row as proof that a later call will succeed.
The signed-in /agent page can also call a connected openai provider. POST /api/agent/run requires a session cookie, not the bearer API key, and it is rate limited. That route is separate from the capture gateway.