Skip to main content

Mixfont banner

State-of-the-art AI Font Generation Model

Official Mixfont Python SDK

Mixfont website Mixfont GitHub Mixfont on X

Examples | Supported platforms | How it works | Model inputs | Usage


The official Python SDK for the Mixfont AI font generation API. It lets you create AI-generated font files from Python applications and scripts.

Mixfont is a frontier AI lab developing generative AI for fonts. The Mixfont font generation model creates complete, web-safe TTF font files from a natural-language prompt or a public reference image, so applications can turn generated lettering, sketches, logos, or visual references into editable type instead of a flat image. Fonts generated via the API are unique and licensed for commercial use.

For more information, see the Mixfont website and the full Mixfont documentation.


Examples

These examples show prompt and image inputs paired with generated font files from Mixfont.

Input Generated font preview
generate a font for a soccer team logo. Make the letterforms soccer themed, bold, and unique. Cipher Striker Ultra generated font preview
Download Cipher-Striker-Ultra.ttf
Wuthering Heights input example Wuthering Heights Display generated font preview
Download Wuthering-Heights-Display.ttf
Gossamer Editorial Serif input example Gossamer Editorial Serif generated font preview
Download Gossamer-Editorial-Serif.ttf
HANDY DAN'S Property Maintanence input example Dystopian Brush Stroke Display generated font preview
Download Dystopian-Brush-Stroke-Display.ttf
NASA logo input example Dissonant Wave Sans generated font preview
Download Dissonant-Wave-Sans.ttf
Natural handwriting input example Zephyr Ink Script generated font preview
Download Zephyr-Ink-Script.ttf

Supported platforms

  • Python >= 3.9
  • Standard CPython environments with network access

How font generation works

Font generation is asynchronous. Start a generation with exactly one input:

  • prompt: a text description of the font to generate.
  • image_url: a public HTTPS reference image for the style you want the model to follow.

The create call returns a generation id and, when available, a polling URL. Use mixfont.generations.wait(...) for built-in polling, or call mixfont.generations.get(...) yourself until the status reaches succeeded, failed, or cancelled. When a job succeeds, ttf_url contains the generated TTF download URL.


Model inputs and outputs

Use text generation when you can describe the type direction, such as category, style, use case, spacing, contrast, or distinctive details. Use image generation when a visual reference is the clearest source of truth, such as a sketch, sign, logo, poster, screenshot, or existing design mockup.

Reference images should be publicly reachable HTTPS URLs that point to JPEG, PNG, or WebP files up to 20 MB. Clear images with readable letterforms, strong contrast, clean edges, and cropped text regions generally produce better results.

Generated font files are returned as TTFs. Download or persist the returned ttf_url after the job succeeds, then rehost the file in your own storage before using it in production. Returned TTF URLs are temporary and will be deleted within 24 hours.


Create an API key

To start making calls to the API you'll need an API key. If you don't already have a Mixfont account, visit Mixfont and sign in.

Go to the Developer Console to create your first API key. When calling the API, include the key in the x-api-key header for each request.

Developer Console Key Creation Flow

Make sure to copy the API key to a safe place. The API key will only be visible in the dashboard once. If you lose your key, you'll have to create a new one.


Installation

Install it from PyPI:

pip install mixfont

Usage

For the full API documentation, see Mixfont docs.

Import the package:

from mixfont import Mixfont

Instantiate the client:

import os

mixfont = Mixfont(api_key=os.environ["MIXFONT_API_KEY"])

Create a font generation:

generation = mixfont.generations.create(
    prompt="A condensed sci-fi display font",
    glyph_set="standard",
)

print(generation["id"])

Fetch the generation later:

generation = mixfont.generations.get("generation_id")

print(generation["status"], generation["progress_percent"])

Or wait for the generation to finish:

result = mixfont.generations.wait(generation["id"])

print(result["ttf_url"])

Create a generation from a reference image:

generation = mixfont.generations.create(
    image_url="https://example.com/reference.png",
)

API


Constructor

mixfont = Mixfont(api_key, timeout=30.0)
Argument Type Description
api_key str Required. Mixfont API key.
timeout float Optional request timeout in seconds. Defaults to 30.0.

mixfont.generations.create(...)

Starts a new font generation and returns immediately.

Argument Type Description
prompt str Text prompt for the generated font.
image_url str Public HTTPS URL for a JPEG, PNG, or WebP reference image up to 20 MB.
glyph_set "standard" or "extended" Optional glyph set. Defaults to standard.

Provide exactly one of prompt or image_url.


Glyph sets

Glyph set Best for Glyphs Typical timing
standard English concepting, prototypes, headings, and logos 72 Around 25 seconds on average
extended Production candidates for Latin-language text beyond English 319 2-3 minutes

standard includes English letters, numbers, and basic punctuation. extended supports all Latin languages, including special characters, and costs more API credits.


mixfont.generations.get(generation_id)

Fetches the current status of a generation.


mixfont.generations.wait(generation_id, ...)

Checks the generation until it reaches a terminal status.

Argument Type Description
interval_seconds float Polling interval. Defaults to 5.0.
timeout_seconds float Maximum wait time. Defaults to 600.0.

wait returns the completed generation when it succeeds. It raises an error if the generation fails, is cancelled, or times out.


Best practices

Write specific prompts that describe the type category, visual style, intended use case, and distinctive details.

Start with standard when comparing directions, then use extended once you have a candidate worth testing more deeply.

Store the generation id, original prompt or image URL, and glyph_set with each result so your team can compare outputs later.

Test generated fonts in real content, including headings, numbers, punctuation, labels, and the longest strings your product needs to support.

Keep your API key on the server and read it from an environment variable such as MIXFONT_API_KEY.


Development

PYTHONPATH=src python3 -m unittest discover -s tests
python3 -m build

Links

Release files for mixfont 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mixfont 0.1.3
File Size Uploaded
mixfont-0.1.3.tar.gz 16.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mixfont 0.1.3
File Interpreter ABI Platform
mixfont-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 28.1 kB

Release files / mixfont-0.1.3.tar.gz

Download URL mixfont-0.1.3.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a82427e53a7e394ca3cf16666b3e5b6ab4d2eb41836b22880419e3e381f0ecc1
BLAKE2b-256 checksum
How to use checksums
24dedb25529e14e53af368ee63934ea59b5361e54fcb9d9b6e5b4bd1fc2542d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release files / mixfont-0.1.3-py3-none-any.whl

Download URL mixfont-0.1.3-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eaaae913ecbd947452d12fe3c4e6e6b9b0182829f2911c6f0dc5fbe1aead0234
BLAKE2b-256 checksum
How to use checksums
3cfb076550e673da64cd6de40ff851dec68e0a1562c75a74ba08f6f7654abf71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page