API Codex
Text Analysis API

Schemas


Error

  • errorstring · required

    Error message

HealthResponse

  • messagestring · required
    Example: OK

Detection

  • valuestring · required

    Detected value

  • positioninteger

    Position of detection in the text

ModeratedDetection

  • valuestring · required

    Detected value

  • positioninteger

    Position of detection in the text

  • flagsstring[]

    Moderation flags

DetectionResults

  • successboolean · required

    Whether the detection was successful

  • analyzed_atstring · date-time · required

    Timestamp of the analysis

  • detectionsobject · required
  • countinteger · required

    Total number of detections

NLPAnalysisResults

  • languagesstring[]

    Languages detected in the text, with the primary language first

  • entitiesobject
  • topicsstring[]

    Key topics or themes in the text

  • categoriesstring[]

    Categories the text belongs to

  • keywordsstring[]

    Important keywords or key phrases in the text

  • summarystring

    A very brief 1-2 sentence summary of the text content

  • sentimentstring · enum

    The overall sentiment of the text

    Enum values:
    positive
    negative
    neutral
    mixed
  • moderationobject