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

# Get the hourly token price sample by lab

> Hourly sample of the Ornn Token Price Index. Returns the latest capture by default, one UTC `date`, or a `startDate`/`endDate` range. Each row is `capturedAt`, `lab`, and `indexPerMtok`.
The value is the token-weighted blend of that hour's sample. It is not the settled daily print from `GET /api/otpi`. Access matches that route: without a key, the free tier covers `anthropic`, `openai`, `google`, and `deepseek` for the trailing 3 months. A key unlocks all 11 labs and the full history. The response includes `access: "public-3mo" | "premium" | "full"`.


## Overview

The hourly sample of the Ornn Token Price Index. Each row is the capture time, the lab, and `indexPerMtok`.

This is the token-weighted blend of that hour's sample. The settled daily print remains [`GET /api/otpi`](https://data.ornn.com/docs/api-reference/token-prices/get-the-latest-token-price-index-by-lab). Access is the same: without a key, `anthropic`, `openai`, `google`, and `deepseek` for the trailing 3 months. A Premium or Full key unlocks all 11 labs and the full history.


## OpenAPI

````yaml openapi.yaml GET /api/otpi/hourly
openapi: 3.1.0
info:
  title: Ornn Data API
  version: 1.0.0
  description: >
    Read-only REST API for GPU and memory market data. The price index is the
    going rate of compute in USD per GPU-hour, a weighted average of all
    verified compute transactions across the market.
servers:
  - url: https://api.ornnai.com
security:
  - bearerAuth: []
tags:
  - name: Current Prices
  - name: Historical Prices
  - name: Analytics
  - name: Memory
  - name: Token Prices
  - name: Workload Cost
  - name: LLM Coding
  - name: Forward Curves
  - name: Token Volume
  - name: Model Frontier
  - name: Compute Buyers
  - name: Power Markets
  - name: Neo-Cloud Sites
  - name: Reference
paths:
  /api/otpi/hourly:
    get:
      tags:
        - Token Prices
      summary: Get the hourly token price sample by lab
      description: >
        Hourly sample of the Ornn Token Price Index. Returns the latest capture
        by default, one UTC `date`, or a `startDate`/`endDate` range. Each row
        is `capturedAt`, `lab`, and `indexPerMtok`.

        The value is the token-weighted blend of that hour's sample. It is not
        the settled daily print from `GET /api/otpi`. Access matches that route:
        without a key, the free tier covers `anthropic`, `openai`, `google`, and
        `deepseek` for the trailing 3 months. A key unlocks all 11 labs and the
        full history. The response includes `access: "public-3mo" | "premium" |
        "full"`.
      parameters:
        - name: date
          in: query
          description: >-
            UTC day in YYYY-MM-DD. Returns every sample captured that day. Omit
            it, and omit the range, for the latest sample.
          schema:
            type: string
            format: date
        - name: startDate
          in: query
          description: Inclusive start of a UTC-day window. Use with endDate.
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: Inclusive end of a UTC-day window. Use with startDate.
          schema:
            type: string
            format: date
        - name: lab
          in: query
          description: >-
            Filter to a single lab. Without a key, only anthropic, openai,
            google, and deepseek are available.
          schema:
            type: string
            enum:
              - anthropic
              - openai
              - google
              - deepseek
              - minimax
              - xiaomi
              - qwen
              - moonshotai
              - z-ai
              - mistralai
              - meta-llama
      responses:
        '200':
          description: >
            Hourly sample rows. The latest capture carries a top-level
            `capturedAt`. A `date` query carries that date. A range carries
            `startDate` and `endDate`.
          content:
            application/json:
              examples:
                latest:
                  summary: Latest sample
                  value:
                    success: true
                    access: public-3mo
                    capturedAt: '2026-11-03T03:00:12.104Z'
                    count: 2
                    data:
                      - capturedAt: '2026-11-03T03:00:12.104Z'
                        lab: anthropic
                        indexPerMtok: 3.41827391
                      - capturedAt: '2026-11-03T03:00:12.104Z'
                        lab: openai
                        indexPerMtok: 1.104428
                range:
                  summary: Date range with lab filter
                  value:
                    success: true
                    access: public-3mo
                    startDate: '2026-11-01'
                    endDate: '2026-11-03'
                    count: 2
                    data:
                      - capturedAt: '2026-11-01T00:00:08.000Z'
                        lab: anthropic
                        indexPerMtok: 3.4
                      - capturedAt: '2026-11-01T01:00:08.000Z'
                        lab: anthropic
                        indexPerMtok: 3.41
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |
            curl "https://api.ornnai.com/api/otpi/hourly"
        - lang: python
          label: Python
          source: >
            import requests


            rows =
            requests.get("https://api.ornnai.com/api/otpi/hourly").json()["data"]

            for r in rows:
                print(r["lab"], r["indexPerMtok"])
        - lang: javascript
          label: JavaScript
          source: |
            const res = await fetch("https://api.ornnai.com/api/otpi/hourly");
            const { data } = await res.json();
components:
  responses:
    BadRequest:
      description: A required parameter is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing, invalid, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
            message: 'API key required. Use Authorization: Bearer YOUR_API_KEY'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          example: Bad request
        message:
          type: string
          example: >-
            Invalid GPU type. Allowed: H100 SXM, H200, A100 SXM4, B200, RTX PRO
            6000 WS
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key passed as a Bearer token. Create one in the dashboard.

````

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