Endpoint
POST /v3/universal-ai (sync)
Model string pattern: text/named_entity_recognition/{provider}[/{model}]
Input
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | Yes | Text to analyze for named entities |
| language | string | No | ISO 639-1 language code |
Output
| Field | Type | Required | Description |
|---|---|---|---|
| items | array[object] | No | |
| entity | string | Yes | |
| category | string | Yes | |
| importance | float | Yes |
Available Providers
| Provider | Model String | Price |
|---|---|---|
| amazon | text/named_entity_recognition/amazon | $1 per 1,000,000 chars |
| microsoft | text/named_entity_recognition/microsoft | $1 per 1,000,000 chars |
| openai | text/named_entity_recognition/openai | $40 per 1,000,000 chars |
| openai (gpt-4o) | text/named_entity_recognition/openai/gpt-4o | $10 per 1,000,000 tokens |
| tenstorrent | text/named_entity_recognition/tenstorrent | $1 per 1,000,000 chars |
Quick Start
import requests
url = "https://api.edenai.run/v3/universal-ai"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"model": "text/named_entity_recognition/amazon",
"input": {
"text": "The quick brown fox jumps over the lazy dog.",
"language": "en"
}
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
curl -X POST https://api.edenai.run/v3/universal-ai \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "text/named_entity_recognition/amazon",
"input": {"text": "The quick brown fox jumps over the lazy dog.", "language": "en"}
}'