{
  "name": "AI Image Generator API",
  "version": "1.0.0",
  "description": "Generate high-quality images using AI with FLUX and SDXL models. Supports various styles and resolutions.",
  "creator": "https://t.me/Ashlynn_Repository",
  "endpoints": {
    "/": {
      "method": "GET",
      "description": "API documentation",
      "response": "This documentation"
    },
    "/styles": {
      "method": "GET",
      "description": "Get available style templates",
      "response": "List of available styles"
    },
    "/generate": {
      "method": [
        "GET",
        "POST"
      ],
      "description": "Generate an image using AI",
      "required_parameters": {
        "prompt": "string - Text description of the image to generate"
      },
      "optional_parameters": {
        "version": "string - AI model version: 'flux' (default) or 'sdxl'",
        "size": "string - Image resolution (default: '1024x1024')",
        "style": "string - Predefined style template key",
        "customStyle": "string - Custom style description",
        "negativePrompt": "string - Things to avoid in the image"
      },
      "valid_sizes": [
        "1024x1024",
        "1280x720",
        "720x1280",
        "1280x960",
        "960x1280",
        "1920x1080",
        "1080x1920"
      ],
      "example_request": {
        "GET": "/generate?prompt=a beautiful landscape&version=flux&size=1024x1024",
        "POST": {
          "prompt": "a majestic mountain landscape at sunset",
          "version": "flux",
          "size": "1920x1080",
          "style": "cinematic",
          "negativePrompt": "blurry, low quality"
        }
      },
      "response": {
        "success": "Binary image data (PNG/JPEG)",
        "error": {
          "status": "error",
          "type": "VALIDATION_FAILED",
          "message": "Invalid input",
          "details": []
        }
      }
    }
  },
  "models": {
    "flux": {
      "description": "High-quality, fast generation model (default)",
      "recommended_for": "Most use cases, balanced quality and speed"
    },
    "sdxl": {
      "description": "Stable Diffusion XL model",
      "recommended_for": "Alternative style and composition"
    }
  },
  "usage_tips": [
    "Be descriptive and specific in your prompts",
    "Use negative prompts to avoid unwanted elements",
    "Choose appropriate resolution for your use case",
    "Experiment with different styles for varied results",
    "FLUX model is recommended for most use cases"
  ],
  "notes": [
    "Image is returned as binary data (PNG or JPEG)",
    "Processing time varies based on complexity and resolution",
    "Higher resolutions take longer to generate",
    "Use /styles endpoint to see available style options"
  ]
}