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

# Read a reward



## OpenAPI

````yaml /openapi.json get /v1/rewards/{reward_id}
openapi: 3.1.0
info:
  title: AICME API
  version: v1
servers:
  - url: https://api.aicmelabs.com
security: []
paths:
  /v1/rewards/{reward_id}:
    get:
      summary: Read a reward
      operationId: read_reward_v1_rewards__reward_id__get
      parameters:
        - in: path
          name: reward_id
          required: true
          schema:
            title: Reward Id
            type: string
        - in: header
          name: prefer
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Prefer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RewardOut'
          description: Successful Response
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RewardOut'
          description: Still pending at the end of the wait
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Service Unavailable
components:
  schemas:
    RewardOut:
      properties:
        client_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Ref
        created_at:
          format: date-time
          title: Created At
          type: string
        episode_id:
          title: Episode Id
          type: 'null'
        failure:
          anyOf:
            - $ref: '#/components/schemas/FailureOut'
            - type: 'null'
        flags:
          items:
            type: string
          title: Flags
          type: array
        id:
          title: Id
          type: string
        judge_version:
          title: Judge Version
          type: string
        object:
          const: reward
          default: reward
          title: Object
          type: string
        scored_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Scored At
        scores:
          anyOf:
            - $ref: '#/components/schemas/ScoresOut'
            - type: 'null'
        status:
          enum:
            - pending
            - scored
            - failed
          title: Status
          type: string
          x-open-enum: false
        task:
          $ref: '#/components/schemas/TaskOut'
      required:
        - id
        - status
        - task
        - judge_version
        - scores
        - flags
        - failure
        - client_ref
        - created_at
        - scored_at
      title: RewardOut
      type: object
    Error:
      description: >-
        What every error response is: `{"error": {...}}`. Routes declare it for
        their errors.
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
      required:
        - error
      title: Error
      type: object
    FailureOut:
      properties:
        reason:
          enum:
            - judge_error
            - infra
          title: Reason
          type: string
          x-open-enum: true
        retryable:
          title: Retryable
          type: boolean
      required:
        - reason
        - retryable
      title: FailureOut
      type: object
    ScoresOut:
      properties:
        all_pass:
          title: All Pass
          type: number
        must_pass:
          title: Must Pass
          type: number
        partial:
          title: Partial
          type: number
        reward:
          title: Reward
          type: number
      required:
        - reward
        - partial
        - must_pass
        - all_pass
      title: ScoresOut
      type: object
    TaskOut:
      properties:
        id:
          title: Id
          type: string
        version:
          title: Version
          type: string
      required:
        - id
        - version
      title: TaskOut
      type: object
    ErrorObject:
      properties:
        code:
          $ref: '#/components/schemas/Code'
          x-open-enum: true
        doc_url:
          title: Doc Url
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ParamError'
          title: Errors
          type: array
        message:
          title: Message
          type: string
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
        type:
          $ref: '#/components/schemas/ErrorType'
          x-open-enum: false
      required:
        - type
        - code
        - message
        - param
        - errors
        - doc_url
        - request_id
      title: ErrorObject
      type: object
    Code:
      enum:
        - invalid_request
        - unauthenticated
        - forbidden
        - not_found
        - episode_not_active
        - already_exists
        - idempotency_in_progress
        - regrade_pending
        - regrade_failed
        - version_retired
        - cursor_expired
        - request_too_large
        - idempotency_conflict
        - rate_limited
        - internal
        - capacity
        - service_unavailable
      type: string
    ParamError:
      properties:
        message:
          title: Message
          type: string
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
      required:
        - param
        - message
      title: ParamError
      type: object
    ErrorType:
      enum:
        - invalid_request_error
        - idempotency_error
        - api_error
      type: string

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.