> ## Documentation Index
> Fetch the complete documentation index at: https://docs.norns.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Post sentiment

> Analyzes sentiment and emotions in text. Costs 1 credit per request.



## OpenAPI

````yaml api-reference/openapi.json post /sentiment
openapi: 3.0.1
info:
  title: Norns AI API
  description: API documentation for Norns AI services
  version: 1.0.0
servers:
  - url: https://www.norns.ai/api/v0
    description: Production server
security:
  - bearerAuth: []
paths:
  /sentiment:
    post:
      description: Analyzes sentiment and emotions in text. Costs 1 credit per request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SentimentRequest'
      responses:
        '200':
          description: Successful sentiment analysis response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SentimentResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SentimentRequest:
      type: object
      required:
        - text
      properties:
        text:
          type: string
          description: Text to analyze for sentiment
    SentimentResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: object
          properties:
            sentiment:
              type: string
              description: Overall sentiment (positive, negative, or neutral)
              enum:
                - positive
                - negative
                - neutral
            score:
              type: number
              description: Sentiment score from -1.0 (very negative) to 1.0 (very positive)
              minimum: -1
              maximum: 1
            emotions:
              type: array
              items:
                type: string
              description: Array of detected emotions
            dominantEmotion:
              type: string
              description: The strongest emotion detected
            confidence:
              type: number
              description: Confidence score of the analysis (0.0 to 1.0)
              minimum: 0
              maximum: 1
            usage:
              type: integer
              description: Number of credits consumed
            tokenCount:
              type: integer
              description: Number of tokens processed
    Error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key authentication

````