# colormind API > Generate AI-powered personalized food selection plans programmatically. ## Overview The colormind API allows developers to integrate AI-powered food selection generation into their applications. Send user biometric data and health objectives, receive a complete personalized food selection plan with optimized food quantities in grams, precision nutritional targets, and detailed algorithmic rationales. ## Base URL `https://us-central1-colormind-57ad1.cloudfunctions.net/colormindApi` ## Authentication All requests require an API key sent via the `X-API-Key` header. Keys use the format: `cm_live_xxxxxxxxxxxx` (production) or `cm_test_xxxxxxxxxxxx` (sandbox). To request an API key, contact: api@colormind.app ## Rate Limits - **10 requests/day** per API key (resets at midnight UTC) - Response header `X-RateLimit-Remaining` indicates remaining quota ## Endpoints ### POST /api/v1/diet — Create Food Selection Plan ### GET /api/v1/diet/{id}/status — Check Status ### GET /api/v1/diet/{id} — Get Result ### GET /api/v1/health — Health Check ## Required Fields (Only 6) | Field | Type | Description | |-------|------|-------------| | sex | string | "male" or "female" | | weight | number | Weight in kg (20-400) | | height | number | Height in cm (80-260) | | dateOfBirth | string | DD/MM/YYYY format | | activityLevel | string | "1" (sedentary) to "5" (athlete) | | country | string | ISO 3166-1 alpha-2 (e.g., "BR", "US") | ## Optional Fields | Field | Type | Default | Description | |-------|------|---------|-------------| | prompt | string | "general health" | Natural language goal (any language) | | language | string | auto from country | Response language (e.g., "pt-BR") | | bodyFatLevel | string | "average" | lean, athletic, average, overweight | | allergies | string[] | [] | Foods to exclude | | dietaryRestrictions | string[] | [] | e.g., "vegan", "kosher" | | healthConditions | string[] | [] | e.g., "diabetes" | | currentMedications | string[] | [] | Safety cross-reference | | targetCalories | number | auto TDEE | Override calorie target (500-10000) | | targetMacros | object | auto | {proteinGrams, carbsGrams, fatGrams} | | mealSchedule | string | null | e.g., "5 meals per day" | | budgetFriendly | boolean | false | Prefer cheaper foods | | city | string | null | For food availability | | state | string | null | For regional foods | ## Contact - API Support: api@colormind.app - Website: https://colormind.app - Documentation: https://colormind.app/api-docs