AI Agent Access

AI Agent Access

Meals Matter provides a REST API for meal planning. AI agents like ChatGPT can help users manage their meals, create meal plans, and more.

Recommended

Automatic Discovery with ChatGPT

Works with FREE ChatGPT! Users can simply tell ChatGPT to visit Meals Matter. Your API is automatically discovered via the llms.txt standard.

How it works:

  1. User tells ChatGPT: "Go to meals-matter.com and help me plan meals"
  2. ChatGPT reads our API documentation automatically
  3. ChatGPT prompts user for their API key (one-time setup)
  4. User enters API key and starts planning meals!

Why This is Great

  • Works with FREE ChatGPT - no paid subscription needed
  • No setup required - just tell ChatGPT to visit your site
  • Works with any ChatGPT conversation
  • Automatic discovery of API capabilities
  • Keys stored securely in headers, never exposed in URLs
  • Standard-based - uses industry-recognized llms.txt format
Advanced

Custom GPT (Plus/Pro Only)

Create a dedicated Custom GPT for advanced users. Requires ChatGPT Plus or Pro plan ($20+/month). You control the experience and can update it anytime.

Note: Creating Custom GPTs requires a paid ChatGPT account (Go, Plus, or Pro). Free accounts cannot create or share Custom GPTs.

Setup Instructions:

  1. Download our OpenAPI Schema
  2. Go to chatgpt.com/gpts and create a new GPT (requires Plus/Pro)
  3. In GPT builder, click "Actions" and paste the OpenAPI schema
  4. Set authentication type to "API Key" with:
    • Authentication Type: API Key
    • Auth Header Name: Authorization
    • Auth Header Prefix: Bearer
  5. Add instructions for the GPT (see examples below)
  6. Share the GPT with users - they'll enter their API key once

Benefits

  • You control the GPT - update instructions and schema anytime
  • Consistent experience for all users of your GPT
  • Users don't need to create anything
  • Persistent - users can come back to the same GPT
  • Can add custom instructions and branding

Recommended GPT Instructions

Add these instructions to your Custom GPT to guide user interactions:

            You are a meal planning assistant for Meals Matter. When users ask for meal planning help:

1. Always use their API key for authentication (they'll provide it once)
2. Ask if they want to create a new meal plan or work with existing meals
3. For meal plans, default to the current week if no dates are specified
4. Suggest rerolling meals if they want different options
5. Users can bulk import meals (up to 50 at once) to build their library
6. Always confirm before making changes to their meal plans
7. Be friendly and helpful - meal planning should be fun!
8. When they provide their API key, store it securely for this session

API capabilities:
- Create, list, update, and delete meals
- Generate meal plans for date ranges
- View planned meals with details
- Change meals in plans (update_dinner)
- Reroll meals to get different options (reroll)

Users can get API keys at: https://meals-matter.com/user
          

API Authentication

All API requests require authentication using a Bearer token. Users generate API keys in their account settings.

Where to get API keys

Users generate secret keys in their account settings under "My Account" > "Secret Keys"

How to authenticate

Include the API key in the Authorization header:

              Authorization: Bearer YOUR_SECRET_KEY
            

Example Request

              curl -X GET https://meals-matter.com/api/v1/meals \ -H
                "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Accept:
                application/json"
            

API Endpoints

List Meals

GET /api/v1/meals

Retrieve all meals for the authenticated user.

Create Meal

POST /api/v1/meals

Create a new meal. Request body:

                { "meal": { "title": "Spaghetti Bolognese" } }
              

Update Meal

PATCH /api/v1/meals/:id

Update an existing meal. Request body:

                { "meal": { "title": "Spaghetti Bolognese" } }
              

Delete Meal

DELETE /api/v1/meals/:id

Delete a specific meal.

Bulk Create Meals

POST /api/v1/meals/bulk_create

Create multiple meals at once (maximum 50). Request body:

                { "bulk_meal": { "titles": ["Pasta", "Salad", "Soup"] } }
              

List Meal Plans

GET /api/v1/meal_plans

Retrieve all meal plans for the authenticated user, ordered by creation date.

Create Meal Plan

POST /api/v1/meal_plans

Generate a meal plan. Request body:

                { "start_date": "2026-02-17" }
              

Get Meal Plan

GET /api/v1/meal_plans/:id

Retrieve a specific meal plan with all planned meals.

Delete Meal Plan

DELETE /api/v1/meal_plans/:id

Delete a specific meal plan and all its planned meals.

Update Planned Meal

PATCH /api/v1/planned_meals/:id/update_dinner

Change the meal for a specific planned meal. Request body:

                { "meal_id": 123 }
              

Reroll Planned Meal

PATCH /api/v1/planned_meals/:id/reroll

Automatically pick a different meal for this planned meal.

Questions? Check our OpenAPI schema or AI discovery file.
Recommended: Tell users to ask ChatGPT to visit meals-matter.com - it works with free ChatGPT!