Headless diagram downloads return the same GraphEditor-rendered image bytes used by browser exports. Use the CloudEval CLI when an agent needs a PNG, JPEG, or SVG file directly. Authenticate first withDocumentation Index
Fetch the complete documentation index at: https://docs.cloudeval.ai/llms.txt
Use this file to discover all available pages before exploring further.
cloudeval login or cloudeval login --headless. Use --machine only when service-principal machine authentication is configured.

Why it matters
AI agents and CI jobs need deterministic files, not screenshots from an interactive tab. The diagram image endpoint keeps the browser UI renderer for fidelity while enforcing strict auth boundaries for private project data.Quick example
Download the private architecture and dependency diagrams for one project:diagram-downloads/architecture.pngdiagram-downloads/dependency.png- human output,
--jsondata.output,data.headersOutput, andfilesWrittenreport resolved absolute filesystem paths - response headers that include
X-CloudEval-Diagram-Auth-Mode,X-CloudEval-Diagram-Graph-Private, node counts, edge counts, diagnostics, and label mode
CLI shape
cloudeval login, cloudeval login --headless, or --machine and sends it only for private downloads. The frontend defaults to https://cloudeval.ai; pass --frontend-url only for local/dev frontends. Use --public for public/share graph bytes; that mode does not send private auth.
Endpoint shape
The CloudEval project id to export.
Diagram view to render. Supported values are
architecture and dependency.Image type to return. Supported values are
png, jpeg, and svg.Label mode. Use
all to force resource names and edge labels, or viewport for normal progressive visibility.Backend user UUID. Required for private bearer-token exports.
Graph snapshot id. Use it to pin a synced graph snapshot when one is available.
Use
1 to export the public/share graph only.Private exports
Private CLI exports requirecloudeval login, cloudeval login --headless, or --machine. Prefer stored login state for user workflows.
PNG with all labels:
Public or shared exports
Usepublic=1 only when you intentionally want public/share graph data. It is a scope reduction: CloudEval ignores session and bearer identity, uses only public graph data, and never falls back to private data.
public=1&user_id=... return 400 PROJECT_DIAGRAM_SCOPE_CONFLICT.
Validate headers
Check headers before trusting a downloaded file in automation:Returns
session, bearer, or public.Returns
1 for private graph data or 0 for public/share graph data.Rendered node count.
Rendered edge count.
Raw, direct-input, and result graph counts for debugging filtered diagrams.
Returns
all or viewport.MCP tool
The CloudEval MCP server exposes the same workflow asprojects.exportDiagram. It writes the image to outputPath and can optionally write response headers to headersOutputPath.
Security checks
These commands should fail unless the request is intentionally public:Common mistakes
| Mistake | What happens |
|---|---|
Passing user_id without auth | Rejected. user_id is not proof of identity. |
Forgetting user_id with bearer auth | Rejected because the frontend route cannot infer the backend user scope. |
Adding public=1 to a private export | You get the public/share graph only. Remove public=1 for private data. |
| Trusting only the file extension | Check Content-Type and X-CloudEval-Diagram-* headers. |
| Comparing public and private diagrams without headers | Public/share payloads may contain fewer renderable resources. Use diagnostics headers to explain count differences. |
Tips
- Prefer
labels=allfor agent-readable diagrams. - Save headers next to each image so agents can verify provenance later.
- Use
--fail-with-bodyin scripts so error codes remain visible. - Use the web app for visual review when humans need to inspect layout details.
