Dependency Graph

JPEG Dependency Graph API

Generate dependency graph images in JPEG format with a single HTTP request. Compressed raster format for web pages and social media. ChartQuery renders publication-ready JPG output that works everywhere, dashboards, emails, documents, and print.

Live Preview

This image is generated in real time by the ChartQuery API, no static assets.

JPEG Dependency Graph API, live preview generated by ChartQuery

Quick Start

A single HTTP request is all you need. No SDK, no dependencies.

Terminal
curl -X POST https://api.chartquery.com/v1/diagram \
  -H "Content-Type: application/json" \
  -d '{"diagram_type":"mermaid","diagram_source":"graph TD\\n  A[Start] --> B{Decision}\\n  B -->|Yes| C[Process]\\n  B -->|No| D[End]","output_format":"jpg"}' \
  --output diagram.jpg

How It Works

1

Send a Request

POST a JSON body or use GET with query parameters. No SDK or library needed.

2

Get Your Image

ChartQuery renders your chart, diagram, barcode, QR code, or label and returns it as PNG or SVG.

3

Use It Anywhere

Embed in emails, PDFs, dashboards, documents, or print directly. Works everywhere images work.

Features

JPEG Output

Compressed raster format for web pages and social media. Every response returns a valid JPG file ready to use, no post-processing needed.

Sub-500ms Response

Charts, diagrams, barcodes, and labels render in under 500ms. Get your JPEG file back before the next line of code runs.

No Dependencies

No rendering library, no headless browser, no canvas. A single HTTP request returns a JPEG image. Works from any language or platform.

Pixel-Perfect at Any Size

Set width, height, and device_pixel_ratio for Retina-quality JPEG output up to 4000px.

Use Cases

  • Generate diagram thumbnails for content management systems
  • Create lightweight preview images for web galleries
  • Produce compressed diagram images for social media sharing
  • Generate email-safe diagram attachments with small file sizes

Frequently Asked Questions

How do I generate dependency graph as JPEG with an API?

Send a request to the ChartQuery diagram endpoint with format: "jpg" in your JSON body (POST) or as a query parameter (GET). The API returns a JPEG file directly in the response body. No API key is required for basic usage.

Why choose JPEG over other output formats?

Compressed raster format for web pages and social media. JPEG files are smaller than PNG, making them ideal for web thumbnails and social media where file size matters more than perfect quality.

What is the maximum resolution for JPEG output?

Set width and height up to 4000px and device_pixel_ratio up to 3 for Retina-quality output. The default is 800x400px at 1x pixel ratio.

Is the JPEG dependency graph API free?

Yes. Anonymous access gives you 60 requests per hour without an API key. A small watermark is added to free-tier output. Paid plans remove the watermark and increase rate limits.

Can I embed JPEG dependency graph in emails and documents?

Yes, JPEG images work everywhere. Use them in emails, web pages, messaging apps, and social media posts.

What content type does the API return for JPEG?

The API returns image/jpeg in the Content-Type header. The response body is the raw JPEG file data, ready to save to disk or stream to the client.

Start generating charts today

No API key required to get started. Generate charts, diagrams, and more with a single HTTP request.

Get StartedView Pricing