API Reference
Code Screenshot API
Generate beautiful code screenshots programmatically. Free, no authentication required.
POST
/api/v1/screenshotQuick Start
bash
curl -X POST https://ray.tinte.dev/api/v1/screenshot \
-H 'Content-Type: application/json' \
-d '{
"code": "console.log(\"Hello, World!\")",
"language": "javascript",
"theme": "one-hunter"
}' -o screenshot.pngReturns a PNG image. The response Content-Type is image/png.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
coderequired | string | - | The source code to render |
language | string | "tsx" | Syntax highlighting language |
theme | string | "one-hunter" | Theme slug or inline TinteBlock |
mode | "dark" | "light" | "dark" | Color scheme |
padding | number | 32 | Outer padding in px (0-256) |
fontSize | number | 14 | Font size in px (8-32) |
lineNumbers | boolean | true | Show line numbers |
title | string | "" | Window title bar text |
background | string | "midnight" | Gradient preset or hex color |
scale | number | 2 | Resolution multiplier (1-4) |
Background presets: midnight sunset ocean forest ember steel aurora none
Supported Languages
TSXTypeScriptJavaScriptPythonRustGoHTMLCSSJSONBashSQLJavaC++RubySwiftKotlin
Themes
Choose from 500+ themes. Browse the full collection at tinte.dev/themes.
Pass any theme slug as the theme parameter, or provide an inline TinteBlock object for custom themes.
Code Examples
JavaScript / Node.js
javascript
const res = await fetch("https://ray.tinte.dev/api/v1/screenshot", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
code: 'console.log("Hello")',
language: "javascript",
theme: "one-hunter",
}),
});
const blob = await res.blob();Python
python
import requests
res = requests.post("https://ray.tinte.dev/api/v1/screenshot", json={
"code": "print('Hello')",
"language": "python",
"theme": "one-hunter",
})
with open("screenshot.png", "wb") as f:
f.write(res.content)AI Agent Integration
Ray works natively with Claude Code, Cursor, and 40+ AI agents via the skills protocol.
terminal
npx skills add Railly/tinte
Once installed, ask your AI assistant to take a code screenshot.
Rate Limits
60 requests / minuteper IP address
No authentication required. Check usage at GET /api/v1/ratelimit-status