canonical: https://jentic.com/apis/cloud.ibm.com/ibm-cloud

# Cloud Ibm Natural Language Understanding

Jentic publishes the only available OpenAPI specification for Natural Language Understanding, keeping it validated and agent-ready. IBM Watson Natural Language Understanding analyses text, raw HTML, or a URL and returns structured features such as entities, keywords, concepts, categories, sentiment, emotion, syntax, semantic roles, and relations. The service strips advertisements and boilerplate from HTML before analysis and supports custom Watson Knowledge Studio models for domain-specific entity and relation extraction. Custom classification and categorisation models can be trained, listed, and deleted directly through the API.

## For AI agents

Extract entities, keywords, sentiment, emotion, categories, and relations from text or web pages, and manage custom classification models.

## Scope

Does not handle text generation, translation, or speech transcription - use for feature extraction and classification of existing text only.

## Capabilities

- Analyse free text, raw HTML, or a public URL for entities, keywords, sentiment, emotion, and concepts
- Detect categories and high-level topics in long-form content with the built-in taxonomy
- Extract semantic roles, syntax tokens, and relations between entities in a document
- Train and manage custom classification models for domain-specific labelling tasks
- Train and manage custom categorisation models that map text to a customer-defined hierarchy
- Score sentiment per entity, per keyword, or for the document as a whole
- List previously trained Watson Knowledge Studio models available to the account

## Use cases

### Brand and Entity Monitoring

Pull entities and sentiment out of news articles, blog posts, and social content to track how a brand is mentioned across the web. The `/v1/analyze` endpoint accepts a URL or raw HTML, removes ads and navigation, and returns extracted entities with confidence scores and per-entity sentiment, which is enough signal to drive a daily brand monitoring report. The same call returns concepts and keywords for thematic analysis.

Example prompt: Call POST `/v1/analyze` with a URL and features={entities, sentiment, keywords} and return the top 10 entities ranked by relevance

### Support Ticket Classification

Train a custom classification model on historical support tickets and route new tickets automatically by predicted label. The `/v1/models/classifications` endpoints handle the full lifecycle - create, list, retrieve, update, and delete a model - and the analyze endpoint applies the trained model at inference time. This replaces brittle keyword-rule routing with a model that adapts to the way customers actually phrase their issues.

Example prompt: Train a classifications model from a CSV of labelled tickets, then call `/v1/analyze` with classifications.model={model_id} on a new ticket

### Content Categorisation

Map articles or product descriptions onto a customer-defined hierarchy using a custom categorisation model. The `/v1/models/categories` endpoints expose model lifecycle calls, and analyze applies the model to new content with hierarchical category scores. This is useful for content management systems, ad targeting, and recommendation pipelines that need consistent topic labels.

Example prompt: Submit a labelled training set to POST `/v1/models/categories`, poll until the model is available, then run `/v1/analyze` with categories.model on new articles

### Voice-of-Customer Analytics

Run customer feedback, reviews, and survey responses through the analyze endpoint to extract emotion, sentiment, and the entities customers discuss most. Per-entity sentiment makes it possible to say 'shipping is rated negatively while product quality is rated positively' rather than reporting a single average score, which is the typical bar for a useful CX dashboard.

Example prompt: POST `/v1/analyze` with text=review and features={sentiment.targets, emotion, entities} and return per-target sentiment

### Agent-Driven Text Analysis via Jentic

AI agents that need text analytics can search Jentic for an intent like 'extract entities from text' and Jentic returns the IBM NLU analyze operation with its full input schema. The IAM API key lives in your Jentic One instance, so the agent receives a scoped credential per call and never logs the raw key. This collapses what is normally a multi-step IBM Cloud onboarding into a single search-load-execute pattern.

