Developer Core Utility APIs
HomeDocsDeveloper APIs & Integration

Developer Core Utility APIs

Category: Developer APIs & Integration

API Platform Architecture Flow Diagram

Client Request
GET/POST /api/v1/*
Auth Gate (validateApiKey)
Checks origin / bc_prod_ key
Target API Core Resolver
Executes script / Gemini models

Welcome to the official Bishal Codes Developer API Suite. We offer a collection of high-performance, robust, and production-level REST endpoints for core developer utilities.

API Architecture Flow Diagram

Below is the visual layout representing how requests flow through our API platform:

[Navbar / Client] ➔ [API Portal UI] ➔ [Request /api/v1/*] ➔ [Auth Check (validateApiKey)] 
                                                                     │
     ┌──────────────────────┬──────────────────────┬─────────────────┴───────┬──────────────┐
     ▼                      ▼                      ▼                         ▼              ▼
[QR Code API]        [Diff Checker]         [JSON Formatter]          [Currency API]     [AI OCR/Summarizer]
(qrcode/route.ts)   (diff/route.ts)       (json-format/route.ts)    (currency/route.ts) (Gemini Models)

Authentication

All API endpoints require authentication using the X-API-Key header or apiKey query parameter.

  • Sandbox API Keys (bc_live_xxx): Free keys. These keys are restricted to requests originating from bishalcodes.com or localhost. If called from external servers, cURL, or Postman, the server will return a 403 Forbidden block.
  • Production API Keys (bc_prod_xxx): Unrestricted. These keys are issued upon subscribing to a paid tier (Pro or Enterprise) and can be integrated into any external backend (Node, Python, Go, cURL, PHP, Ruby, etc.) globally.

To get your Sandbox API Key, navigate to the APIs Developer Hub.


API Endpoints Catalog

1. Website Screenshot API

  • Endpoint: GET /api/v1/screenshot
  • Description: Captures high-res website rendering viewports.
  • Parameters:
    • url (string, Required): Target site URL.
    • width (number, Optional, default 1280): Viewport width in pixels.
    • height (number, Optional, default 800): Viewport height in pixels.
    • fullPage (boolean, Optional, default false): Capture full scroll length.
    • format (string, Optional, default png): PNG or JPEG format.

2. QR Code Generator API

  • Endpoint: GET /api/v1/qrcode
  • Description: Generates styled vector QR code images.
  • Parameters:
    • text (string, Required): Value payload to encode.
    • size (number, Optional, default 250): QR box dimension in pixels.
    • color (string, Optional, default #000000): Foreground module color (hex).
    • bg (string, Optional, default #ffffff): Background color (hex).
    • format (string, Optional, default image): "image" (returns binary PNG) or "json" (returns base64 dataUrl).

3. AI OCR Text Extraction API

  • Endpoint: POST /api/v1/ocr
  • Description: High-accuracy text OCR using Gemini 2.5 Flash.
  • Request Body (JSON):
    • image (string, Required): The base64-encoded image string data.
    • mimeType (string, Optional, default image/jpeg): The mime type of the image (e.g. image/png, image/jpeg).
  • Response:
    {
      "success": true,
      "text": "EXTRACTED DOCUMENT TEXT HERE..."
    }
    

4. AI Document Summarizer API

  • Endpoint: POST /api/v1/summarize
  • Description: Generates markdown summary abstracts of long text content.
  • Request Body (JSON):
    • text (string, Required): Document raw text string.
  • Response:
    {
      "success": true,
      "summary": "### Purpose and scope\nThis document details..."
    }
    

5. Diff Checker API

  • Endpoint: POST /api/v1/diff
  • Description: Computes line-by-line differences using LCS algorithm.
  • Request Body (JSON):
    • source (string, Required): Reference original text.
    • target (string, Required): Modified target text.

6. JSON Formatter & Validator API

  • Endpoint: POST /api/v1/json-format
  • Description: Formats, minifies, or validates JSON text templates.
  • Request Body (JSON):
    • json (string, Required): Raw JSON string input.
    • action (string, Optional, default "format"): "format", "minify", or "validate".
    • space (number, Optional, default 2): Tab spacing size.

7. Live Currency Exchange API

  • Endpoint: GET /api/v1/currency
  • Description: Retrieves live currency exchange rates cached from financial markets.
  • Parameters:
    • base (string, Optional, default "USD"): Base target currency code.
Need Further Custom Specifications?

If your query requires dedicated technical attention or if you need a customized service scope, please submit a message via our contact portal.

Documentation

Documentation & Guides | Bishal Codes