SDKs & REFERENCESDKs

Python

Call the Render API from Python. A first-party SDK is not published yet.

There is no official Python package yet. Use requests (or httpx) against the same HTTP API as Quick Start.

import os
import requests

base = os.environ["JSONTOIMG_BASE_URL"]  # e.g. https://app.jsontoimg.com
key = os.environ["JSONTOIMG_API_KEY"]

response = requests.post(
    f"{base}/api/v1/render",
    params={"wait": 60},
    headers={
        "Authorization": f"Bearer {key}",
        "Content-Type": "application/json",
    },
    json={
        "template": "<design-id>",
        "format": "png",
        "layers": {"headline": {"text": "Hello"}},
    },
    timeout=90,
)
response.raise_for_status()
job = response.json()
print(job["status"], job.get("assetUrl"))

Auth, errors, and wait/SSE behave like the API reference. For Node.js, use the typed SDK.