> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.emtelligent.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emtelligent.com/_mcp/server.

# Quickstart Code Example

This page submits one document with the Python SDK and reads the coded entities
out of the result. It is the shortest path from an API key to structured output;
the [Quickstart](/nlp/python/quickstart) covers the same ground from the command
line, and [Building your own client](/nlp/python/building-a-client) goes deeper.

Create an API key with the `nlp:process` scope on the
[emtelligent platform](/platform/api-keys), then install the SDK and set the key
in the environment:

```bash
pip install emtellipro
export EMTELLIPRO_API_KEY='...'
```

## Create a client

The SDK takes the server URL and your credentials. A single string is an API
key; a `(access key, shared secret)` tuple selects
[HMAC authentication](/nlp/reference/hmac-authentication) instead.

> **Warning**
>
> Pass the server URL explicitly, as below. `Emtellipro.DEFAULT_SERVER` names
> `https://nlp.emtelligent.com` in the SDK source, but 7.2.0 — the current
> release — still compiles in `https://api.us.emtelligent.com`. That host
> answers, so the default works either way; passing the URL is how you know
> which one you got.

```python
import os

from emtellipro import Emtellipro

client = Emtellipro(
    "https://nlp.emtelligent.com",
    os.environ["EMTELLIPRO_API_KEY"],
)
```

## Submit a document

Every document needs an `id` unique within the submission, plus a `category` and
`subcategory` — these are validated against the sets the engine accepts, so they
are not free text.

```python
from emtellipro.data import InputDocument

doc = InputDocument(
    "doc-1",
    "Clinical",
    "generic",
    "The 2.4 cm melanoma on his left shin has become larger since 2 months ago.",
)

future = client.submit([doc])
```

`submit` returns immediately with a `ResultFuture`. Passing `features=` narrows
what the engine computes; the default is every feature.

## Wait for the result

```python
future.done(timeout=300)
result = future.result()
```

## Read the entities

A `Result` holds `annotated_docs`, one per document you submitted. Each found
entity carries the text it matched, its assertion attributes, and the concepts it
resolved to — which is how one mention maps into several ontologies at once.

```python
for annotated_doc in result.annotated_docs:
    for entity in annotated_doc.found_entities:
        print(entity.text, entity.polarity, entity.section_name)
```

> **Tip**
>
> The shape of what comes back — how `concept_links` and `locations` resolve — is
> laid out with a real payload on the
> [JSON Result Format](/nlp/reference/result-format) page.

## The whole thing

**`nlp_quickstart.py`**

```python title="nlp_quickstart.py"
import os

from emtellipro import Emtellipro
from emtellipro.data import InputDocument

client = Emtellipro(
    "https://nlp.emtelligent.com",
    os.environ["EMTELLIPRO_API_KEY"],
)

doc = InputDocument(
    "doc-1",
    "Clinical",
    "generic",
    "The 2.4 cm melanoma on his left shin has become larger since 2 months ago.",
)

future = client.submit([doc])
future.done(timeout=300)
result = future.result()

for annotated_doc in result.annotated_docs:
    for entity in annotated_doc.found_entities:
        print(entity.text, entity.polarity, entity.section_name)
```

## Next

#### [JSON Result Format](/nlp/reference/result-format)

Every field in the result, with a real example.

#### [Building your own client](/nlp/python/building-a-client)

Batching, retries, and reading results at scale.