Annotate text

    Annotate text with language corrections and semantic tags. Useful for processing colloquial transcriptions.

    Request Body

    ParameterTypeRequiredDescription
    modelvalsea-annotateYesModel name. Always valsea-annotate.
    textstringYesText to annotate.
    response_formatjson | verbose_jsonNoDefault: json
    languagestringNoOptional language hint (e.g. "singlish").
    enable_correctionbooleanNoEnable language/grammar correction.
    enable_tagsbooleanNoEnable semantic tagging.

    Code Examples

    curl -X POST https://api.valsea.ai/v1/annotations \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "valsea-annotate",
        "text": "Hello, world"
      }'
    

    Response

    Minimal (json)

    FieldTypeDescription
    textstringThe annotated (optionally corrected) text.
    annotationsarrayDetected tag spans, each with start, end, tag, and phrase (non-overlapping).

    Verbose (verbose_json)

    FieldTypeDescription
    textstringThe annotated (optionally corrected) text.
    raw_textstringThe original input text, before correction.
    accent_correctionsarrayCorrections applied to the text. Present only when corrections are generated.
    semantic_tagsarrayThe semantic tags found in the text, each with its tag, phrase, and meaning.
    annotated_textstringThe input text with the detected phrases marked up with their tags.
    annotationsarrayThe detected phrases, each with its position (start/end), tag, and phrase.

    Errors

    StatusDescription
    400Invalid request — missing/empty text, or unsupported model
    401Missing or invalid API key
    402Insufficient credits

    Was this page helpful?