Two-Line Logo Generator API

This API allows you to generate SVG logos with one or two lines of text, similar to the interactive logo generator. The API returns either the SVG content directly or as a data URL.

API Endpoint

https://dcm31--052cd264181011f0abe4569c3dd06744.web.val.run

Query Parameters

ParameterDescriptionDefault
topWordTop text (or single line text)"LOGO"
bottomWordBottom text (only used in two-line mode)"TESTER"
fontFamilyFont name (must match a name from FontData.tsx)"Arial"
backgroundColorBackground color in hex (#RRGGBB)"#3B82F6"
textColorText color for top text in hex (#RRGGBB)"#FFFFFF"
accentColorColor for bottom text in hex (#RRGGBB)"#EA5A47"
secondaryColorColor for bottom strip in hex (#RRGGBB)"#781E32"
singleLineSet to "true" for single line modefalse
formatSet to "dataurl" to get a data URLSVG content

Available Fonts

The API supports the following font options:

  • Arial
  • Helvetica
  • Verdana
  • Tahoma
  • Trebuchet MS
  • Georgia
  • Garamond
  • Times New Roman
  • Courier New
  • Segoe UI
  • Calibri
  • Geneva
  • Optima
  • Cambria
  • Candara
  • Avenir
  • System UI

Examples

Basic Usage

Generate a two-line logo with default settings:

https://dcm31--052cd264181011f0abe4569c3dd06744.web.val.run?topWord=HELLO&bottomWord=WORLD

Generate a single-line logo:

https://dcm31--052cd264181011f0abe4569c3dd06744.web.val.run?topWord=MYLOGO&singleLine=true

Custom Colors and Font

Generate a logo with custom colors and font:

https://dcm31--052cd264181011f0abe4569c3dd06744.web.val.run?topWord=AWESOME&bottomWord=LOGO&fontFamily=Georgia&backgroundColor=%23FF5733&textColor=%23FFFFFF&accentColor=%23FFD700&secondaryColor=%23900C3F

Get Data URL

Get the logo as a data URL (returns JSON):

https://dcm31--052cd264181011f0abe4569c3dd06744.web.val.run?topWord=DATA&bottomWord=URL&format=dataurl

Response Formats

Default (SVG Content)

Returns the raw SVG content with MIME type image/svg+xml.

Data URL Format

Returns a JSON object with the following structure:

{ "success": true, "dataUrl": "data:image/svg+xml;base64,..." }

Notes

  • Text is automatically converted to uppercase
  • Font sizes are automatically calculated based on text length
  • The corner radius is fixed at 15px (same as the OpenMoji design)
  • The API uses CORS headers to allow cross-origin requests