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
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"]
}
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.
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.
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.
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.
Experiments
Compare models, prompts, schemas and parameters against the same test data before you ship.
Queues
Route traces, spans and experiment results to human reviewers and record their scores against your own rubrics.