Independent project. Not a U.S. government website.

USASI
SoftwareFramework

tiktoken

Project record

Maintained by OpenAI12

tiktoken is OpenAI's open-source byte pair encoding (BPE) tokenizer for use with OpenAI's models. It converts text to the token numbers a model sees and back, using named encodings such as o200k_base and cl100k_base, and can return the encoding that corresponds to a given OpenAI model name. It also includes an educational submodule for training and visualizing a simple BPE tokenizer, and a plugin mechanism for registering other encodings.14Fact reviewed Oct 8, 2026

Last reviewedEntry updated Documented release Unknown

Availability and license

Overall availability

Public

Source is public on GitHub and prebuilt packages are on PyPI. The encoding files are not in the repository; the library downloads them, when first used, from the openaipublic.blob.core.windows.net addresses named in its code.174

Availability fact review: Oct 8, 2026

Availability is separate from permission: read the license before using or redistributing.

The MIT license names OpenAI and an individual developer as copyright holders. The encoding files that tiktoken downloads at run time are not part of the repository, and the README does not state separate terms for them.241Fact reviewed Oct 8, 2026

Component reuse rights

A readable or downloadable component is not automatically reusable. These indicators concern recorded license evidence, not system certification.
weights
Unknown — no complete fact-level rights review
code
Reviewed qualifying license recorded — check scope and conditions
data
Unknown — no complete fact-level rights review
documentation
Unknown — no complete fact-level rights review

No complete system-rights review is recorded for this release.

Public materials checklist

Items for a framework under USASI rubric v0.2. Unknown means unassessed or insufficient evidence.
Public materials checklist for tiktoken
ItemStatusNotes and evidence
Source codeIs the source code publicly readable?PublicPython package with a Rust core built through setuptools-rust; the encoding definitions are in tiktoken_ext/openai_public.py.34
DocumentationIs user documentation published?PublicThe README covers basic use, BPE background, and extending tiktoken, and says the API is documented in tiktoken/core.py; it links an OpenAI Cookbook notebook for examples.1
InstallationAre installation instructions or packages publicly available?PublicInstallable from PyPI with pip; requires Python 3.9 or later.17
Supported platformsAre supported operating systems or hardware documented?PublicPyPI provides wheels for macOS (x86_64 and arm64), Linux (manylinux and musllinux, x86_64 and aarch64), and Windows (amd64), and a source distribution.73
Release statusAre versioned releases published?PublicVersioned PyPI releases with a changelog; 0.14.0 was uploaded on 2026-08-17.76

What it is useful for

Counting or inspecting the tokens that a piece of text becomes for an OpenAI model, and learning how BPE tokenization works. The README links an OpenAI Cookbook notebook on counting tokens with tiktoken.1Fact reviewed Oct 8, 2026

Run and use notes

Documented facts only. No hardware or performance claims are made without a cited source and stated assumptions.
  • On first use of an encoding, tiktoken downloads its file from the address in openai_public.py and caches it in the system's temporary directory; setting the TIKTOKEN_CACHE_DIR environment variable chooses another cache location.45

Organization context

U.S. eligibility

Project eligibility rests on documented governing or maintaining entities, not on contributors.

Eligible · basis: U.S. headquarters

The repository is in OpenAI's GitHub organization and its license names OpenAI as a copyright holder. OpenAI's operating company, OpenAI Group PBC, is described as a Delaware public benefit corporation at an address in San Francisco, California, in a February 2026 agreement filed with the SEC.128

Assessed Oct 8, 2026

Sources

  1. 1.
    openai/tiktoken README (external site: raw.githubusercontent.com)

    OpenAI (GitHub) · Repository · accessed Oct 8, 2026

  2. 2.
    openai/tiktoken LICENSE (MIT) (external site: raw.githubusercontent.com)

    OpenAI (GitHub) · License · accessed Oct 8, 2026

  3. 3.
    openai/tiktoken pyproject.toml (external site: raw.githubusercontent.com)

    OpenAI (GitHub) · Repository · accessed Oct 8, 2026

  4. 4.
  5. 5.
    openai/tiktoken tiktoken/load.py (external site: raw.githubusercontent.com)

    OpenAI (GitHub) · Repository · accessed Oct 8, 2026

  6. 6.
    openai/tiktoken CHANGELOG (external site: raw.githubusercontent.com)

    OpenAI (GitHub) · Release notes · accessed Oct 8, 2026

  7. 7.
    tiktoken package metadata (PyPI JSON API) (external site: pypi.org)

    Python Package Index · Repository · accessed Oct 8, 2026

  8. 8.
    Exhibit 10.1: Equity commitment letter agreement between OpenAI Group PBC and Amazon (external site: sec.gov)

    U.S. Securities and Exchange Commission (Amazon.com, Inc. filing) · Filing · published Feb 27, 2026 · accessed Oct 8, 2026

Support Us

Help keep USASI useful.

Optional. No USASI account required. Payment takes place on the linked provider’s website (Buy Me a Coffee).

About supporting this project