{
  "version": "v1",
  "base_url": "/api/public/v1",
  "auth": {
    "type": "api_key",
    "header": "Authorization: Bearer ccai_live_...",
    "alt_header": "x-api-key: ccai_live_...",
    "signup": "/developers"
  },
  "endpoints": [
    {
      "method": "GET",
      "path": "/breeds",
      "description": "List chicken breeds. Query: q, purpose, beginner, limit."
    },
    {
      "method": "GET",
      "path": "/breeds/{slug}",
      "description": "Get one breed profile."
    },
    {
      "method": "POST",
      "path": "/breed-identify",
      "description": "Identify breed from a photo. Body: imageBase64, mimeType."
    },
    {
      "method": "POST",
      "path": "/hen-or-rooster",
      "description": "Determine sex from a photo. Body: imageBase64, mimeType."
    },
    {
      "method": "POST",
      "path": "/chicken-doctor",
      "description": "Symptom-based diagnostic triage. Body: symptoms[], notes, breed, age_weeks, sex, environment."
    },
    {
      "method": "POST",
      "path": "/diagnosis/{id}/outcome",
      "description": "Report the follow-up outcome for an earlier diagnosis."
    },
    {
      "method": "GET",
      "path": "/coop-plans",
      "description": "List published coop plans."
    },
    {
      "method": "GET",
      "path": "/listings",
      "description": "Marketplace + affiliate listings. Query: source=shop|affiliate, limit."
    }
  ],
  "rate_limits": {
    "free": {
      "monthly": 100,
      "per_minute": 30
    },
    "starter": {
      "monthly": 2000,
      "per_minute": 60
    },
    "builder": {
      "monthly": 10000,
      "per_minute": 120
    },
    "pro": {
      "monthly": 50000,
      "per_minute": 240
    },
    "enterprise": {
      "monthly": null,
      "per_minute": 600
    }
  },
  "errors": {
    "format": "{ \"error\": { \"code\": \"...\", \"message\": \"...\", \"request_id\": \"...\" } }",
    "codes": [
      "missing_api_key",
      "invalid_api_key",
      "key_revoked",
      "key_expired",
      "account_suspended",
      "quota_exceeded",
      "rate_limited",
      "invalid_input",
      "ai_unavailable",
      "ai_error",
      "db_error",
      "internal_error"
    ]
  }
}