# KenerateAI Developer API Documentation ## Base URL `https://api.kenerateai.com/api/v1` ## Authentication All API requests require authentication using a Bearer token. Header: `Authorization: Bearer ken_your_api_key_here` ## Webhooks All endpoints support an optional `webhook_url` parameter. If provided, the API will immediately return a `200 OK` with a `taskId` and `status: "queued"`. Once processing is finished, a POST request will be made to your `webhook_url` with the result. **Webhook Payload Format:** ```json { "taskId": "task_12345", "status": "completed", // or "failed" "model": "kenerate-image", "outputs": ["https://storage.kenerateai.com/..."], // URLs to the generated images "error": "Error message if failed", "completedAt": "2026-06-01T00:00:00Z" } ``` *Note: Your webhook endpoint should respond with a `200 OK` status.* --- ## Models & Endpoints ### 1. Kenerate Image (Base Model) **Endpoint:** `POST /kenerate-image` **Description:** High-quality text-to-image generation and image-to-image editing using our proprietary architecture. **Cost:** $0.05 (5 cents) per generation. **Parameters:** - `prompt` (string, required): The text description of the image to generate. - `size` (string, optional): Resolution in `W*H` format. Default is `2048*2048`. - `output_format` (string, optional): Format of the output image (e.g., `jpeg`, `png`). Default `jpeg`. - `thinking_mode` (boolean, optional): Enable advanced LLM reasoning to enhance the prompt before generation. - `style` (string, optional): Apply a predefined stylistic transformation. Supported styles include: `photorealistic`, `cinematic`, `anime`, `3d_render`, `cyberpunk`, `neon_punk`, `comic_book`, `line_art`, `pixel_art`, `watercolor`, `oil_painting`, `isometric`, `minimalist`, `vaporwave`, `steampunk`, `retro_wave`, `fantasy_art`, `dark_fantasy`, `gothic`, `surrealism`, `pop_art`, `impressionism`, `expressionism`, `cubism`, `ukiyo_e`, `origami`, `papercraft`, `claymation`, `low_poly`, `vector_art`, `digital_illustration`, `concept_art`, `matte_painting`, `pencil_sketch`, `charcoal_drawing`, `ink_wash`, `pastel`, `gouache`, `stained_glass`, `mosaic`, `typography`, `glitch_art`, `synthwave`, `dieselpunk`, `biopunk`, `atompunk`, `macro_photography`, `tilt_shift`, `polaroid`, `tintype`, `infrared_photography`, `double_exposure`. - `images` (array of strings, optional): Array of image URLs for image-to-image editing. Max 7 images. - `webhook_url` (string, optional): URL to receive the asynchronous completion payload. ### 2. Kenerate Image Pro (Pro Model) **Endpoint:** `POST /kenerate-image-pro` **Description:** Next-generation text-to-image generation offering unmatched photorealism and adherence. **Cost:** $0.10 (10 cents) per generation. **Parameters:** Same as `/kenerate-image`. ### 3. Background Removal **Endpoint:** `POST /remove-bg` **Description:** Precisely remove backgrounds from images. **Cost:** $0.025 (2.5 cents) per operation. **Parameters:** - `image` (string, required): URL of the image to process. - `webhook_url` (string, optional): URL to receive the asynchronous completion payload. ### 4. Image Upscaling **Endpoint:** `POST /remove-upscale` **Description:** Upscale images to 2k, 4k, or 8k resolution while preserving quality. **Cost:** $0.025 (2.5 cents) per operation. **Parameters:** - `image` (string, required): URL of the image to upscale. - `target_resolution` (string, optional): Desired resolution (`2k`, `4k`, `8k`). Default `4k`. - `output_format` (string, optional): Output format (e.g., `jpeg`, `png`). Default `jpeg`. - `webhook_url` (string, optional): URL to receive the asynchronous completion payload. --- ## Errors - `401 Unauthorized`: Invalid or missing API Key. - `402 Payment Required`: Insufficient wallet balance. Top up via the KenerateAI Dashboard. - `400 Bad Request`: Invalid parameters (e.g., incorrect size format, too many images). - `403 Forbidden`: Account banned. - `500 Internal Server Error`: An error occurred during processing. ## Rate Limits Rate limits are tied to your Wallet Tier (Bronze, Silver, Gold, Ultra). - **Bronze**: 2 req/min - **Silver**: 500 req/min - **Gold**: 3,000 req/min - **Ultra**: 5,000 req/min To increase your tier, make a qualifying top-up on the KenerateAI Developer Dashboard.