Topics

Create Topics

Setup a job for topic extraction


POST /topics/create

ParameterTypeDataTypeDescription
contentquerystringThe raw text to summarize (max: 50K characters)
doc_idqueryintegerA doc ID to process (from content previously proviced)
model_idqueryintegerA model ID to process - (list models)
model_parametersquerystringParameters specific to model_id ( more details )

Response

{
    "request_type": "topics",
	"request_id": 12345,
	"doc_id": 12345
}

Code Samples

Bash

curl --request POST \
  --url 'https://premium.aiera.com/api/nlu-v1/topics/create' \
  --header 'X-API-Key: xxx'
  --data '{
    "doc_id": 12345,
    "model_id": 3,
    "model_parameters": {
        "temperature": 0.2
    }
}'

Python - request using doc_id, model_id and model_parameters

import requests
requests.request(
    "POST", 
    "https://premium.aiera.com/api/nlu/v1.0/topics/create", 
    headers={"X-API-Key": "xxx"},
    json={
        "doc_id":12345,
        "model_id":3,
        "model_parameters":{
            "temperature":0.2
        }
    },
)

Python - request using content, model_id and model_parameters

import requests
requests.request(
    "POST", 
    "https://premium.aiera.com/api/nlu-v1/topics/create", 
    headers={"X-API-Key": "xxx"}
    json={
        "content":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer vulputate iaculis leo in fermentum. Etiam odio arcu, feugiat consectetur placerat faucibus, sollicitudin ut odio. Proin et tempus odio, ac porttitor augue. Sed vel enim mi. Maecenas quam ante, tincidunt a tortor ac, fermentum volutpat nisi. Maecenas quis congue mi, at euismod sem. Praesent vitae consectetur dui, ac accumsan magna. Fusce placerat velit dui, in volutpat dolor maximus ac. Donec sed massa finibus nunc viverra efficitur. Donec eu pulvinar metus.",
        "model_id":3,
        "model_parameters":{
            "temperature":0.2
        }
    },
)
Previous
Get Summary