### Quick Install Manifest Source: https://manifest.build/docs/self-hosted Use this command for a fast, recommended installation. It downloads the compose file, generates a secret, and starts the stack. ```bash bash <(curl -sSL https://raw.githubusercontent.com/mnfst/manifest/main/docker/install.sh) ``` -------------------------------- ### Review and Install Manifest Script Source: https://manifest.build/docs/self-hosted Download the install script to review it before execution. Useful for understanding the installation process or making modifications. ```bash curl -sSLO https://raw.githubusercontent.com/mnfst/manifest/main/docker/install.sh less install.sh bash install.sh ``` -------------------------------- ### Start LM Studio Server Source: https://manifest.build/docs/providers/local-models Command to start the LM Studio local LLM server. Alternatively, the server can be started from the LM Studio application's Developer tab. ```bash lms server start ``` -------------------------------- ### Start llama.cpp Server with Model Source: https://manifest.build/docs/providers/local-models Starts the llama.cpp server, requiring a path to a GGUF model file and an optional port specification. ```bash llama-server -m .gguf --port 8080 ``` -------------------------------- ### Manifest Error M003 Example Source: https://manifest.build/docs/errors/M003 This is an example of the error message displayed when the Manifest key format is invalid. It indicates that keys should start with 'mnfst_'. ```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 ``` -------------------------------- ### Download Docker Compose and Environment Files Source: https://manifest.build/docs/self-hosted Obtain the necessary Docker Compose configuration and environment template files for manual setup. ```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 ``` -------------------------------- ### Start llama.cpp Server on Local Network Source: https://manifest.build/docs/providers/local-models Starts the llama.cpp server, explicitly binding to all network interfaces. This is required for Manifest running in Docker to connect. ```bash llama-server -m .gguf --host 0.0.0.0 --port 8080 ``` -------------------------------- ### Start LM Studio Server on Local Network Source: https://manifest.build/docs/providers/local-models Starts the LM Studio server, binding to all network interfaces and enabling CORS. This is necessary for Manifest running in Docker to connect. ```bash lms server start --bind 0.0.0.0 --port 1234 --cors ``` -------------------------------- ### Upgrade Manifest Installation Source: https://manifest.build/docs/self-hosted Upgrade an existing self-hosted Manifest installation to the latest version by pulling the new image and restarting the services. ```bash docker compose pull docker compose up -d ``` -------------------------------- ### Run Manifest with BYO PostgreSQL (CMD) Source: https://manifest.build/docs/self-hosted Start Manifest using Docker on Windows with the Command Prompt. Requires manual generation of a 64-character 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 (PowerShell) Source: https://manifest.build/docs/self-hosted Start Manifest using Docker on Windows with PowerShell. Generates a random secret for BETTER_AUTH_SECRET. ```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 ``` -------------------------------- ### Pull and Serve Ollama Model Source: https://manifest.build/docs/providers/local-models Use this command to download a specific model with Ollama and then start the Ollama server. ```bash ollama pull llama3.1:8b # then: ollama serve ``` -------------------------------- ### Start Docker Compose Stack Source: https://manifest.build/docs/self-hosted Launch the Manifest services defined in the docker-compose.yml file in detached mode. ```bash docker compose up -d ``` -------------------------------- ### Example M200 Error Message Source: https://manifest.build/docs/errors/M200 This is an example of the text output when the M200 error is triggered, showing the specific limit that was exceeded and a link to adjust it. ```text [🦚 Manifest M200] You hit your cost limit: $12.50 used, $10.00/day allowed. Adjust it here: https://app.manifest.build/... See https://manifest.build/docs/errors/M200 ``` -------------------------------- ### Run Manifest with BYO PostgreSQL Source: https://manifest.build/docs/self-hosted Start Manifest in a Docker container, connecting to an existing PostgreSQL instance. Ensure BETTER_AUTH_SECRET is a strong, random string. ```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 ``` -------------------------------- ### Manifest Error M002 Example Source: https://manifest.build/docs/errors/M002 This is an example of the error message displayed when the Bearer token is empty. It indicates that the Manifest key needs to be pasted into the token. ```text [🦚 Manifest M002] The Bearer token is empty. Paste your Manifest key into it. See https://manifest.build/docs/errors/M002 ``` -------------------------------- ### Manifest Error M301 Example Source: https://manifest.build/docs/errors/M301 This is an example of the error message displayed when the 'messages' array exceeds the maximum length of 1000. ```text [🦚 Manifest M301] `messages` array exceeds maximum length of 1000. See https://manifest.build/docs/errors/M301 ``` -------------------------------- ### Example M100 Error Message Source: https://manifest.build/docs/errors/M100 This is an example of the error message displayed when the M100 error occurs. The provider name will vary based on the selected provider. ```text [🦚 Manifest M100] No anthropic API key yet. Add one here: https://app.manifest.build/... See https://manifest.build/docs/errors/M100 ``` -------------------------------- ### M203 Error Message Example Source: https://manifest.build/docs/errors/M203 This is an example of the error message displayed when the concurrency limit is exceeded. It indicates too many concurrent requests and provides a link for more information. ```text [🦚 Manifest M203] Too many concurrent requests. Give it a moment. See https://manifest.build/docs/errors/M203 ``` -------------------------------- ### Example Error Message for M001 Source: https://manifest.build/docs/errors/M001 This is the error message displayed when the Authorization header is missing. It indicates the problem and provides a link to relevant documentation. ```text [🦚 Manifest M001] Missing the Authorization header. Set it to "Bearer mnfst_". See https://manifest.build/docs/errors/M001 ``` -------------------------------- ### Restore Manifest Database Source: https://manifest.build/docs/self-hosted Restore the Manifest database from a SQL backup file. This involves starting the postgres service, piping the backup file into psql, and then restarting the full stack. ```bash docker compose up -d postgres cat manifest-backup.sql | docker compose exec -T postgres psql -U manifest manifest docker compose up -d ``` -------------------------------- ### POST Request to OpenAI Chat Completions Endpoint Source: https://manifest.build/docs/reference/api This example demonstrates how to send a POST request to the `/v1/chat/completions` endpoint using cURL. The request includes the 'manifest/auto' model and a user message. The body is forwarded verbatim to the provider. ```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?"} ] }' ``` -------------------------------- ### Manifest Error M202 Example Source: https://manifest.build/docs/errors/M202 This snippet shows the typical text output when the Manifest M202 error is encountered, indicating a per-IP rate limit has been exceeded. ```text [🦚 Manifest M202] Too many requests from this IP — wait a few seconds and retry. See https://manifest.build/docs/errors/M202 ``` -------------------------------- ### Manifest M004 Error Message Source: https://manifest.build/docs/errors/M004 This is an example of the error message displayed when an API key has expired. It provides a link to generate a new key. ```text [🦚 Manifest M004] This key has expired. Generate a new one here See https://manifest.build/docs/errors/M004 ``` -------------------------------- ### Correct Chat Completions Request Body Source: https://manifest.build/docs/errors/M300 Example of a correctly formatted request body for the chat completions API, including the required 'messages' array. ```json { "model": "auto", "messages": [ { "role": "user", "content": "Hello" } ] } ``` -------------------------------- ### POST Request to Anthropic Messages Endpoint Source: https://manifest.build/docs/reference/api This example shows how to send a POST request to the `/v1/messages` endpoint using cURL for Anthropic compatibility. It includes the 'manifest/auto' model, max tokens, and a user message. 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"} ] }' ``` -------------------------------- ### Manifest M201 Error Message Source: https://manifest.build/docs/errors/M201 This is an example of the error message displayed when the per-user rate limit is exceeded. SDKs that respect the 'retry-after' header will automatically back off. ```text [🦚 Manifest M201] Too many requests — wait a few seconds and retry. See https://manifest.build/docs/errors/M201 ``` -------------------------------- ### Manifest M005 Error Message Source: https://manifest.build/docs/errors/M005 This is an example of the error message displayed by Manifest when error M005 occurs. It indicates an unrecognized key and suggests obtaining the current key from the dashboard. ```text [🦚 Manifest M005] I don't recognize this key. It might have been rotated or deleted. Grab the current one from the dashboard. See https://manifest.build/docs/errors/M005 ``` -------------------------------- ### HTTP Authentication Header Source: https://manifest.build/docs/reference/api Every request to the Manifest API requires an 'Authorization' header with a Bearer token. Generate your key from the dashboard's Agents page; keys start with 'mnfst_'. ```http Authorization: Bearer mnfst_YOUR_KEY_HERE ``` -------------------------------- ### Backup Manifest Database Source: https://manifest.build/docs/self-hosted Create a SQL backup of the Manifest database using pg_dump. This command should be run from the host machine while the stack is running. ```bash docker compose exec -T postgres pg_dump -U manifest manifest > manifest-backup-$(date +%F).sql ``` -------------------------------- ### Verify Manifest API Key Source: https://manifest.build/docs/self-hosted Send a test request to the Manifest API to verify your connection and API key. Ensure you replace the placeholder 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"}]}' ``` -------------------------------- ### POST /v1/chat/completions Source: https://manifest.build/docs/reference/api Handles chat completions using the OpenAI format. This endpoint is compatible with most clients, including the OpenAI SDK, LangChain, and Vercel AI SDK. ```APIDOC ## POST /v1/chat/completions ### Description This endpoint allows you to send chat messages and receive completions in the OpenAI format. It supports various OpenAI-specific fields for customization. ### Method POST ### Endpoint /v1/chat/completions ### Parameters #### Query Parameters None #### Request Body - **model** (string) - Required - The model to use for generation. 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 response. - **tools** (array) - Optional - A list of tools the model may call. - **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, returns a streaming response. ### 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. - **object** (string) - Type of object returned, e.g., `chat.completion`. - **created** (integer) - Unix timestamp of when the completion was created. - **model** (string) - The actual model ID used for generation. - **choices** (array) - A list of completion choices. - **usage** (object) - Information about token usage. #### Response Example ```json { "id": "chatcmpl-123", "object": "chat.completion", "created": 1677652288, "model": "gpt-3.5-turbo", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "The capital of France is Paris." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 10, "completion_tokens": 7, "total_tokens": 17 } } ``` ``` -------------------------------- ### Verify Image Signature with Cosign Source: https://manifest.build/docs/self-hosted Verify the signature of a published Manifest image using cosign keyless signing before pulling. This ensures the image integrity and origin. ```bash cosign verify manifestdotbuild/manifest: \ --certificate-identity-regexp="^https://github.com/mnfst/manifest/" \ --certificate-oidc-issuer="https://token.actions.githubusercontent.com" ``` -------------------------------- ### Manage Manifest Data Volume Source: https://manifest.build/docs/self-hosted List or remove the 'pgdata' named volume used for Manifest persistence. Use 'docker compose down -v' with caution as it destroys all data. ```bash docker volume ls | grep pgdata docker compose down -v # destroys all data ``` -------------------------------- ### Chat Completions Endpoint Source: https://manifest.build/docs/llms.txt The Manifest proxy speaks both OpenAI and Anthropic APIs. This endpoint is used for chat completions. ```APIDOC ## POST /v1/chat/completions ### Description Sends a request to the chat completions endpoint. This endpoint is compatible with both OpenAI and Anthropic API specifications. ### Method POST ### Endpoint /v1/chat/completions ### Parameters #### Request Body - **messages** (array) - Required - An array of message objects representing the conversation history. Must not be empty. ### Request Example { "messages": [ {"role": "user", "content": "Hello!"} ] } ### Response #### Success Response (200) - **content** (string) - The response from the language model. #### Response Example { "content": "Hello! How can I help you today?" } ### Error Handling - **M300**: Missing messages array. - **M301**: Messages array too long (more than 1000 messages). - **M001**: Missing Authorization header. - **M002**: Empty Bearer token. - **M003**: Invalid key format. - **M004**: Key expired. - **M005**: Key not recognized. - **M100**: Provider API key missing. - **M101**: No providers configured. - **M200**: Usage limit exceeded. - **M201**: Per-user rate limit exceeded. - **M202**: Per-IP rate limit exceeded. - **M203**: Concurrency limit exceeded. - **M500**: Internal server error. ``` -------------------------------- ### POST /v1/responses Source: https://manifest.build/docs/reference/api Handles responses for specific models like Codex and deep-research models, using an OpenAI-compatible format. ```APIDOC ## POST /v1/responses ### Description This endpoint is designed for specific models such as Codex and deep-research models, providing responses in an OpenAI-compatible format. ### Method POST ### Endpoint /v1/responses ### Parameters #### Query Parameters None #### Request Body - **model** (string) - Required - The model to use for generation. 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 response. ### Request Example ```json { "model": "manifest/auto", "messages": [ {"role": "user", "content": "Explain the concept of recursion."} ] } ``` ### Response #### Success Response (200) - **id** (string) - Unique identifier for the response. - **object** (string) - Type of object returned, e.g., `text_completion`. - **created** (integer) - Unix timestamp of when the response was created. - **model** (string) - The actual model ID used for generation. - **choices** (array) - A list of response choices. - **usage** (object) - Information about token usage. #### Response Example ```json { "id": "resp-abc", "object": "text_completion", "created": 1677652289, "model": "codex-davinci", "choices": [ { "index": 0, "text": "Recursion is a method where the solution to a problem depends on smaller instances of the same problem.", "finish_reason": "stop" } ], "usage": { "prompt_tokens": 15, "completion_tokens": 20, "total_tokens": 35 } } ``` ``` -------------------------------- ### Reading Response Headers with Fetch Source: https://manifest.build/docs/reference/headers This snippet shows how to make a POST request and then retrieve specific headers from the response. Header names are case-insensitive, but fetch often lowercases them. ```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" ``` -------------------------------- ### Generate Secret for .env File Source: https://manifest.build/docs/self-hosted Generate a secure random string to use as your BETTER_AUTH_SECRET in the .env file. ```bash openssl rand -hex 32 ``` -------------------------------- ### Configure Custom Port for Manifest Source: https://manifest.build/docs/self-hosted Change the default port binding for Manifest if port 2099 is 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 ``` -------------------------------- ### Redirect Telemetry Endpoint Source: https://manifest.build/docs/self-hosted Configure the TELEMETRY_ENDPOINT environment variable to point to a custom URL for receiving telemetry data. This allows for self-hosted dashboarding. ```env TELEMETRY_ENDPOINT=https://telemetry.mycompany.internal/v1/report ``` -------------------------------- ### Stop Docker Compose Services Source: https://manifest.build/docs/self-hosted Use `docker compose down` to stop services while preserving data. Use `docker compose down -v` to stop services and delete all associated data. ```bash docker compose down # Stop services (keeps data) docker compose down -v # Stop and delete all data ``` -------------------------------- ### Manifest M500 Error Message Source: https://manifest.build/docs/errors/M500 This is the text output displayed to the user when a Manifest M500 error occurs. It indicates a problem on Manifest's end and suggests retrying. ```text [🦚 Manifest M500] Something broke on our end. Try again in a moment. See https://manifest.build/docs/errors/M500 ``` -------------------------------- ### POST /v1/messages Source: https://manifest.build/docs/reference/api Handles chat messages using the Anthropic format. This endpoint is compatible with the Anthropic SDK and other tools that use the Messages API. ```APIDOC ## POST /v1/messages ### Description This endpoint allows you to interact with models using the Anthropic Messages API format. It's suitable for the Anthropic SDK and similar clients. ### Method POST ### Endpoint /v1/messages ### Parameters #### Path Parameters None #### Query Parameters None #### Headers - **anthropic-version** (string) - Required - The version of the Anthropic API to use, e.g., `2023-06-01`. #### Request Body - **model** (string) - Required - The model to use for generation. Use `manifest/auto` for automatic routing. - **max_tokens** (integer) - Required - The maximum number of tokens to generate in the response. - **messages** (array) - Required - An array of message objects representing the conversation history. ### Request Example ```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"} ] }' ``` ### Response #### Success Response (200) - **id** (string) - Unique identifier for the message. - **type** (string) - Type of the response, 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 generation. - **stop_reason** (string) - The reason the model stopped generating tokens. - **usage** (object) - Information about token usage. #### Response Example ```json { "id": "msg_abc123", "type": "message", "role": "assistant", "content": [ { "type": "text", "text": "Hi there! How can I help you today?" } ], "model": "claude-3-opus-20240229", "stop_reason": "end_turn", "usage": { "input_tokens": 10, "output_tokens": 18 } } ``` ``` -------------------------------- ### Manifest M300 Error Message Source: https://manifest.build/docs/errors/M300 This is the error message displayed by Manifest when the 'messages' array is missing or invalid. ```text [🦚 Manifest M300] `messages` array is required. See https://manifest.build/docs/errors/M300 ``` -------------------------------- ### Disable Telemetry Source: https://manifest.build/docs/self-hosted Set the MANIFEST_TELEMETRY_DISABLED environment variable to 1 to turn off telemetry reporting. This prevents any telemetry data from being sent. ```env MANIFEST_TELEMETRY_DISABLED=1 ``` -------------------------------- ### JSON Error Response Format Source: https://manifest.build/docs/reference/api The Manifest proxy returns a standard JSON error envelope when an issue occurs. This format includes a message, type, and code for the error. Common status 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 Exceeded Message Source: https://manifest.build/docs/set-limits This message is returned when a Hard Limit rule triggers, indicating that the cost usage has exceeded the defined threshold for the current period. ```text Limit exceeded: cost usage ($X) exceeds $Y per day ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.