CodingMantra LogoCodingMantra
GalleryProductsPortfolioServicesGamesPricingContact
CodingMantra LogoCodingMantra

Providing business solutions for small and medium-sized businesses and helping them to grow.

WhatsApp ChannelX / TwitterLinkedInInstagramFacebookGitHubYouTube

Company

  • About Us
  • Services
  • Products
  • Portfolio
  • Pricing
  • Blog
  • API Docs
  • Contact Us

Top Tools

  • All Tools
  • Image Gallery
  • Image Tools
  • Digital Marketing
  • Financial Tools
  • Games
  • SEO Tools

Legal

  • Privacy Policy
  • Terms & Conditions
  • Return Policy
  • Deals
  • Sitemap

© 2026 CodingMantra. All Rights Reserved.

    1. Home
    2. API Documentation
    3. Image Tools
    4. Sketch to Real

    Sketch to Real API

    Transform hand-drawn sketches or simple outlines into fully realized, high-quality images.

    GET
    /api/image/sketch-to-real-prompts

    Retrieve a list of all available pre-defined styles and prompts for Sketch to Real.

    Example Request

    curl -X GET 'https://codingmantra.com/api/image/sketch-to-real-prompts'

    Example Response

    {
      "data": [
        {
          "id": "modern-villa",
          "title": "Modern Minimalist Villa",
          "categoryId": "architecture",
          "categoryTitle": "Architecture & Buildings",
          "style": "Photorealistic",
          "demoImageUrl": "https://..."
        },
        // ... more prompts
      ]
    }

    POST
    /api/image/sketch-to-real

    Generate a realistic image from a sketch input.

    Request Body

    FieldTypeDescription
    sketchImagestringRequired. The sketch image as a data URI.
    promptIdstringOptional. The ID/value of a pre-defined scene instruction. Get available IDs from the `/api/image/sketch-to-real-prompts` endpoint.
    promptstringOptional. A description of the desired output. (Required if `promptId` is omitted).
    stylestringOptional. The artistic style (e.g., 'Photorealistic', 'Cinematic'). Inherits dynamically if `promptId` is provided.
    referenceImagestringOptional. A data URI or URL of a reference image to guide the style.
    negativePromptstringOptional. Elements to avoid in the generation.
    overlayTextstringOptional. Short text to overlay prominently on the image.
    marketingTextstringOptional. More detailed marketing text or slogan.
    modelstringOptional. The AI model to use. Can be `'standard'` (default) or `'pro'`.
    outputShapestringOptional. Default: `'1:1'`.
    outputResultstringOptional. `'base64'` (default) or `'url'`.

    Example Request

    curl -X POST 'https://codingmantra.com/api/image/sketch-to-real' \
         -H 'Content-Type: application/json' \
         -H 'Authorization: Bearer YOUR_API_KEY' \
         -d '{
              "sketchImage": "data:image/png;base64,iVBORw0KGgo...",
              "promptId": "modern-villa",
              "prompt": "with beautiful landscaping",
              "outputShape": "16:9"
            }'

    Example Response

    {
      "data": {
        "photoDataUri": "data:image/png;base64,..."
      }
    }

    On This Page

    GET PromptsPOST Sketch to RealFAQ

    Frequently Asked Questions