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

# Create

> Report a calibration to Miru.



## OpenAPI

````yaml /references/device-api/v0.2.3/api.yaml post /calibrations
openapi: 3.0.3
info:
  title: Miru Agent API
  description: >-
    The API between the Miru Agent and any external client living on the same
    device as the Miru Agent. On Linux the agent serves it over the Unix socket
    `/run/miru/miru.sock` with no authentication. Over loopback TCP, which is on
    by default on Windows at `127.0.0.1:6478`, every route requires
    `Authorization: Bearer <token>`. Clients read the port and token from the
    agent's discovery file, `%ProgramData%\Miru\device-api\device-api.json` on
    Windows; the token changes every time the agent starts.
  version: v0.2
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  x-release-version: v0.2.3
  x-git-commit:
    sha: 850e23bf5fc36a890d36b5a2d9156f68d141f645
    url: >-
      https://github.com/mirurobotics/openapi/commit/850e23bf5fc36a890d36b5a2d9156f68d141f645
    message: >-
      feat(device): rename component_slug to component in
      CreateCalibrationRequest (#359)


      <!-- claude-projects-attribution: {"github_login":"miru-agents"} -->

      _Requested by **bens-agent** · [project

      thread](https://claude.ai/code/project/chan_015imaa8aZrnubYZcZCvjeHx?thread=cmsg_015imaa8aZrnubYZcZCvjeHxMkwTnPSSvfAHZA9NT4YaSe)_


      ## Summary


      Renames `CreateCalibrationRequest.component_slug` to `component` in the

      Device API's `POST /calibrations`. #339 already renamed it this way in

      the agent API. The field is still required and still holds the

      component's slug, so it now matches `role` and `aspect`, which are slugs

      without a `_slug` suffix. The description uses the same wording as the

      agent API's.


      The published `device/v0.2.3` release is being removed, so it can be

      re-released from this change.


      ## Changes


      - `apis/apps/device-server/components/requests/calibration.yaml`: the

      field and its `required` entry are renamed, with a new description.

      - `apis/apps/device-server/openapi.gen.yaml`: regenerated.


      ## Not in this PR


      - The agent's Device API handler must accept `component` before an agent

      release serves this version.

      - The docs follow in mirurobotics/docs#269.


      ## Test plan


      - `./scripts/regen.sh` and `./scripts/lint.sh` pass.


      ---

      _Generated by [Claude

      Code](https://claude.ai/code/session_01XYr7RpV2F8ueBW98eeY8W5)_


      <!-- codesmith:footer -->

      ---

      <a

      href="https://app.blacksmith.sh/mirurobotics/codesmith/openapi/pr/359?autoLogin=true&ref=codesmith_pr_footer"><picture><source

      media="(prefers-color-scheme: dark)"

      srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3.svg"><source

      media="(prefers-color-scheme: light)"

      srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v3.svg"><img

      alt="View with [code]smith"

      src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png"

      width="162" height="28"></picture></a> <a

      href="https://backend.blacksmith.sh/track/enable-autofix?expires=1795553366&installation_model_id=425273&pr_number=359&ref=codesmith_pr_footer&repository=mirurobotics%2Fopenapi&return_to=https%3A%2F%2Fgithub.com%2Fmirurobotics%2Fopenapi%2Fpull%2F359&signature=7d015e17b40f373fb20324d3a368781ae9e6a82f33b83aba22187488d6c5826f"><picture><source

      media="(prefers-color-scheme: dark)"

      srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source

      media="(prefers-color-scheme: light)"

      srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img

      alt="Autofix with [code]smith"

      src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png"

      width="190" height="28"></picture></a>

      <sup>Need help on this PR? Tag <code>@codesmith</code> with what you

      need.</sup>


      <!-- codesmith:autofix:disabled -->

      <!-- /codesmith:footer -->


      Co-authored-by: Claude <noreply@anthropic.com>
    author: Ben's Agent
    branch: HEAD
    dirty: false
  x-build:
    built_at: '2026-10-25T21:22:34.230221+00:00'
servers:
  - url: http://localhost/v0.2
    description: localhost
security:
  - {}
  - BearerAuth: []
paths:
  /calibrations:
    post:
      tags:
        - Calibrations
      summary: Create
      description: Report a calibration to Miru.
      operationId: createCalibration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCalibrationRequest'
      responses:
        '200':
          description: The agent saved the calibration and will upload it to Miru.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCalibrationResponse'
      x-codeSamples:
        - lang: curl
          label: curl (Linux)
          source: |-
            curl \
              --unix-socket /run/miru/miru.sock \
              --request POST \
              --url http://localhost/v0.2/calibrations \
              --header 'Content-Type: application/json' \
              --data '{
                "component": "kuka-arm",
                "role": "front-left",
                "aspect": "pose",
                "serial_number": "SN-1234",
                "content": {"format": "json", "data": "{\"x\": 0.12, \"y\": -0.03}"}
              }'
        - lang: powershell
          label: PowerShell (Windows)
          source: >-
            $api = Get-Content -Raw
            "$env:ProgramData\Miru\device-api\device-api.json" |
            ConvertFrom-Json; `

            $body = @{
              component      = "kuka-arm"
              role           = "front-left"
              aspect         = "pose"
              serial_number  = "SN-1234"
              content        = @{ format = "json"; data = '{"x": 0.12, "y": -0.03}' }
            } | ConvertTo-Json -Depth 3; `

            Invoke-RestMethod -Method Post `
              -Uri "http://127.0.0.1:$($api.port)/v0.2/calibrations" `
              -Headers @{ Authorization = "Bearer $($api.token)" } `
              -ContentType "application/json" `
              -Body $body
components:
  schemas:
    CreateCalibrationRequest:
      title: Create Calibration Request
      type: object
      required:
        - component
        - content
      properties:
        component:
          type: string
          example: kuka-arm
          description: >-
            Slug of the component the calibrated unit belongs to, such as
            `kuka-arm`. Miru resolves it to the component, creating the
            component the first time it is reported.
        role:
          type: string
          example: front-left
          description: >-
            Slug of the role the calibrated unit fills on the device, such as
            `left` or `front-left`. Distinguishes several units of one component
            on a device. Validated like a slug. Miru resolves it to one of the
            component's `roles`, creating the role the first time it is
            reported.
        serial_number:
          type: string
          maxLength: 255
          example: SN-1234
          description: >-
            Serial number of the physical unit that was calibrated, not of the
            device, such as `SN-1234`. Free text, at most 255 characters.
        aspect:
          type: string
          example: pose
          description: >-
            Slug of the aspect of the unit that was calibrated, when it has more
            than one, e.g. `intrinsics` vs `extrinsics`, or `pose` vs
            `joint-offsets`. Validated like a slug. Miru resolves it to one of
            the component's `aspects`, creating the aspect the first time it is
            reported.
        content:
          allOf:
            - $ref: '#/components/schemas/InstanceContent'
          description: >-
            The calibration's content, at most 1 MiB. The agent uploads it to
            Miru unchanged.
    CreateCalibrationResponse:
      title: Create Calibration Response
      type: object
      required:
        - report_id
        - reported_at
      properties:
        report_id:
          type: string
          format: uuid
          example: 0b6f3c2e-6a51-4e0f-9a43-2f1d7c9e8b10
          description: >-
            ID the agent gave this report. The agent sends it to Miru with the
            calibration, and Miru stores it as the calibration's `report_id`.
        reported_at:
          type: string
          format: date-time
          example: '2026-03-10T12:00:00Z'
          description: >-
            Timestamp of when the agent received the calibration. Miru stores it
            as the time the calibration was reported.
      example:
        report_id: 0b6f3c2e-6a51-4e0f-9a43-2f1d7c9e8b10
        reported_at: '2026-03-10T12:00:00Z'
    InstanceContent:
      title: Instance Content
      type: object
      required:
        - format
        - data
      properties:
        format:
          $ref: '#/components/schemas/InstanceFormat'
        data:
          type: string
          description: The content's values, serialized in `format`.
          example: |
            {
              "enable_autonomy": true,
              "enable_remote_control": true,
              "max_payload_kg": 10.0
            }
      example:
        format: json
        data: |
          {
            "enable_autonomy": true,
            "enable_remote_control": true,
            "max_payload_kg": 10.0
          }
    InstanceFormat:
      title: Instance Format
      type: string
      description: >
        The serialization format of config content. A config instance is written
        to the device filesystem in this format.

        - `json`: standard JSON.

        - `yaml`: YAML 1.2.

        - `jsonc`: JSON with comments (JSON plus `//` and `/* */` comment
        syntax).

        - `xml`: XML.

        - `text`: plain, unstructured text with no specific format.
      enum:
        - json
        - yaml
        - jsonc
        - xml
        - text
      x-enum-varnames:
        - INSTANCE_FORMAT_JSON
        - INSTANCE_FORMAT_YAML
        - INSTANCE_FORMAT_JSONC
        - INSTANCE_FORMAT_XML
        - INSTANCE_FORMAT_TEXT
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        The token from the agent's discovery file
        (`%ProgramData%\Miru\device-api\device-api.json` on Windows). Required
        over loopback TCP (`127.0.0.1:6478` by default on Windows) and accepted
        by every route; not used over the Unix socket.

````

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