post
https://api.hrflow.ai/v1/text/tagging
Predict the most likely tags for one or several texts with one of your Tagging Algorithms, or against an ad-hoc list of labels.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Prerequisites
- ✨ Create a Workspace
- 🔑 Get your API Key
- 🧠 Activate Text Tagging API
Batch Mode with 'texts' parameter
- Batch size = lenght(texts) should be < 32 (and a multiple of 2 for an optimum speed).
The algorithm_key selects the tagger:
- the
algorithm_keyof a Tagging Algorithm of your workspace, created in AI Studio > My Tagging Algorithms on a taxonomy you forked from HrFlow.ai or France Travail (ROME 4.0, skills, seniority, degree, contract type) or created yourself. See the Tagging API guide; tagger-hrflow-dynamic, the dynamic tagger, which classifies texts against the labels given indynamic_labelswithout any taxonomy.
Headers
| Header | Value |
|---|---|
Content-Type | application/json |
X-API-KEY | Your API Key |
X-USER-EMAIL | Your HrFlow.ai account email |
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
algorithm_key | string | Yes | The algorithm_key of one of your Tagging Algorithms, or tagger-hrflow-dynamic. |
texts | array of strings | Yes | The texts to tag: the full text of a job, a resume, a profile, a work experience, and more. Maximum 32 texts per request. |
top_n | integer | No | Number of predicted tags returned per text. Defaults to 1. With tagger-hrflow-dynamic, it cannot exceed the number of labels. |
dynamic_labels | array of strings | Only with tagger-hrflow-dynamic | The labels to choose from, up to 32. |
dynamic_context | string | No | With tagger-hrflow-dynamic, a text that explains the labels to the model. |
Response
Success
data contains one object per input text, in the same order as texts. Inside each object, the three lists are synchronized: the n-th prediction goes with the n-th tag and the n-th id.
| Field | Type | Description |
|---|---|---|
code | integer | HTTP status code |
message | string | Response message |
data[].predictions | array of numbers | Prediction scores between 0 and 1, sorted in descending order |
data[].tags | array of strings | The label of the predicted tags, in the language of the taxonomy. For the dynamic tagger, the label itself. |
data[].ids | array of strings | The value of the predicted tags (for a fork of a ROME taxonomy, the ROME 4.0 code). For the dynamic tagger, the position of the label in dynamic_labels. |
Error
| Field | Type | Description |
|---|---|---|
code | integer | HTTP error code |
message | string | Error description |
Common causes:
textsis missing or empty, or contains more than 32 texts.algorithm_keydoes not match a Tagging Algorithm of your workspace:Bad request. Invalid algorithm key: ...top_nis lower than 1, or higher than the number of labels withtagger-hrflow-dynamic:Bad request. topN must be greater than 0.- The Tagging Algorithm has not been deployed yet, or its taxonomy has no tags.