POST
/
v1
/
categorize
curl --request POST \
  --url https://api.wetrocloud.com/v1/categorize/ \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'resource=match review: John Cena vs. The Rock are fighting' \
  --form type=text \
  --form 'json_schema={"label":"string" }' \
  --form 'categories=["football", "coding", "entertainment", "basketball", "wrestling", "information"]
' \
  --form 'prompt=where does this fall under?'
{
  "response": {
    "label": "wrestling"
  },
  "tokens": 1746,
  "success": true
}

Authorizations

Authorization
string
header
required

Body

multipart/form-data
resource
string
Example:

"match review: John Cena vs. The Rock are fighting"

type
string
Example:

"text"

json_schema
string
Example:

"{\"label\":\"string\" }"

categories
string
Example:

"[\"football\", \"coding\", \"entertainment\", \"basketball\", \"wrestling\", \"information\"]\n"

prompt
string
Example:

"where does this fall under?"

Response

200
application/json
OK

The response is of type object.