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

# Search exercises by lookup keys

> Returns exercises whose `lookup_keys` contain at least one of the requested
`search_keys`. Use the same values as **`search_key`** in analysis results
([Search key mapping](/guides/search-key-mapping)).




## OpenAPI

````yaml /openapi.yaml post /exercises
openapi: 3.0.1
info:
  title: Ochy Partner API
  version: 1.0.0
  description: >
    The Ochy Partner API lets you integrate running biomechanical analysis into
    your application.

    Upload a video of a runner, receive detailed biomechanical metrics, joint
    angles, running style

    classification, and frame-by-frame position data.
servers:
  - url: https://partner-api.ochy-prod.com
    description: Production
security:
  - apiKey: []
paths:
  /exercises:
    post:
      tags:
        - Exercises
      summary: Search exercises by lookup keys
      description: >
        Returns exercises whose `lookup_keys` contain at least one of the
        requested

        `search_keys`. Use the same values as **`search_key`** in analysis
        results

        ([Search key mapping](/guides/search-key-mapping)).
      operationId: searchExercises
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExercisesSearchRequest'
            example:
              language: en
              search_keys:
                - HeadG
                - PelvicB
      responses:
        '200':
          description: Matching exercises.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ExerciseItem'
              example:
                - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                  lookup_keys:
                    - PelvicB
                    - HeadG
                  difficulty: easy
                  effort_per_rep:
                    max_ms: 15000
                    min_ms: 10000
                  exercise_format: duration
                  kind: exercise
                  media:
                    image: >-
                      https://firebasestorage.googleapis.com/v0/b/ochy-7871a.appspot.com/o/assets%2Fexercises%2Fexample.png?alt=media
                    video: >-
                      https://firebasestorage.googleapis.com/v0/b/ochy-7871a.appspot.com/o/assets%2Fexercises%2Fexample.mp4?alt=media
                  number_of_series: 4
                  title: Wall Assist Stork Balance
        '400':
          description: Invalid JSON body, missing language, or empty search_keys.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail: search_keys must contain at least one value
                code: search_keys_empty
        '401':
          description: Missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorResponse'
        '403':
          description: Invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorResponse'
        '404':
          description: No documents matched the given search keys.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail: No exercises found for the given search keys
                code: no_exercises_found
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ExercisesSearchRequest:
      type: object
      required:
        - search_keys
        - language
      properties:
        search_keys:
          type: array
          items:
            type: string
          description: Lookup keys matching `search_key` from analysis results.
          example:
            - HeadG
            - PelvicB
        language:
          type: string
          description: Locale for exercise titles (fallback to English if missing).
          example: en
    ExerciseItem:
      type: object
      description: One exercise. Shape depends on exercise_format.
      properties:
        id:
          type: string
          format: uuid
          description: Unique exercise identifier (UUID).
        lookup_keys:
          type: array
          items:
            type: string
          description: >-
            Lookup keys used to match this exercise (same values as search_key
            in analysis results).
        kind:
          type: string
          example: exercise
        title:
          type: string
        difficulty:
          type: string
          example: easy
        exercise_format:
          type: string
          enum:
            - duration
            - repetitions
        number_of_series:
          type: integer
        media:
          type: object
          additionalProperties:
            type: string
        effort_per_rep:
          type: object
          properties:
            min_ms:
              type: integer
            max_ms:
              type: integer
        repetitions:
          type: object
          properties:
            min:
              type: integer
            max:
              type: integer
    ErrorResponse:
      type: object
      properties:
        detail:
          type: string
          example: Internal server error
        code:
          type: string
          description: Machine-readable error code (present on some errors).
          example: insufficient_credits
    AuthErrorResponse:
      type: object
      properties:
        detail:
          type: string
          example: API Key is missing
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: apiKey
      description: Your API key, passed as a query parameter on every request.

````