Back to Tool
📸

Code Screenshot API

Generate beautiful code screenshot configurations

Endpoint

POST/api/v1/code-screenshot

Authentication

Include your API key in the request header:

X-API-Key: your_api_key_here

Get your API key from the Dashboard

Request Body

Content-Type: application/json

FieldTypeRequiredDescription
codestringYesThe code to screenshot (max 50,000 characters)
languagestringNoProgramming language (javascript, python, etc.)
themestringNoColor theme: dracula, monokai, github-dark, night-owl, synthwave, ocean
backgroundstringNoBackground gradient or color (CSS value)
paddingnumberNoPadding around code window in pixels
fontSizenumberNoFont size in pixels
lineNumbersbooleanNoShow line numbers
windowControlsbooleanNoShow macOS-style window controls
windowTitlestringNoWindow title text
borderRadiusnumberNoCorner radius in pixels
shadowbooleanNoShow drop shadow

Response

FieldTypeDescription
successbooleanWhether the operation succeeded
configobjectComplete configuration for rendering the screenshot
webUrlstringURL to web tool for image generation

Code Examples

curl -X POST https://tools.shubhambadgujar.com/api/v1/code-screenshot \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "function hello() {\n  console.log(\"Hello, World!\");\n}",
    "language": "javascript",
    "theme": "dracula",
    "lineNumbers": true,
    "windowControls": true
  }'

Pricing

First 50 free, then $0.01 per call

Get API Key

Rate Limits

  • • 100 requests per minute
  • • 10,000 requests per day
  • • Max request size: 10MB

Need Help?

Contact us at support@shubhambadgujar.com