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

# Grade Practice



## OpenAPI

````yaml openapis/interactives.json post /v1/interactives/practice/grade
openapi: 3.1.0
info:
  title: Interactive Routes
  version: 0.0.1
servers:
  - url: https://api.opennote.com
security: []
paths:
  /v1/interactives/practice/grade:
    post:
      summary: Grade Practice
      operationId: grade_practice_interactives_practice_grade_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GradeFRQRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GradeFRQResponse'
        '401':
          description: Invalid API key or unauthorized access
        '402':
          description: Insufficient credits
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying
              schema:
                type: integer
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                type: object
        '500':
          description: Internal server error
      security:
        - HTTPBearer: []
components:
  schemas:
    GradeFRQRequest:
      properties:
        problem:
          $ref: '#/components/schemas/PracticeProblem'
          description: The practice problem to grade
      type: object
      required:
        - problem
      title: GradeFRQRequest
    GradeFRQResponse:
      properties:
        success:
          type: boolean
          title: Success
        timestamp:
          type: string
          title: Timestamp
        score:
          type: integer
          title: Score
        explanation:
          type: string
          title: Explanation
        max_score:
          type: integer
          title: Max Score
        percentage:
          type: number
          title: Percentage
      type: object
      required:
        - success
        - timestamp
        - score
        - explanation
        - max_score
        - percentage
      title: GradeFRQResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PracticeProblem:
      properties:
        problem_type:
          type: string
          enum:
            - mcq
            - frq
            - selectall
          title: Problem Type
        problem_statement:
          type: string
          title: Problem Statement
        correct_answer:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Correct Answer
        difficulty:
          type: string
          enum:
            - easy
            - medium
            - hard
          title: Difficulty
          default: medium
        answer_choices:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Answer Choices
        explanation:
          anyOf:
            - type: string
            - type: 'null'
          title: Explanation
        scoring_details:
          anyOf:
            - type: string
            - type: 'null'
          title: Scoring Details
        include_graph:
          type: boolean
          title: Include Graph
          default: false
        graph_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Graph Description
        graph_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Graph Url
        user_answer:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: User Answer
      type: object
      required:
        - problem_type
        - problem_statement
      title: PracticeProblem
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````