CodingMantra LogoCodingMantra
GalleryProductsPortfolioServicesGamesPricingContact
CodingMantra LogoCodingMantra

AI tools and software services for people building better digital experiences.

WhatsApp ChannelX / TwitterLinkedInInstagramFacebookGitHubYouTube

Company

  • Home
  • About Us
  • Services
  • Products
  • Portfolio
  • Pricing
  • Blog
  • API Docs
  • MCP Integration
  • Contact Us

Top Tools

  • All Tools
  • Image Tools
  • Video Tools
  • Brand Context
  • Digital Marketing
  • Financial Tools
  • 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.

    API Reference

    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,..."
      }
    }

    Explore Other API Documentation

    On This Page

    GET PromptsPOST Sketch to RealFAQ

    Frequently Asked Questions