canonical: https://jentic.com/apis/nlpcloud.io/nlp-cloud

# NLP Cloud API

Jentic publishes the only available OpenAPI specification for NLP Cloud API, keeping it validated and agent-ready. NLP Cloud serves pretrained and custom models for text generation, classification, summarization, paraphrasing, named entity recognition, embeddings, semantic search, speech-to-text, and image generation behind a uniform per-model REST surface. Each operation is parameterized by a model slug, so an agent can swap between models like dolphin, fine-tuned LLaMA variants, or custom fine-tunes without changing the call shape. Both general-purpose and language-specific models are exposed, with GDPR-compliant inference hosted in the EU and US.

## For AI agents

Run NLP and generative AI inference - text generation, classification, summarization, embeddings, ASR, and image generation - through a uniform per-model REST surface.

## Scope

Does not handle model training infrastructure, vector database hosting, or LLM evaluation tooling - use for hosted NLP and generative inference only.

## Capabilities

- Generate completions or chat responses from any selected model via /{model}/generation or /{model}/chatbot
- Classify text into custom labels and detect intents through /{model}/classification and /{model}/intent-classification
- Extract named entities, keywords, and dependencies from a passage in a single call
- Produce embeddings for semantic search and retrieve top-k matches from an in-request corpus
- Transcribe audio with /{model}/asr and synthesize speech with /{model}/speech-synthesis
- Run paraphrasing, grammar correction, summarization, and translation against the same per-model endpoint pattern

## Use cases

### Multilingual Content Pipeline

Marketing and support teams need to translate, summarize, and rewrite content across languages without standing up a separate model stack for each task. The NLP Cloud per-model endpoints expose translation, summarization, paraphrasing, and grammar correction as parallel calls so a single workflow can transform an English brief into French ad copy with a localized summary. EU-hosted models keep the data within GDPR boundaries.

Example prompt: Call /{model}/translation with source 'en', target 'fr' and the input text, then pass the result to /{model}/summarization to produce a 2-sentence French summary

### Semantic Search over Internal Docs

Building retrieval-augmented agents requires reliable embeddings and a fast classification step to route queries. The /{model}/embeddings endpoint produces vectors for documents and queries, while /{model}/semantic-search returns ranked matches over a passed-in corpus. Combined with /{model}/intent-classification, a customer-support agent can route a question to the right knowledge base before fetching the top passages.

Example prompt: Generate embeddings for a list of FAQ entries via /{model}/embeddings, then call /{model}/semantic-search with the user query and the corpus to return the top 3 matches

### Voice-Enabled Assistant

Voice-driven agents need both accurate transcription and natural-sounding playback. NLP Cloud's /{model}/asr endpoint transcribes audio and /{model}/speech-synthesis renders text to speech using selectable voice models. With the same auth and request shape, a single agent can capture user audio, transcribe, reason over the text, and reply in voice without integrating two vendors.

Example prompt: Send an audio URL to /{model}/asr, take the transcript and pass it to /{model}/generation to draft a reply, then call /{model}/speech-synthesis to render the reply

### AI Agent NLP Toolbelt

An LLM-powered agent often needs lightweight NLP tasks - entity extraction, language detection, classification - without invoking a full LLM call for each. Through Jentic, the agent searches for 'extract named entities from text', receives the NLP Cloud operation schema, and runs it as a fast, deterministic step in its toolchain. The bearer token stays in your Jentic One instance and never enters the agent's context.

Example prompt: Use Jentic to call /{model}/entities with a customer email body and parse the returned entity spans into a structured ticket

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/{model}/generation` | Generate text from a prompt with the selected model |
| POST | `/{model}/chatbot` | Run a chat-style turn with conversation history |
| POST | `/{model}/embeddings` | Generate vector embeddings for input text |
| POST | `/{model}/semantic-search` | Rank a passed-in corpus against a query |
| POST | `/{model}/entities` | Extract named entities from text |
| POST | `/{model}/translation` | Translate text between supported languages |
| POST | `/{model}/asr` | Transcribe audio to text |
| POST | `/{model}/speech-synthesis` | Synthesize speech audio from text |

## Key resources

- **Generation** — Run text and code generation against a selected model
- **Classification** — Zero-shot and intent classification with custom labels
- **Embeddings and Semantic Search** — Vectorize text and retrieve top-k matches over a passed-in corpus
- **Translation and Language Detection** — Translate between supported languages and detect source language
- **Speech** — Audio transcription and speech synthesis under per-model endpoints
- **Image Generation** — Render images from text prompts via /{model}/image-generation

## Why Jentic

- **Setup:** Wiring NLP Cloud by hand means handling its bearer auth, selecting the model in each path (https://api.nlpcloud.io/v1/{model}/...), and shaping each inference request yourself. Through Jentic you install once, import the NLP Cloud API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** NLP Cloud selects the model in the path but sends the work through the request body, so scope by operation: limit the agent to the operations it needs, such as text generation, embeddings, or translation, and leave out speech synthesis or transcription unless you add them. You choose the operations it may call.
- **Credential handling:** Your NLP Cloud token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'generate text with a model' or 'create embeddings for a passage', and Jentic returns the matching NLP Cloud operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **OpenAI API** — OpenAI offers a broader frontier-model lineup but with US-only inference and a different request shape per capability.
- **Cohere API** — Cohere provides production-grade generation, embeddings, and rerank with a focus on enterprise English workloads.
- **Hugging Face Inference API** — Hugging Face exposes the full Hub model catalog for ad-hoc inference and dataset access.

## FAQ

### Why is there no official OpenAPI spec for NLP Cloud API?

NLP Cloud does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call NLP Cloud API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the NLP Cloud API use?

NLP Cloud uses HTTP bearer authentication. Pass your API token from the NLP Cloud dashboard in the Authorization header as 'Bearer <token>'. Through Jentic the token sits encrypted in the vault and the agent receives only a scoped reference.

### Can I run a custom fine-tuned model with the NLP Cloud API?

Yes. Every endpoint is parameterized by a {model} path segment. Pass the slug of your fine-tuned model (for example a custom LLaMA variant) and the request shape stays identical to the pretrained equivalent.

### What are the rate limits for the NLP Cloud API?

Limits depend on the subscribed plan and selected model - typically tens to hundreds of requests per minute. The spec does not declare hard limits; check the NLP Cloud pricing page for current per-plan numbers, and Jentic will surface 429 responses with backoff.

### How do I generate text with the NLP Cloud API through Jentic?

Run pip install jentic, then search Jentic for 'generate text from a prompt'. Jentic returns the /{model}/generation operation; load the schema, fill in the model slug and prompt, and execute. The bearer token is injected by Jentic at call time.

### Does NLP Cloud support image generation?

Yes. The /{model}/image-generation endpoint accepts a prompt and returns generated images using the selected image model. Use it alongside text-to-text endpoints in the same workflow without changing auth or request structure.

### Can I limit what my agent is allowed to do with the NLP Cloud API?

Yes. Because you self-host Jentic One, your own rules decide which NLP Cloud operations and credentials the agent may use. Since NLP Cloud selects the model in the path but carries the actual work in the request body, you scope by operation: allow only the endpoints the agent needs, such as text generation, embeddings, or translation, and leave out speech synthesis or transcription unless you add them. The agent can call only the operations you have permitted.
