canonical: https://jentic.com/apis/pinn.ai/pinn-ai

# Pinn AI API

Pinn AI provides conversational AI infrastructure for building voice and chat assistants with natural language understanding, speech synthesis, multi-turn dialogue management, and knowledge base integration. The API exposes endpoints for intent recognition, entity extraction, dialogue state tracking, response generation, voice synthesis, and conversation analytics. Built for developers creating customer service bots, virtual assistants, voice-enabled applications, and AI-powered support systems.

## For AI agents

Build conversational AI applications with intent recognition, entity extraction, dialogue management, and voice synthesis. Supports 45 endpoints covering NLU, conversation flows, knowledge bases, and analytics.

## Scope

Does not provide automatic speech recognition (ASR) input, video understanding, or image generation - use for text-based NLU, dialogue management, and text-to-speech output only.

## Capabilities

- Process natural language input with intent classification and entity extraction across multiple languages
- Manage multi-turn conversations with context retention and dialogue state tracking
- Generate contextual responses from knowledge bases, APIs, and custom content sources
- Synthesize natural-sounding speech in multiple voices and languages with SSML support
- Train and deploy custom NLU models with domain-specific intents and entities
- Integrate external knowledge bases, FAQs, and documentation for retrieval-augmented responses
- Track conversation analytics including intent confidence, user satisfaction, and conversation flows

## Use cases

### AI-Powered Customer Support Bot

Build intelligent customer support bots that understand user questions, retrieve answers from knowledge bases, and escalate to human agents when needed. The API provides intent recognition to route queries, entity extraction to capture customer details, and knowledge base search to find relevant help articles. Conversation analytics track resolution rates and common issues for continuous improvement.

Example prompt: Process incoming customer message 'I need to reset my password for account #12345', extract intent (password_reset) and entities (account_number: 12345), retrieve relevant help article from knowledge base, and generate a response with reset instructions

### Voice-Enabled Virtual Assistant

Create voice assistants for mobile apps, smart speakers, or IVR systems with speech recognition, natural language understanding, and text-to-speech synthesis. The API handles multi-turn dialogue flows with context retention, allowing assistants to ask clarifying questions, remember user preferences, and complete complex tasks across multiple interactions. SSML support enables natural prosody and emphasis in speech output.

Example prompt: Start a voice conversation for 'Book a flight to New York', extract entities (destination: New York), prompt for date and passenger count across multiple turns while maintaining context, then synthesize speech response with flight options

### Domain-Specific NLU Training

Train custom natural language understanding models for specialized domains like healthcare, finance, legal, or technical support. The API supports uploading training data with domain-specific intents, entities, and example utterances, then deploying the trained model for inference. Models can be versioned, A/B tested, and continuously improved based on production traffic.

Example prompt: Upload training data with 50 intents covering medical appointment scheduling, train a new NLU model, deploy it to staging environment, and test with sample patient queries

### Conversational Analytics and Optimization

Analyze conversation patterns, intent confidence scores, user satisfaction, and drop-off points to optimize dialogue flows and improve bot performance. The API provides conversation transcripts, intent distribution, entity extraction accuracy, and response time metrics. Teams can identify common intents that lack good responses, detect confusion patterns, and measure bot-to-human handoff rates.

Example prompt: Retrieve conversation analytics for the last 7 days, identify intents with confidence scores below 70%, find conversations with user dissatisfaction signals, and export data for model retraining

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1/conversations` | Create a new conversation session |
| POST | `/v1/conversations/{id}/messages` | Process user message and get response |
| POST | `/v1/nlu/predict` | Extract intent and entities from text |
| POST | `/v1/knowledge/search` | Query knowledge base for relevant content |
| POST | `/v1/tts/synthesize` | Synthesize speech from text |
| POST | `/v1/models/train` | Train a custom NLU model |
| GET | `/v1/analytics/conversations` | Retrieve conversation analytics |

## Key resources

- **Conversations** — Manage conversation sessions with context persistence and state tracking
- **Intents** — Define and recognize user intents with confidence scoring
- **Entities** — Extract structured data from user input (dates, numbers, names, locations)
- **Knowledge Bases** — Upload and query knowledge base content for response generation
- **NLU Models** — Train and deploy custom natural language understanding models
- **Speech Synthesis** — Convert text responses to natural speech with SSML support
- **Analytics** — Track conversation metrics, intent distribution, and user satisfaction

## Why Jentic

- **Setup:** Wiring Pinn AI by hand means managing its bearer token, sequencing conversation and message calls, and handling retries yourself. Through Jentic you install once, import Pinn AI from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** You limit the agent to the operations it needs, such as creating a conversation, posting a message, or synthesizing speech. Because you choose the allowed operations, training a model or reading analytics stays out of scope unless you add it.
- **Credential handling:** Your Pinn AI bearer token is stored once, encrypted, by your own Jentic One instance and injected as an Authorization header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'recognize the intent in a user message' or 'synthesize speech from text', and Jentic returns the matching Pinn AI operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **OpenAI Chat API** — General-purpose LLM chat interface with broader capabilities but less conversational structure
- **Dialogflow API** — Google's conversational AI platform for building chatbots and voice agents, an alternative to Pinn AI for natural language understanding.

## FAQ

### What authentication does the Pinn AI API use?

The API uses bearer token authentication with API keys created in the Pinn AI dashboard. Each request includes an Authorization: Bearer {token} header. Through Jentic, bearer tokens are stored encrypted and injected automatically - they never appear in agent prompts or conversation logs.

### Can I train custom intent recognition models?

Yes. POST `/v1/models/train` accepts training data in JSON format with intents, entities, and example utterances. The API trains a model specific to your domain and deploys it to a model ID for inference. You can version models, run A/B tests, and retrain based on production feedback.

### What languages does Pinn AI support?

Pinn AI supports 30+ languages for NLU including English, Spanish, French, German, Portuguese, Italian, Dutch, Chinese, Japanese, and Korean. Speech synthesis is available in 20+ languages with multiple voice options per language. Language is specified per conversation or inference request.

### What are the rate limits?

Standard plans have 1000 NLU requests per minute and 500 TTS requests per minute. Enterprise plans offer higher limits and dedicated infrastructure. Rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining) are returned in all responses.

### How does Pinn AI handle conversation context?

Each conversation session (POST `/v1/conversations`) maintains context across multiple messages. The API tracks dialogue state, previous intents, extracted entities, and user preferences. Context is retained for the session duration (default 30 minutes of inactivity) or until explicitly cleared.

### Is there a free tier?

Yes. Pinn AI offers a free Developer plan with 10,000 NLU requests and 5,000 TTS requests per month. Paid plans start at $99/month for production use with higher limits, custom model training, and premium voices.

### Can I limit what my agent is allowed to do with the Pinn AI API?

Yes. Because Jentic One is self-hosted, you set the rules that decide which Pinn AI operations and credentials your agent can use. You can allow only the operations it needs, such as creating a conversation, posting a message, or synthesizing speech from text, while keeping operations like training a custom NLU model or reading conversation analytics out of scope. Anything you do not explicitly allow stays unavailable to the agent.
