Skip to main content
Use these practices to generate better fonts, handle asynchronous jobs reliably, and keep generated TTF files easy to test and reuse.

Use high quality reference images

While the Mixfont model will work with any kind of image, stronger reference images will yield better results. To get a better quality font output, you should try to isolate the letterforms and make sure they have clean edges, visible shapes, and enough letters to communicate the style. The more evidence the model can gather from an input image, the better the results will be. With input images that display multiple font styles, the model will usually choose the style that is larger or takes up more area in the image. It is recommended that you first crop the images to the exact text region before submitting it to the model for best results.
InputOutput
Canyon Blob input exampleCanyon-Blob-Display.ttf
Gossamer Editorial Serif input exampleGossamer-Editorial-Serif.ttf
Astral Groove input exampleAstral-Groove-Display.ttf
rounded, italicized modern sans serif font
Borealis-Soft-Italic-Glow.ttf

Choose the right input format

Start with the input that best captures the style you want. Use text generation when you can describe the type direction. Use image generation when a visual reference is the clearest source of truth.
GoalRecommended inputBest practice
Explore many style directionsText promptVary one style detail at a time so you can compare results clearly.
Match a sketch, sign, logo, or sampleImage URLUse a clear image with readable letterforms and strong contrast.
Build prompt presets into a productText promptStore reusable prompt templates for common categories and moods.
Recreate an existing visual directionImage URLUse the reference image as the main style source, then test the TTF in real layouts.

Write specific prompts

Good prompts describe the type category, visual style, intended use case, and distinctive details. Avoid vague prompts that only describe mood.
{
  "prompt": "A neutral humanist sans serif with open counters, compact spacing, and strong readability for dashboard labels",
  "glyph_set": "standard"
}
Stronger promptWeaker prompt
A high-contrast editorial serif with sharp wedge serifs for fashion headlinesA stylish fashion font
A soft geometric sans with rounded terminals for a wellness app identityA calm modern font
A bold compressed grotesk with industrial spacing for concert postersA cool poster font

Pick the right glyph set

Use standard when English support is enough for exploration, prototypes, headings, logos, and first drafts. It generates 72 glyphs for English with basic letters, numbers, and punctuation. Use extended when you need production candidates that support Latin-language text beyond English. It generates 319 glyphs for all Latin languages, including special characters, costs more credits, and may take 2-3 minutes to complete.
Glyph setBest forGlyphsCredits
standardEnglish concepting, prototypes, and exploration7220
extendedProduction candidates for all Latin languages31950
Start with standard if you only need coverage for English. Standard inference runs are much faster and will be enough for most workflows. Choose extended if you want a more complete font with broader character coverage.

Handle jobs asynchronously

Font generation runs as an asynchronous job. Store the returned generation id and poll_url, then poll until the job reaches a terminal status.
StatusMeaning
preparingMixfont is preparing the request for generation.
queuedThe job is waiting to run.
runningThe model is generating the font.
succeededThe generated TTF is ready in ttf_url.
failedThe job could not complete. Check error.
cancelledThe job was cancelled before completion.
Treat succeeded, failed, and cancelled as terminal states. Add a timeout in your application so you do not poll indefinitely. Use the client libraries when you want Mixfont to handle polling. Use the REST API when you need direct control over job creation, status checks, retries, and storage.

Store results for review

When a job succeeds, download or persist the generated ttf_url before you show it as a finished asset. Keep the generation id, original prompt or image URL, and glyph_set with the result so your team can compare outputs later. Test generated fonts in real content, not only alphabet previews. Check headings, numbers, punctuation, short labels, and the longest strings your design needs to support.

Rehost generated font files

Returned TTF files are temporary and will be deleted within 24 hours. Download each generated TTF file after the job succeeds, then rehost it on your own storage before you use it in production. Update your @font-face declarations, CDN references, and saved asset records to use your rehosted file URL instead of the temporary ttf_url.

Plan for credits and errors

Use the pricing table to estimate generation costs from each request’s glyph_set. Make sure your workspace has enough credits before you submit a batch of generations. If the API returns a 402 error, prompt the user to add credits before retrying. If a generation returns failed, show the error value and let the user adjust the prompt, image, or glyph set.

Protect your API key

Call the Mixfont API from server-side code when possible. Do not expose your API key in browser JavaScript or public client bundles. Read the API key from an environment variable, such as MIXFONT_API_KEY, and send it with the x-api-key header or through a Mixfont client library.

Font generation guide

Build the full generation workflow with JavaScript, Python, or cURL.

API reference

Review request and response fields for text generation.