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

# Parse a message using the Rasa model

> Predicts the intent and entities of the message posted to this endpoint. No messages will be stored to a conversation and no action will be run. This will just retrieve the NLU parse results.



## OpenAPI

````yaml /openapi/pro.yaml post /model/parse
openapi: 3.0.1
info:
  title: Rasa - Server Endpoints
  version: 1.0.0
  description: >-
    The Rasa server provides endpoints to retrieve trackers of conversations as
    well as endpoints to modify them. Additionally, endpoints for training and
    testing models are provided.
servers:
  - url: http://localhost:5005
    description: Local development server
security: []
paths:
  /model/parse:
    post:
      tags:
        - Model
      summary: Parse a message using the Rasa model
      description: >-
        Predicts the intent and entities of the message posted to this endpoint.
        No messages will be stored to a conversation and no action will be run.
        This will just retrieve the NLU parse results.
      operationId: parseModelMessage
      parameters:
        - $ref: '#/components/parameters/emulation_mode'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  type: string
                  description: Message to be parsed
                  example: Hello, I am Rasa!
                message_id:
                  type: string
                  description: Optional ID for message to be parsed
                  example: b2831e73-1407-4ba0-a861-0f30a42a2a5a
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelParseResult'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401NotAuthenticated'
        '403':
          $ref: '#/components/responses/403NotAuthorized'
        '500':
          $ref: '#/components/responses/500ServerError'
      security:
        - TokenAuth: []
        - JWT: []
components:
  parameters:
    emulation_mode:
      in: query
      name: emulation_mode
      description: >-
        Specify the emulation mode to use. Emulation mode transforms the
        response JSON to the format expected by the service specified as the
        emulation_mode. Requests must still be sent in the regular Rasa format.
      example: LUIS
      schema:
        type: string
        enum:
          - WIT
          - LUIS
          - DIALOGFLOW
  schemas:
    ModelParseResult:
      type: object
      properties:
        entities:
          type: array
          description: Parsed entities
          items:
            $ref: '#/components/schemas/Entity'
        intent:
          $ref: '#/components/schemas/Intent'
        text:
          type: string
          description: Text of the message
          example: Hello!
        commands:
          type: array
          description: Commands to be executed
          items:
            $ref: '#/components/schemas/Command'
      description: >-
        NLU parser information. If set, message will not be passed through NLU,
        but instead this parsing information will be used.
      required:
        - text
    Entity:
      type: object
      description: Entities within a message
      properties:
        start:
          type: integer
          description: Char offset of the start
        end:
          type: integer
          description: Char offset of the end
        value:
          type: string
          description: Found value for entity
        entity:
          type: string
          description: Type of the entity
        confidence:
          type: number
      required:
        - start
        - end
        - value
        - entity
    Intent:
      type: object
      description: Intent of the text
      properties:
        confidence:
          type: number
          description: Confidence of the intent
          example: 0.6323
        name:
          type: string
          description: Intent name
          example: greet
      required:
        - confidence
        - name
    Command:
      anyOf:
        - $ref: '#/components/schemas/StartFlowCommand'
        - $ref: '#/components/schemas/CancelFlowCommand'
        - $ref: '#/components/schemas/ClarifyCommand'
        - $ref: '#/components/schemas/SetSlotCommand'
        - $ref: '#/components/schemas/ChitChatAnswerCommand'
        - $ref: '#/components/schemas/KnowledgeAnswerCommand'
        - $ref: '#/components/schemas/HumanHandoffCommand'
        - $ref: '#/components/schemas/SkipQuestionCommand'
    Error:
      type: object
      properties:
        version:
          type: string
          description: Rasa version
        status:
          type: string
          enum:
            - failure
          description: Status of the requested action
        message:
          type: string
          description: Error message
        reason:
          type: string
          description: Error category
        details:
          type: object
          description: Additional error information
        help:
          type: string
          description: Optional URL to additonal material
        code:
          type: number
          description: HTTP status code
    StartFlowCommand:
      allOf:
        - $ref: '#/components/schemas/BasicCommand'
        - type: object
          properties:
            command:
              enum:
                - start flow
              example: start flow
            flow:
              type: string
              description: Name of the flow to be started
              example: transfer_money
    CancelFlowCommand:
      allOf:
        - $ref: '#/components/schemas/BasicCommand'
        - type: object
          properties:
            command:
              enum:
                - cancel flow
              example: cancel flow
    ClarifyCommand:
      allOf:
        - $ref: '#/components/schemas/BasicCommand'
        - type: object
          properties:
            command:
              enum:
                - clarify
              example: clarify
            options:
              type: array
              items:
                type: string
    SetSlotCommand:
      allOf:
        - $ref: '#/components/schemas/BasicCommand'
        - type: object
          properties:
            command:
              enum:
                - set slot
              example: set slot
            name:
              type: string
              description: Name of the slot to be set
              example: name
            value:
              description: Value of the slot to be set
              example: John Doe
    ChitChatAnswerCommand:
      allOf:
        - $ref: '#/components/schemas/BasicCommand'
        - type: object
          properties:
            command:
              enum:
                - chitchat
              example: chitchat
    KnowledgeAnswerCommand:
      allOf:
        - $ref: '#/components/schemas/BasicCommand'
        - type: object
          properties:
            command:
              enum:
                - knowledge
              example: knowledge
    HumanHandoffCommand:
      allOf:
        - $ref: '#/components/schemas/BasicCommand'
        - type: object
          properties:
            command:
              enum:
                - human handoff
              example: human handoff
    SkipQuestionCommand:
      allOf:
        - $ref: '#/components/schemas/BasicCommand'
        - type: object
          properties:
            command:
              enum:
                - skip question
              example: skip question
    BasicCommand:
      type: object
      properties:
        command:
          type: string
          description: Command to be executed
          example: very basic
  responses:
    400BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            version: 1.0.0
            status: failure
            reason: BadRequest
            code: 400
    401NotAuthenticated:
      description: User is not authenticated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            version: 1.0.0
            status: failure
            reason: NotAuthenticated
            message: User is not authenticated to access resource.
            code: 401
    403NotAuthorized:
      description: User has insufficient permission.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            version: 1.0.0
            status: failure
            reason: NotAuthorized
            message: User has insufficient permission to access resource.
            code: 403
    500ServerError:
      description: An unexpected error occurred.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            version: 1.0.0
            status: ServerError
            message: An unexpected error occurred.
            code: 500
  securitySchemes:
    TokenAuth:
      type: apiKey
      in: query
      name: token
      description: >
        A plaintext token to secure your server, specified at startup in the
        argument `--auth-token thisismysecret`
    JWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        A JWT token that is signed using the JWT secret specified at startup in
        the argument `--jwt-secret thisismysecret`,

        using the `HS256` algorithm.


        The token's payload must contain an object under the `user` key,

        which in turn must contain the `username` and `role` attributes.

        The following is an example payload for a JWT token:


        ```json

        {
            "user": {
                "username": "<sender_id>",
                "role": "user"
            }
        }

        ```


        If the `role` is `admin`, all endpoints are accessible.

        If the `role` is `user`, endpoints with a `sender_id` parameter are only
        accessible

        if the `sender_id` matches the payload's `username` property.


        For the user trackers endpoint (`GET /users/{user_id}/trackers`), you
        should use `user_id` instead of `username` in the payload.

        In this case, the path `user_id` parameter is matched against the
        payload's `username` property. For example:


        ```json

        {
            "user": {
                "username": "<user_id>",
                "role": "user"
            }
        }

        ```

````