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

# question-answering

> Answer questions based on a given context for applications like customer support, information retrieval, and educational tools



## OpenAPI

````yaml post /models/v2/deepset/roberta-base-squad2
openapi: 3.0.3
info:
  title: Open Source AI Models API – Multimodal
  description: >-
    API for running open-source AI models that take text, vision, audio, and
    video as input.
  version: 1.0.0
servers:
  - url: https://api.bytez.com
    description: Production server
security: []
paths:
  /models/v2/deepset/roberta-base-squad2:
    post:
      summary: question-answering
      description: >-
        Answer questions based on a given context for applications like customer
        support, information retrieval, and educational tools
      operationId: question-answering
      requestBody:
        description: Schema for question-answering models
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                question:
                  type: string
                  example: Who's the lead character?
                context:
                  type: string
                  example: Ron, the hero, looked at Greybeard and smote him asunder
              required:
                - question
                - context
      responses:
        '200':
          description: Successful question-answering response.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - output
                properties:
                  error:
                    type: string
                    nullable: true
                    description: Null on success; otherwise an error message.
                  output:
                    type: object
                    description: >-
                      Successful response with the answer, score, and start and
                      end indices
                    example:
                      score: 0.2002170979976654
                      start: 0
                      end: 3
                      answer: Ron
        '401':
          description: Auth error - check your api key and how you're sending it.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  output:
                    type: string
                    example: null
        '429':
          description: Too Many Requests – You have hit the rate limit.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Rate limit exceeded
                  output:
                    type: string
                    example: null
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: |
        Set `Authorization` header to `BYTEZ_KEY` 
        ``` 'Authorization: YOUR_BYTEZ_KEY_HERE' ```

````