> ## 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.

# Create subject

> Create a new subject. The `subject_id` is generated by the server.
All body fields are optional -- you can create a subject with no data and update it later.

**Metric system:** `height` is in **meters** and `weight` is in **kilograms**.




## OpenAPI

````yaml /openapi.yaml post /subjects
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:
  /subjects:
    post:
      tags:
        - Subjects
      summary: Create subject
      description: >
        Create a new subject. The `subject_id` is generated by the server.

        All body fields are optional -- you can create a subject with no data
        and update it later.


        **Metric system:** `height` is in **meters** and `weight` is in
        **kilograms**.
      operationId: createSubject
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubjectCreateRequest'
            example:
              email: runner@example.com
              name: Jane Smith
              height: 1.72
              weight: 62
      responses:
        '201':
          description: Subject created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubjectCreateResponse'
              example:
                subject_id: 550e8400-e29b-41d4-a716-446655440000
                created_at: '2025-03-20T15:30:00Z'
        '400':
          description: Invalid request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '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'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubjectCreateRequest:
      type: object
      description: >-
        All fields are optional. The `subject_id` is generated by the server.
        Height is in meters, weight is in kilograms.
      properties:
        email:
          type: string
          example: runner@example.com
        name:
          type: string
          example: Jane Smith
        height:
          type: number
          description: Subject height in meters.
          example: 1.72
        weight:
          type: number
          description: Subject weight in kilograms.
          example: 62
    SubjectCreateResponse:
      type: object
      properties:
        subject_id:
          type: string
          description: Server-generated unique identifier for the new subject.
          example: 550e8400-e29b-41d4-a716-446655440000
        created_at:
          type: string
          format: date-time
          example: '2025-03-20T15:30:00Z'
    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.

````