Example prompt: Search Jentic for 'analyse text for entities and sentiment', load the analyze operation, execute with the user's text, and return entities plus document sentiment

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1/analyze` | Analyse text, HTML, or URL for selected features |
| GET | `/v1/models` | List Watson Knowledge Studio models |
| POST | `/v1/models/categories` | Train a custom categorisation model |
| GET | `/v1/models/categories` | List categorisation models |
| POST | `/v1/models/classifications` | Train a custom classification model |
| GET | `/v1/models/classifications` | List classification models |
| DELETE | `/v1/models/{model_id}` | Delete a Watson Knowledge Studio model |

## Key resources

- **analyze** — Core endpoint for extracting features from text, HTML, or URL
- **models** — List Watson Knowledge Studio models attached to the instance
- **models/categories** — Lifecycle calls for custom categorisation models
- **models/classifications** — Lifecycle calls for custom classification models

## Why Jentic

- **Setup:** Wiring IBM Natural Language Understanding by hand means passing an IAM API key in the Authorization header, pinning the correct regional host such as the us-south Watson endpoint, mapping its analyze and model endpoints, and handling retries yourself. Through Jentic you install once, import the Natural Language Understanding API from the API Directory, store the IAM key once, and your agent calls it.
- **Permission scoping:** IBM NLU's analyze target and feature options travel in the request body rather than the URL path, so scope the agent to the operations it needs, such as analyzing text or listing models. You choose which operations are in that set, so deleting a custom model is not included unless you add it.
- **Credential handling:** Your IBM Cloud IAM API key is stored once, encrypted, by your own Jentic One instance, which injects a per-call scoped token in the Authorization header. The raw IAM key never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'extract entities from text' or 'classify a ticket', and Jentic returns the IBM NLU analyze operation with its full input schema, so the agent calls the right endpoint without browsing IBM's API reference.

## Related APIs

- **Cohere** — LLM-based text understanding API with classify, embed, and generate endpoints.
- **NLP Cloud** — Hosted NLP API offering NER, classification, sentiment, and summarisation across many models.
- **OpenAI** — General-purpose LLM API used alongside structured NLU for downstream summarisation and reasoning.

## FAQ

### Why is there no official OpenAPI spec for Natural Language Understanding?

IBM Cloud does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Natural Language Understanding 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 Natural Language Understanding API use?

The API uses IBM Cloud IAM, which is presented as an apiKey scheme in the Authorization header. Through Jentic, the IAM API key is stored encrypted in the vault and a scoped credential is issued per call so the raw key never enters the agent's context.

### Can I extract sentiment per entity with this API?

Yes. POST `/v1/analyze` accepts a sentiment.targets array or sentiment.document=true and returns sentiment scores both at the document level and per entity or keyword, which lets you separate signals like positive product feedback from negative shipping feedback in the same response.

### What are the rate limits for the Natural Language Understanding API?

Rate limits depend on the IBM Cloud plan. Lite plans cap usage at 30,000 NLU items per month and a small number of requests per second, while Standard and Premium plans raise both the throughput and the items-per-month allowance. Check the IBM Cloud plan page for the exact tier limits.

### How do I analyse a piece of text for entities and sentiment through Jentic?

Run pip install jentic, search for 'analyse text for entities and sentiment', load the analyze operation, then execute with text and features={entities, sentiment}. The call hits POST `/v1/analyze` and returns the structured analysis.

### Can I train custom models against this API?

Yes. The `/v1/models/classifications` and `/v1/models/categories` endpoints support full lifecycle management for custom classifiers and categorisers, and the trained model_id is then passed into `/v1/analyze` at inference time. Watson Knowledge Studio is the recommended path for custom entity and relation models.

### Can I limit what my agent is allowed to do with the Natural Language Understanding API?

Yes. Because you run Jentic One yourself, your own rules decide which Natural Language Understanding operations and credentials the agent may use. You can allow just the operations it needs, such as POST `/v1/analyze` to extract entities and sentiment or GET `/v1/models` to list trained models, and leave everything else out of the set. Since the analyze target and feature options travel in the request body rather than the URL path, destructive calls like DELETE `/v1/models/{model_id}` are never available to the agent unless you explicitly add them.
