apyhub
DEVELOPER TOOLS · SMART GENERATION

Generate SVG Badge API

Hosted on ApyHub

What it does

SVG Badge Generator creates simple SVG status badges from a label and message, with optional label and message colors. Send label and message in the request body to generate a badge for build status, package state, documentation coverage, or any other short label/value pair you want to display in a repo, README, or dashboard.

Use label_color and message_color when you need to match your product or project theme. The service supports two response styles: POST /download returns the SVG as binary content, and POST /link returns a signed URL in data so you can reference the generated badge elsewhere.

SVG badges are useful when you need lightweight, text-based visuals that stay sharp at any size and render well in GitHub READMEs, docs sites, CI output pages, and internal tools. Because the inputs are just strings, you can generate badges dynamically from pipeline results, environment labels, release states, or other short status values without managing image assets.

▣ ENDPOINT 01 / 02
POST
Generate SVG badge (download)
http://localhost:8080/apyhub/generate-svg-badge/download
QUICKSTARTGUIDE

Quickstart

Generate a badge SVG and download it as a file.

curl -X POST "http://localhost:8080/apyhub/generate-svg-badge/download?output=my-invite" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"label":"build","message":"passing"}'

What you'll get back

Returns a binary file containing the generated SVG badge.

TRY ITLIVE · 60 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*

About this endpoint

What it does

Generates an SVG badge file from the provided badge text and optional color values, then returns the result as binary output for download.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput filename or label for the downloaded file.

Request Body

ParameterTypeMandatoryDescription
labelStringYesBadge label text.
messageStringYesBadge message text.
label_colorStringNoBadge label color value.
message_colorStringNoBadge message color value.

Response

Returns a binary file download containing the generated SVG badge.

Query parameters

Name
Type
Description
outputOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 02
POST
Generate SVG badge (signed URL)
http://localhost:8080/apyhub/generate-svg-badge/link
QUICKSTARTGUIDE

Quickstart

Create an SVG badge link by sending the required label and message, with an optional output name in the query string.

curl -X POST "http://localhost:8080/apyhub/generate-svg-badge/link?output=my-invite" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"label":"build","message":"passing"}'

What you'll get back

Returns a JSON object with a data string field containing the generated badge URI.

{
  "data": "https://apyhub-outgoing.s3.eu-west-1.amazonaws.com/mono-go/badge_generator/general/badge_generator_2026-08-07_e07459ee.svg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIARJOHWS6LWTUUGYPI%2F20260807%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20260807T133021Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&response-content-disposition=inline&response-content-type=image%2Fsvg%2Bxml&X-Amz-Signature=6131bde37cd0f16cfe13b00ccc2058fb0a5ae42aefdd697ce60bec96f00deffd"
}
TRY ITLIVE · 60 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*

About this endpoint

What it does

Generates a signed URL for an SVG badge. The request body supplies the badge label and message, and the response returns a JSON object containing the generated URL in data.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput identifier.

Request Body

ParameterTypeMandatoryDescription
labelStringYesBadge label.
messageStringYesBadge message.
label_colorStringNoLabel color value.
message_colorStringNoMessage color value.

Response

Returns a JSON object with a data string field formatted as a URI.

ParameterTypeMandatoryDescription
dataStringYesSigned URL for the generated SVG badge.

Query parameters

Name
Type
Description
outputOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.