{
  "info": {
    "_postman_id": "9116632f-fbbf-413c-9706-705b98e966c5",
    "name": "Mathpix App Tokens Usage API",
    "description": "Mint short-lived client-side tokens so browsers, mobile apps, and digital-ink surfaces can call Mathpix without exposing your long-lived app_key. Tokens default to 5 minutes and can be issued from 30 seconds to 12 hours. Token issuance is free.\n\n\nContact Support:\n Name: Mathpix Support\n Email: support@mathpix.com",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "createdAt": "2026-07-28T10:58:20.000Z",
    "updatedAt": "2026-07-28T10:58:21.000Z",
    "lastUpdatedBy": "35240",
    "uid": "35240-9116632f-fbbf-413c-9706-705b98e966c5"
  },
  "item": [
    {
      "name": "v3",
      "item": [
        {
          "name": "ocr-usage",
          "item": [
            {
              "name": "Query OCR Usage",
              "id": "34c3d7c3-3630-4a8a-bc59-2dc247822596",
              "protocolProfileBehavior": {
                "disableBodyPruning": true
              },
              "request": {
                "method": "GET",
                "header": [
                  {
                    "description": "(Required) ",
                    "key": "app_id",
                    "value": "<string>"
                  },
                  {
                    "description": "(Required) ",
                    "key": "app_key",
                    "value": "<string>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/v3/ocr-usage?from_date=<dateTime>&to_date=<dateTime>&group_by=usage_type&timespan=hour",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v3",
                    "ocr-usage"
                  ],
                  "query": [
                    {
                      "description": "ISO datetime lower bound (inclusive).",
                      "key": "from_date",
                      "value": "<dateTime>"
                    },
                    {
                      "description": "ISO datetime upper bound (exclusive).",
                      "key": "to_date",
                      "value": "<dateTime>"
                    },
                    {
                      "description": "(Required) ",
                      "key": "group_by",
                      "value": "usage_type"
                    },
                    {
                      "description": "(Required) ",
                      "key": "timespan",
                      "value": "hour"
                    }
                  ]
                },
                "description": "Aggregate OCR usage across a time window. Group by usage_type, request_args_hash, or app_id, and pick a timespan such as month, week, day, or hour."
              },
              "response": [
                {
                  "id": "305d2251-2eed-4dce-9355-9c4bf7c153df",
                  "name": "Aggregated usage.",
                  "originalRequest": {
                    "method": "GET",
                    "header": [
                      {
                        "description": "(Required) ",
                        "key": "app_id",
                        "value": "<string>"
                      },
                      {
                        "description": "(Required) ",
                        "key": "app_key",
                        "value": "<string>"
                      },
                      {
                        "key": "Accept",
                        "value": "application/json"
                      },
                      {
                        "description": "Added as a part of security scheme: apikey",
                        "key": "app_key",
                        "value": "<API Key>"
                      }
                    ],
                    "url": {
                      "raw": "{{baseUrl}}/v3/ocr-usage?from_date=<dateTime>&to_date=<dateTime>&group_by=usage_type&timespan=hour",
                      "host": [
                        "{{baseUrl}}"
                      ],
                      "path": [
                        "v3",
                        "ocr-usage"
                      ],
                      "query": [
                        {
                          "description": "ISO datetime lower bound (inclusive).",
                          "key": "from_date",
                          "value": "<dateTime>"
                        },
                        {
                          "description": "ISO datetime upper bound (exclusive).",
                          "key": "to_date",
                          "value": "<dateTime>"
                        },
                        {
                          "description": "(Required) ",
                          "key": "group_by",
                          "value": "usage_type"
                        },
                        {
                          "description": "(Required) ",
                          "key": "timespan",
                          "value": "hour"
                        }
                      ]
                    }
                  },
                  "status": "OK",
                  "code": 200,
                  "_postman_previewlanguage": "json",
                  "header": [
                    {
                      "key": "Content-Type",
                      "value": "application/json"
                    }
                  ],
                  "cookie": [],
                  "responseTime": null,
                  "body": "{\n  \"ocr_usage\": [\n    {\n      \"from_date\": \"<dateTime>\",\n      \"app_id\": \"<string>\",\n      \"group_id\": \"<string>\",\n      \"usage_type\": \"<string>\",\n      \"request_args_hash\": \"<string>\",\n      \"count\": \"<integer>\"\n    },\n    {\n      \"from_date\": \"<dateTime>\",\n      \"app_id\": \"<string>\",\n      \"group_id\": \"<string>\",\n      \"usage_type\": \"<string>\",\n      \"request_args_hash\": \"<string>\",\n      \"count\": \"<integer>\"\n    }\n  ]\n}",
                  "createdAt": "2026-07-28T10:58:21.000Z",
                  "updatedAt": "2026-07-28T10:58:21.000Z",
                  "uid": "35240-305d2251-2eed-4dce-9355-9c4bf7c153df"
                }
              ],
              "createdAt": "2026-07-28T10:58:21.000Z",
              "updatedAt": "2026-07-28T10:58:21.000Z",
              "uid": "35240-34c3d7c3-3630-4a8a-bc59-2dc247822596"
            }
          ],
          "id": "9ea1b472-bdb7-4187-a59b-8c45234df6ed",
          "createdAt": "2026-07-28T10:58:21.000Z",
          "updatedAt": "2026-07-28T10:58:21.000Z",
          "uid": "35240-9ea1b472-bdb7-4187-a59b-8c45234df6ed"
        }
      ],
      "id": "cdb36411-1695-4375-898f-cfcb8d778b9f",
      "createdAt": "2026-07-28T10:58:21.000Z",
      "updatedAt": "2026-07-28T10:58:21.000Z",
      "uid": "35240-cdb36411-1695-4375-898f-cfcb8d778b9f"
    }
  ],
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "app_key",
        "type": "string"
      },
      {
        "key": "value",
        "value": "{{apiKey}}",
        "type": "string"
      },
      {
        "key": "in",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.mathpix.com"
    }
  ]
}