### Install and Run Mint CLI Source: https://github.com/mnfst/docs/blob/main/README.md Install the Mint CLI globally and then run it to start the local development server. Open http://localhost:3000 in your browser. ```bash npm i -g mint mint dev ``` -------------------------------- ### Quick Install Script Source: https://github.com/mnfst/docs/blob/main/self-hosted.mdx Execute this command to download and run the Manifest installer script. It automates the setup process for a self-hosted instance. ```bash bash <(curl -sSL https://raw.githubusercontent.com/mnfst/manifest/main/docker/install.sh) ``` -------------------------------- ### Start Ollama Server Source: https://github.com/mnfst/docs/blob/main/providers/local-models.mdx Pull a model and start the Ollama server. Ensure Ollama is installed and accessible. ```bash ollama pull llama3.1:8b # then: ollama serve ``` -------------------------------- ### Install Mintlify Skill Source: https://github.com/mnfst/docs/blob/main/AGENTS.md Installs the Mintlify skill for product knowledge. Run this command in your terminal. ```bash npx skills add https://mintlify.com/docs ``` -------------------------------- ### Review and Run Installer Script Source: https://github.com/mnfst/docs/blob/main/self-hosted.mdx Download the installer script first to review its contents before execution. This allows for manual inspection and execution. ```bash curl -sSLO https://raw.githubusercontent.com/mnfst/manifest/main/docker/install.sh less install.sh bash install.sh ``` -------------------------------- ### Install Mintlify CLI Source: https://github.com/mnfst/docs/blob/main/CONTRIBUTING.md Install the Mintlify CLI globally using npm. This is a prerequisite for local documentation development. ```bash npm i -g mint ``` -------------------------------- ### Start LM Studio Server Source: https://github.com/mnfst/docs/blob/main/providers/local-models.mdx Start the LM Studio local inference server. This can be done via the command line or through the LM Studio application. ```bash lms server start ``` -------------------------------- ### Start Local Development Server Source: https://github.com/mnfst/docs/blob/main/CONTRIBUTING.md Navigate to the docs directory and run the Mintlify development server. This allows you to preview changes locally before submitting a pull request. ```bash mint dev ``` -------------------------------- ### Start llama.cpp Server on Host 0.0.0.0 Source: https://github.com/mnfst/docs/blob/main/providers/local-models.mdx Start the llama.cpp server, explicitly binding to all network interfaces (0.0.0.0) and specifying the port. This is necessary for Docker compatibility. ```bash llama-server -m .gguf --host 0.0.0.0 --port 8080 ``` -------------------------------- ### Start llama.cpp Server Source: https://github.com/mnfst/docs/blob/main/providers/local-models.mdx Launch the llama.cpp server with a specified GGUF model file and port. Replace .gguf with the actual model path. ```bash llama-server -m .gguf --port 8080 ``` -------------------------------- ### Start LM Studio Server on Local Network Source: https://github.com/mnfst/docs/blob/main/providers/local-models.mdx Start the LM Studio server, binding to all network interfaces and enabling CORS. This is useful when running Manifest in Docker. ```bash lms server start --bind 0.0.0.0 --port 1234 --cors ``` -------------------------------- ### Upgrade Manifest Installation Source: https://github.com/mnfst/docs/blob/main/self-hosted.mdx Upgrade an existing self-hosted Manifest installation to the latest release. This involves pulling the new image and restarting the services. ```bash docker compose pull docker compose up -d ``` -------------------------------- ### Run Manifest with BYO PostgreSQL (Linux/macOS) Source: https://github.com/mnfst/docs/blob/main/self-hosted.mdx Start the Manifest Docker container, connecting it to an existing PostgreSQL database. Ensure you replace placeholders with your actual credentials. ```bash docker run -d \ -p 2099:2099 \ -e DATABASE_URL=postgresql://user:pass@host:5432/manifest \ -e BETTER_AUTH_SECRET=$(openssl rand -hex 32) \ -e BETTER_AUTH_URL=http://localhost:2099 \ manifestdotbuild/manifest ``` -------------------------------- ### Restore Manifest Database Source: https://github.com/mnfst/docs/blob/main/self-hosted.mdx Restore the Manifest database from a SQL backup file. This involves starting the postgres service, piping the backup file into the psql command, and then starting the rest of the stack. ```bash docker compose up -d postgres cat manifest-backup.sql | docker compose exec -T postgres psql -U manifest manifest docker compose up -d ``` -------------------------------- ### Start Manifest Stack with Docker Compose Source: https://github.com/mnfst/docs/blob/main/self-hosted.mdx Launch the Manifest services in detached mode using Docker Compose after configuring the environment variables. ```bash docker compose up -d ``` -------------------------------- ### Run Manifest with BYO PostgreSQL (Windows CMD) Source: https://github.com/mnfst/docs/blob/main/self-hosted.mdx Start the Manifest Docker container on Windows using the Command Prompt, connecting to an external PostgreSQL database. You must provide your own generated secret. ```cmd docker run -d ^ -p 2099:2099 ^ -e DATABASE_URL=postgresql://user:pass@host:5432/manifest ^ -e BETTER_AUTH_SECRET= ^ -e BETTER_AUTH_URL=http://localhost:2099 ^ manifestdotbuild/manifest ``` -------------------------------- ### Run Manifest with BYO PostgreSQL (Windows PowerShell) Source: https://github.com/mnfst/docs/blob/main/self-hosted.mdx Start the Manifest Docker container on Windows using PowerShell, connecting to an external PostgreSQL database. A random secret is generated dynamically. ```powershell $secret = -join ((48..57 + 97..122) | Get-Random -Count 64 | ForEach-Object { [char]$_ }) docker run -d ` -p 2099:2099 ` -e DATABASE_URL=postgresql://user:pass@host:5432/manifest ` -e BETTER_AUTH_SECRET=$secret ` -e BETTER_AUTH_URL=http://localhost:2099 ` manifestdotbuild/manifest ``` -------------------------------- ### Example Error Message Source: https://github.com/mnfst/docs/blob/main/errors/M001.mdx This is the typical error message displayed when the M001 error occurs. It includes a link to the documentation for further details. ```text [🦚 Manifest M001] Missing the Authorization header. Set it to "Bearer mnfst_". See https://manifest.build/docs/errors/M001 ``` -------------------------------- ### Example Manifest Error Message Source: https://github.com/mnfst/docs/blob/main/errors.mdx This is how a Manifest error message typically appears in a response, including the error code and a link to more details. ```text [🦚 Manifest M100] No anthropic API key yet. Add one here: https://app.manifest.build/... See https://manifest.build/docs/errors/M100 ``` -------------------------------- ### Manifest M003 Error Message Source: https://github.com/mnfst/docs/blob/main/errors/M003.mdx This is the error message displayed when the Manifest key format is invalid. It indicates that the key should start with 'mnfst_' and provides a link to the documentation for more details. ```text [🦚 Manifest M003] That doesn't look right. Manifest keys start with "mnfst_". Grab yours from the dashboard. See https://manifest.build/docs/errors/M003 ``` -------------------------------- ### HTTP Authentication Header Source: https://github.com/mnfst/docs/blob/main/reference/api.mdx All requests to the Manifest API require a Manifest agent key in the Authorization header. Generate keys from the dashboard's Agents page; they always start with 'mnfst_'. ```http Authorization: Bearer mnfst_YOUR_KEY_HERE ``` -------------------------------- ### Download Docker Compose and Environment File Source: https://github.com/mnfst/docs/blob/main/self-hosted.mdx Manually download the Docker Compose configuration and environment variable template file for self-hosting Manifest. ```bash curl -O https://raw.githubusercontent.com/mnfst/manifest/main/docker/docker-compose.yml curl -O https://raw.githubusercontent.com/mnfst/manifest/main/docker/.env.example cp .env.example .env ``` -------------------------------- ### Backup Manifest Database Source: https://github.com/mnfst/docs/blob/main/self-hosted.mdx Create a SQL backup of the Manifest database while the stack is running. This command connects to the postgres service and dumps the 'manifest' database. ```bash docker compose exec -T postgres pg_dump -U manifest manifest > manifest-backup-$(date +%F).sql ``` -------------------------------- ### Verify Manifest API Connection Source: https://github.com/mnfst/docs/blob/main/self-hosted.mdx Send a test request to the Manifest API to verify your connection and API key. Ensure you replace the placeholder key with your actual Manifest API key. ```bash curl -X POST http://localhost:2099/v1/chat/completions \ -H "Authorization: Bearer mnfst_YOUR_KEY_HERE" \ -H "Content-Type: application/json" \ -d '{"model": "manifest/auto", "messages": [{"role": "user", "content": "Hello"}]}' ``` -------------------------------- ### Verify Image Signature with Cosign Source: https://github.com/mnfst/docs/blob/main/self-hosted.mdx Verify the signature of a published Manifest image before pulling it. This uses cosign keyless signing and requires specifying the image and certificate details. ```bash cosign verify manifestdotbuild/manifest: \ --certificate-identity-regexp="^https://github.com/mnfst/manifest/" \ --certificate-oidc-issuer="https://token.actions.githubusercontent.com" ``` -------------------------------- ### Check for Broken Links Source: https://github.com/mnfst/docs/blob/main/AGENTS.md Scans your documentation project for any broken internal or external links. Run this command to ensure link integrity. ```bash mint broken-links ``` -------------------------------- ### Restart Dev Server Source: https://github.com/mnfst/docs/blob/main/CLAUDE.md Reload the dev server on the default port (48721) after modifying doc files. Run this command in the background. ```bash lsof -ti:48721 | xargs kill -9 2>/dev/null; npx --yes mintlify dev --port 48721 ``` -------------------------------- ### Generate Authentication Secret Source: https://github.com/mnfst/docs/blob/main/self-hosted.mdx Generate a secure, random secret for authentication by running this command. This secret is used in the `.env` file for security. ```bash openssl rand -hex 32 ``` -------------------------------- ### Chat Completions Source: https://github.com/mnfst/docs/blob/main/reference/api.mdx Handles chat completion requests using the OpenAI format. This endpoint is compatible with most clients, including the OpenAI SDK, LangChain, Vercel AI SDK, and custom HTTP requests. ```APIDOC ## POST /v1/chat/completions ### Description Handles chat completion requests using the OpenAI format. This endpoint is compatible with most clients, including the OpenAI SDK, LangChain, Vercel AI SDK, and custom HTTP requests. ### Method POST ### Endpoint /v1/chat/completions ### Parameters #### Request Body - **model** (string) - Required - The model to use for the chat completion. Use `manifest/auto` for automatic routing. - **messages** (array) - Required - An array of message objects representing the conversation history. - **temperature** (number) - Optional - Controls randomness. Lower values make output more focused and deterministic. - **max_tokens** (integer) - Optional - The maximum number of tokens to generate in the completion. - **tools** (array) - Optional - A list of tools the model can use. - **tool_choice** (object) - Optional - Controls how the model selects a tool. - **response_format** (object) - Optional - Specifies the desired format for the response. - **stream** (boolean) - Optional - If true, streams the response as Server-Sent Events (SSE). ### Request Example ```json { "model": "manifest/auto", "messages": [ {"role": "user", "content": "What is the capital of France?"} ] } ``` ### Response #### Success Response (200) - **id** (string) - Unique identifier for the completion. - **choices** (array) - An array of completion choices. - **created** (integer) - Timestamp of when the completion was created. - **model** (string) - The actual model ID used for the completion. - **object** (string) - The type of object returned (e.g., `chat.completion`). - **usage** (object) - Information about token usage. #### Response Example ```json { "id": "chatcmpl-123", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "The capital of France is Paris." }, "logprobs": null, "finish_reason": "stop" } ], "created": 1677652288, "model": "gpt-3.5-turbo-0125", "object": "chat.completion", "usage": { "prompt_tokens": 10, "completion_tokens": 7, "total_tokens": 17 } } ``` ``` -------------------------------- ### OpenAI Chat Completions Request Source: https://github.com/mnfst/docs/blob/main/reference/api.mdx Send an OpenAI-shaped request to the /v1/chat/completions endpoint. The 'model' field should be 'manifest/auto', and Manifest will rewrite it to the actual model ID before forwarding. Standard OpenAI fields like temperature, max_tokens, and stream are supported. ```bash curl -X POST http://localhost:2099/v1/chat/completions \ -H "Authorization: Bearer mnfst_YOUR_KEY_HERE" \ -H "Content-Type: application/json" \ -d '{ "model": "manifest/auto", "messages": [ {"role": "user", "content": "What is the capital of France?"} ] }' ``` -------------------------------- ### Manage Manifest Data Volume Source: https://github.com/mnfst/docs/blob/main/self-hosted.mdx List or remove the named volume used for Manifest data persistence. Use 'docker compose down -v' with caution as it destroys all data. ```bash docker volume ls | grep pgdata ``` ```bash docker compose down -v # destroys all data ``` -------------------------------- ### OpenAI Responses Source: https://github.com/mnfst/docs/blob/main/reference/api.mdx Handles requests for OpenAI-compatible responses, specifically for models like Codex, `*-pro`, `o1-pro`, and deep-research models. ```APIDOC ## POST /v1/responses ### Description Handles requests for OpenAI-compatible responses, specifically for models like Codex, `*-pro`, `o1-pro`, and deep-research models. ### Method POST ### Endpoint /v1/responses ### Parameters #### Request Body - **model** (string) - Required - The model to use for generating the response. Use `manifest/auto` for automatic routing. - **messages** (array) - Required - An array of message objects representing the conversation history. - **max_tokens** (integer) - Optional - The maximum number of tokens to generate in the response. - **temperature** (number) - Optional - Controls randomness. Lower values make output more focused and deterministic. ### Request Example ```json { "model": "manifest/auto", "messages": [ {"role": "user", "content": "Write a short poem about the sea."} ], "max_tokens": 150 } ``` ### Response #### Success Response (200) - **id** (string) - Unique identifier for the response. - **choices** (array) - An array of response choices. - **created** (integer) - Timestamp of when the response was created. - **model** (string) - The actual model ID used for the response. - **object** (string) - The type of object returned (e.g., `text_completion`). - **usage** (object) - Information about token usage. #### Response Example ```json { "id": "resp-abcdef1234567890", "choices": [ { "index": 0, "text": "The ocean vast, a deep blue hue,\nWith waves that crash and skies so true.\nA salty breeze, a gentle sigh,\nAs seagulls circle in the sky.", "logprobs": null, "finish_reason": "length" } ], "created": 1677652288, "model": "codex-davinci-002", "object": "text_completion", "usage": { "prompt_tokens": 15, "completion_tokens": 30, "total_tokens": 45 } } ``` ``` -------------------------------- ### Redirect Telemetry Endpoint Source: https://github.com/mnfst/docs/blob/main/self-hosted.mdx Configure the TELEMETRY_ENDPOINT environment variable to point to a custom URL for receiving telemetry data. This allows for self-hosted fleet dashboards. ```env TELEMETRY_ENDPOINT=https://telemetry.mycompany.internal/v1/report ``` -------------------------------- ### Reading Custom Headers with Fetch Source: https://github.com/mnfst/docs/blob/main/reference/headers.mdx Use this snippet to make a POST request and extract custom 'x-manifest-*' headers from the response. Header names are case-insensitive but typically lowercased by fetch. ```javascript const response = await fetch("http://localhost:2099/v1/chat/completions", { method: "POST", headers: { Authorization: `Bearer ${process.env.MANIFEST_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ model: "manifest/auto", messages: [{ role: "user", content: "Hello" }], }), }); console.log(response.headers.get("x-manifest-tier")); // → "simple" console.log(response.headers.get("x-manifest-model")); // → "gpt-5-mini" console.log(response.headers.get("x-manifest-provider")); // → "openai" ``` -------------------------------- ### Configure Custom Port for Manifest Source: https://github.com/mnfst/docs/blob/main/self-hosted.mdx Change the default port (2099) for Manifest if it's already in use. Update both the Docker port mapping and the BETTER_AUTH_URL environment variable. ```bash docker run -d \ -p 8080:2099 \ -e BETTER_AUTH_URL=http://localhost:8080 \ ... ``` ```yaml ports: - '127.0.0.1:8080:2099' ``` ```dotenv BETTER_AUTH_URL=http://localhost:8080 ``` -------------------------------- ### M201 Error Message Source: https://github.com/mnfst/docs/blob/main/errors/M201.mdx This is the text output you might see when the M201 error occurs. It includes a brief message and a link to the documentation. ```text [🦚 Manifest M201] Too many requests — wait a few seconds and retry. See https://manifest.build/docs/errors/M201 ``` -------------------------------- ### Correct Chat Completions Request Body Source: https://github.com/mnfst/docs/blob/main/errors/M300.mdx This JSON demonstrates the correct structure for a chat completions API request body, including a valid 'messages' array with at least one entry. Ensure your request body conforms to this shape. ```json { "model": "auto", "messages": [ { "role": "user", "content": "Hello" } ] } ``` -------------------------------- ### Anthropic Messages Request Source: https://github.com/mnfst/docs/blob/main/reference/api.mdx Send an Anthropic-shaped request to the /v1/messages endpoint. Use 'manifest/auto' for the model, and specify parameters like max_tokens and messages. The 'anthropic-version' header is also required. ```bash curl -X POST http://localhost:2099/v1/messages \ -H "Authorization: Bearer mnfst_YOUR_KEY_HERE" \ -H "Content-Type: application/json" \ -H "anthropic-version: 2023-06-01" \ -d '{ "model": "manifest/auto", "max_tokens": 1024, "messages": [ {"role": "user", "content": "Hello"} ] }' ``` -------------------------------- ### Stop Docker Compose Services Source: https://github.com/mnfst/docs/blob/main/self-hosted.mdx Use these commands to stop the running Docker Compose services. The `-v` flag will also remove associated data volumes. ```bash docker compose down # Stop services (keeps data) ``` ```bash docker compose down -v # Stop and delete all data ``` -------------------------------- ### Manifest M002 Error Message Source: https://github.com/mnfst/docs/blob/main/errors/M002.mdx This is the error message displayed by Manifest when an empty Bearer token is detected. It indicates the problem and provides a link to further documentation. ```text [🦚 Manifest M002] The Bearer token is empty. Paste your Manifest key into it. See https://manifest.build/docs/errors/M002 ``` -------------------------------- ### Disable Telemetry Source: https://github.com/mnfst/docs/blob/main/self-hosted.mdx Set the MANIFEST_TELEMETRY_DISABLED environment variable to 1 to disable telemetry. This check occurs before any other telemetry actions. ```env MANIFEST_TELEMETRY_DISABLED=1 ``` -------------------------------- ### Error Response Format Source: https://github.com/mnfst/docs/blob/main/reference/api.mdx The Manifest proxy returns errors in a standard JSON envelope. This includes a message, type, and status code. Common codes include 401, 402, 424, and 429. ```json { "error": { "message": "Limit exceeded: cost usage ($1.23) exceeds $1.00 per day", "type": "limit_exceeded", "code": 429 } } ``` -------------------------------- ### Hard Limit Trigger Message Source: https://github.com/mnfst/docs/blob/main/set-limits.mdx When a hard limit is triggered, the proxy returns a 429 error with this message indicating the exceeded cost. ```text Limit exceeded: cost usage ($X) exceeds $Y per day ``` -------------------------------- ### Anthropic Messages Source: https://github.com/mnfst/docs/blob/main/reference/api.mdx Handles requests using the Anthropic Messages API format. This endpoint is compatible with the Anthropic SDK and other clients that speak the Messages API. ```APIDOC ## POST /v1/messages ### Description Handles requests using the Anthropic Messages API format. This endpoint is compatible with the Anthropic SDK and other clients that speak the Messages API. ### Method POST ### Endpoint /v1/messages ### Parameters #### Request Body - **model** (string) - Required - The model to use for the messages. Use `manifest/auto` for automatic routing. - **max_tokens** (integer) - Required - The maximum number of tokens to generate. - **messages** (array) - Required - An array of message objects representing the conversation. - **anthropic_version** (string) - Required - The Anthropic API version to use (e.g., `2023-06-01`). ### Request Example ```json { "model": "manifest/auto", "max_tokens": 1024, "messages": [ {"role": "user", "content": "Hello"} ] } ``` ### Response #### Success Response (200) - **id** (string) - Unique identifier for the message response. - **type** (string) - The type of object returned (e.g., `message`). - **role** (string) - The role of the sender (e.g., `assistant`). - **content** (array) - The content of the message. - **model** (string) - The actual model ID used for the response. - **stop_reason** (string) - The reason the model stopped generating tokens. - **usage** (object) - Information about token usage. #### Response Example ```json { "id": "msg_0123456789abcdef0123456789abcdef", "type": "message", "role": "assistant", "content": [ { "type": "text", "text": "Hello there! How can I help you today?" } ], "model": "claude-3-opus-20240229", "stop_reason": "end_turn", "usage": { "input_tokens": 10, "output_tokens": 20 } } ``` ``` -------------------------------- ### M300 Error Message Source: https://github.com/mnfst/docs/blob/main/errors/M300.mdx This is the error message displayed when the M300 error occurs. It indicates that the 'messages' array is required. ```text [🦚 Manifest M300] `messages` array is required. See https://manifest.build/docs/errors/M300 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.