fetch.
Install
Generate a font
Create from an image
Methods
Create options
Provide exactly one ofprompt or imageUrl.
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Use the Mixfont JavaScript client
fetch.
npm install mixfont
import { Mixfont } from "mixfont";
const mixfont = new Mixfont({
apiKey: process.env.MIXFONT_API_KEY,
});
const generation = await mixfont.generations.create({
prompt: "a cute and bubbly font",
glyphSet: "standard",
});
const result = await mixfont.generations.wait(generation.id);
console.log(result.ttfUrl);
const generation = await mixfont.generations.create({
imageUrl: "https://images.example.com/reference-wordmark.png",
glyphSet: "standard",
});
| Method | Description |
|---|---|
mixfont.generations.create(options) | Starts a new generation and returns immediately. |
mixfont.generations.get(id) | Fetches the current generation status. |
mixfont.generations.wait(id, options) | Polls until the generation succeeds, fails, is cancelled, or times out. |
prompt or imageUrl.
| Option | Type | Description |
|---|---|---|
prompt | string | Text prompt for the generated font. |
imageUrl | string | Public HTTPS URL for a reference image. |
glyphSet | "standard" or "extended" | Optional glyph set. Defaults to standard. standard generates 72 glyphs for English with basic letters, numbers, and punctuation. extended generates 319 glyphs for all Latin languages, including special characters. |
| Property | Type | Description |
|---|---|---|
id | string | Generation id. |
name | string | Generated font display name. |
ttfUrl | string or null | Generated TTF download URL. null until the generation succeeds. |
status | string | preparing, queued, running, succeeded, cancelled, or failed. |
inputType | string | text or image. |
glyphSet | string | Selected glyph set: standard or extended. |
progressPercent | number | Approximate progress from 0 to 100. |
pollUrl | string | Present on create responses. |
error | string | Present only when a generation fails and an error message is available. |
createdAt | string | ISO timestamp for when the generation was created. |
| Option | Type | Description |
|---|---|---|
intervalMs | number | Polling interval. Defaults to 5000. |
timeoutMs | number | Maximum wait time. Defaults to 600000. |
signal | AbortSignal | Optional abort signal. |
