Now, you can successfuly fetch the API response. Next, you need to convert API response to doccano format with the mapping template.
{{ JSON.stringify(response, null, 4) }}
Text Classification
[{ "label": "Cat" }, ...]
Sequence Labeling
[{ "label": "Cat", "start_offset": 0, "end_offset": 5 }, ...]
Sequence to sequence
[{ "text": "Cat" }, ...]
You can set mapping template(Jinja2 format) to convert API response to doccano format. In the template, you can refer to the API response by the input variable. If you want to know the Jinja2 notation, please refer to the site.
{{ JSON.stringify(result, null, 4) }}