2kw.ai Documentation

One API for multiple AI providers, structured data extraction, agents with tools and knowledge bases, prompt management, and document conversion. Go from zero to your first extraction in under five minutes.

Quick Start

1

Define a schema

Create a schema — a standard JSON Schema describing the fields you want to extract:

{
  "type": "object",
  "properties": {
    "name": { "type": "string" },
    "email": { "type": "string", "format": "email" },
    "phone": { "type": "string" }
  },
  "required": ["name"]
}
2

Commit and label

Hit Commit to lock in an immutable version. The latest label updates automatically — create custom labels like production to pin versions for consumers.

3

Extract

curl -X POST https://api.2kw.ai/v1/extractions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk_your_api_key" \
  -d '{
    "schemaId": "your-schema-id",
    "inputText": "Contact: John Doe, john@example.com, 555-1234",
    "model": "gpt-5.1"
  }'

Response:

{
  "status": "COMPLETED",
  "result": {
    "structuredOutput": {
      "name": "John Doe",
      "email": "john@example.com",
      "phone": "555-1234"
    }
  }
}

Schema in, structured data out. See the full Data Extraction docs for async processing, chunking strategies, and more.

Building an assistant instead? Quickstart: your first agent goes from signup to a first agent conversation in the API and the chat app.

Guides

Your First Agent

From signup to a first agent conversation in about ten minutes.

Read more

API Keys

Create and manage authentication tokens for the API.

Read more

AI Gateway

Route requests to any provider with the OpenAI SDK.

Read more

Data Extraction

Schema versioning, async processing, and extraction strategies.

Read more

CLI

Manage schemas, prompts, and extractions from the terminal.

Read more

Resources

Usage & Rate Card

What 1x, 5x and 10x cover, worked examples per model, and the price of every token, page and minute.

AI Gateway

One API, any provider. Use the OpenAI SDK you already know — 2kw.ai routes to the right backend.

Providers & BYOK

Connect your own OpenAI, Azure OpenAI, Anthropic, xAI, Mistral or Ollama account and call it through the gateway.

Data Extraction

Define a JSON schema, feed in any text or document, and get back validated structured output.

Document Conversion

Turn PDFs, Word docs, emails, and images into clean text ready for extraction.

Prompts

Version-controlled prompt templates with variables, labels, and built-in testing.

Agents

Versioned assistants with server-side tools, knowledge search, citations and human approval, run through the Responses API.

Chat App

Talk to your published agents at chat.2kw.ai, with attachments, citations and tool approvals.

Skills

Versioned SKILL.md bundles an agent loads on demand, pinned per run.

Files

Upload files once through the OpenAI-compatible Files API and attach them to an agent turn.

Knowledge

Upload documents and get hybrid semantic and keyword search with durable citations.

Embeddable Surface

Put an agent into your own web application as a chat panel with one script tag.

Transcription

Turn audio into text, JSON, SRT or VTT through an OpenAI-compatible endpoint.

Datasets

Versioned test data you run experiments against, so past results stay reproducible.

Experiments

Compare models, prompts, schemas and parameters against the same test data before you ship.

Evaluators

Turn experiment outputs into comparable scores per item and per variant.

Queues

Route traces, spans and experiment results to human reviewers and record their scores against your own rubrics.

Observability

Send OpenTelemetry traces and see your own spans next to every 2kw.ai call.

MCP Server

Give Claude Code, Cursor, Codex and other MCP clients direct access to the platform.

n8n

Run extractions, prompts, conversions and agents from n8n workflows with the 2kw community node.

Was this page helpful?