Back to Tool
📸
Code Screenshot API
Generate beautiful code screenshot configurations
Endpoint
POST
/api/v1/code-screenshotAuthentication
Include your API key in the request header:
X-API-Key: your_api_key_hereGet your API key from the Dashboard
Request Body
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | The code to screenshot (max 50,000 characters) |
| language | string | No | Programming language (javascript, python, etc.) |
| theme | string | No | Color theme: dracula, monokai, github-dark, night-owl, synthwave, ocean |
| background | string | No | Background gradient or color (CSS value) |
| padding | number | No | Padding around code window in pixels |
| fontSize | number | No | Font size in pixels |
| lineNumbers | boolean | No | Show line numbers |
| windowControls | boolean | No | Show macOS-style window controls |
| windowTitle | string | No | Window title text |
| borderRadius | number | No | Corner radius in pixels |
| shadow | boolean | No | Show drop shadow |
Response
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the operation succeeded |
| config | object | Complete configuration for rendering the screenshot |
| webUrl | string | URL 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
}'Rate Limits
- • 100 requests per minute
- • 10,000 requests per day
- • Max request size: 10MB
Need Help?
Contact us at support@shubhambadgujar.com