ToolsCompaniesAbout

.txt API

by .txt@dottxtaiNo ratings yet

Structured outputs API that enforces JSON Schema, regex, and grammar constraints on LLM responses.

Visit dottxt.ai
Tool type
Structured-output API for LLMs
Made for
Developers and inference teams
Runs on
Hosted API and self-hosted servers
Calls go to api.dottxt.ai; self-hosting uses vLLM, SGLang, or TensorRT-LLM.
Last checked
29 Oct 2026
2 product sources

What it does

api.dottxt.ai accepts a prompt, a model name, and an output schema written as JSON Schema, a regular expression, or a context-free grammar, and returns model output that conforms to that schema. Because the constraint is applied during generation, callers receive output that matches the schema without retry loops or defensive parsing. The endpoint follows the OpenAI chat-completions request format, with the schema supplied in a response_format field.

Developers can call the endpoint through the dottxt Python package, the OpenAI Python client, the TypeScript AI SDK, or raw HTTP with a bearer key. The quickstart shows extracting a contact record with required name and email fields from free text. Teams already running vLLM, SGLang, or TensorRT-LLM can use dottxt as a drop-in replacement for those servers, and inference providers can build on the dotjson, dotgrammar, and dotlambda libraries.

This fits developers building pipelines that need predictable structured output from LLMs, and teams that self-host inference. Access begins with an API key requested through the quickstart. Schema validity is enforced, but the factual accuracy of extracted values is still the caller's responsibility.

What it can do

  • Constrains LLM output to a supplied JSON Schema
  • Supports regular expressions and context-free grammars as output constraints
  • OpenAI-compatible chat completions endpoint with a response_format schema field
  • Command-line generate command that returns schema-validated JSON
  • Drop-in replacement for vLLM, SGLang, and TensorRT-LLM inference servers
  • Function-calling output via the dotlambda library

Works with

  • vLLM
  • SGLang
  • TensorRT-LLM
  • OpenAI Python client
  • Vercel AI SDK (@ai-sdk/openai)

Example workflows

Extract a contact record from text
Input: free text such as 'John Smith <[email protected]>, VP Engineering' and a contact JSON schema with required name and email. Steps: install dottxt, set the API key, send the schema via the generate command or response_format. Output: a JSON object matching the schema.
Swap in constrained decoding on a self-hosted server
Input: an existing vLLM, SGLang, or TensorRT-LLM deployment. Steps: replace the inference server with the dottxt drop-in, keep the existing client code, send JSON-schema or grammar-constrained requests. Output: schema-conforming responses from the same serving stack.

Before you choose

  • Pricing is described as pay-per-token; unit rates, billing cadence and model-specific costs are not stated on the homepage.
  • Self-hosting requires an existing vLLM, SGLang, or TensorRT-LLM deployment; the drop-in path is not available on the hosted API alone.
  • Output validity is guaranteed against the schema, not the factual correctness of the extracted values.

Listed under

Get started

Request API access through the quickstart, then set DOTTXT_API_KEY.

  1. Request API access through the quickstart form, then create an API key.
  2. Install the dottxt package (pip install dottxt) and set DOTTXT_API_KEY in your environment.
  3. Define a JSON Schema or Pydantic model and run a first extraction with the generate command or the Python client.
Request API access and create a key

Plans and prices

The homepage describes pay-per-token billing; rates, units and plans are not listed there. Check https://dottxt.ai/pricing.

We couldn’t find published prices for .txt API. See their pricing page ↗

Sources for this overview

Product pages, documentation, and pricing checked 29 Oct 2026. Each source supports part of the overview; availability and prices can change.

Ratings and reviews

No ratings for .txt API yet.

Be the first to rate it

What’s changed

Free account

See what’s changed at .txt API

Launches, price moves and pivots, each with a date and a source. Free with an account.

Signals

Free account

See .txt API’s signals

Launch traction, hiring and release activity, tracked over time. Free with an account.

Data and security

Free account

See how .txt API handles your data

Training on your files, compliance, hosting and the models behind it. Free with an account.

Compare with similar tools

Free account

Compare .txt API side by side

Prices, platforms and features against similar tools, with sources. Free with an account.

Where this comes from

How we research
Company website
dottxt.ai: product, pricing and policy pages
YC directory mirror
Batch and company name
Social accounts
Accounts the company links, and its posts on X
Human review
Checked by a person
knowledge_base

Last checked 29 Oct 2026. Every field keeps its source and date; unknown means we couldn’t confirm it.