> ## 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 daily history for an LLM coding product

> Daily history for an LLM coding-activity index, oldest first. Requires an API key — LLM coding analytics have no free tier. Note this is a coding-activity index, not one of the public token price indices (those are OTPI, under `/api/otpi`). Single-tool products return rows with a single `value`; compare products return rows with both `value` and `value2`, ordered to match `seriesLabels`. Pass `startDate` and `endDate` (`YYYY-MM-DD`, inclusive) to bound the window. `limit` caps the row count (default `2000`). An unknown `product` returns `400`; a valid product with no rows in the window returns `200` with an empty `data` array (this endpoint never returns `404`).


## Overview

Daily history for an LLM coding-activity index, oldest first. Requires an API key - LLM coding analytics have no free tier. Note this is a coding-activity index, not one of the public token price indices (those are OTPI, under `/api/otpi`). Single-tool products return rows with a single `value`; compare products return rows with both `value` and `value2`, ordered to match `seriesLabels`. Pass `startDate` and `endDate` (`YYYY-MM-DD`, inclusive) to bound the window. `limit` caps the row count (default `2000`). An unknown `product` returns `400`; a valid product with no rows in the window returns `200` with an empty `data` array (this endpoint never returns `404`).


## OpenAPI

````yaml openapi.yaml GET /api/llm-coding/history
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: Neo-Cloud Sites
  - name: Reference
paths:
  /api/llm-coding/history:
    get:
      tags:
        - LLM Coding
      summary: Get the daily history for an LLM coding product
      description: >
        Daily history for an LLM coding-activity index, oldest first. Requires
        an API key — LLM coding analytics have no free tier. Note this is a
        coding-activity index, not one of the public token price indices (those
        are OTPI, under `/api/otpi`). Single-tool products return rows with a
        single `value`; compare products return rows with both `value` and
        `value2`, ordered to match `seriesLabels`. Pass `startDate` and
        `endDate` (`YYYY-MM-DD`, inclusive) to bound the window. `limit` caps
        the row count (default `2000`). An unknown `product` returns `400`; a
        valid product with no rows in the window returns `200` with an empty
        `data` array (this endpoint never returns `404`).
      parameters:
        - name: product
          in: query
          required: true
          description: >-
            A product ID, including the `cc-vs-*` compare products. See
            `/api/llm-coding/products`.
          schema:
            type: string
            example: cc-vs-codex
        - name: startDate
          in: query
          description: >-
            Inclusive start of the date window (`YYYY-MM-DD`). Reaches as far
            back as data exists.
          schema:
            type: string
            example: '2026-05-01'
        - name: endDate
          in: query
          description: >-
            Inclusive end of the date window (`YYYY-MM-DD`). Use with
            `startDate`.
          schema:
            type: string
            example: '2026-06-21'
        - name: limit
          in: query
          description: >-
            Maximum number of daily rows to return. For compare products this is
            the underlying row cap before pivoting to one row per date.
          schema:
            type: integer
            default: 2000
      responses:
        '200':
          description: >
            Daily series for the product, oldest first. A valid product with no
            rows in the requested window returns an empty `data` array.
          content:
            application/json:
              examples:
                single:
                  summary: Single-tool product
                  value:
                    success: true
                    product: copilot-merge
                    compare: false
                    access: public-3mo
                    data:
                      - date: '2026-01-01'
                        value: 70
                      - date: '2026-01-02'
                        value: 70
                compare:
                  summary: Compare product
                  value:
                    success: true
                    product: cc-vs-codex
                    compare: true
                    seriesLabels:
                      - Claude PRs
                      - Codex PRs
                    data:
                      - date: '2026-01-01'
                        value: 1000
                        value2: 1000
                      - date: '2026-01-02'
                        value: 1000
                        value2: 1000
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          description: Rate limit exceeded. Back off and cache responses.
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >
            curl
            "https://api.ornnai.com/api/llm-coding/history?product=cc-vs-codex&startDate=2026-05-01&endDate=2026-06-21"
            \
              -H "Authorization: Bearer YOUR_API_KEY"
        - lang: python
          label: Python
          source: |
            import requests

            resp = requests.get(
                "https://api.ornnai.com/api/llm-coding/history",
                params={"product": "cc-vs-codex", "startDate": "2026-05-01", "endDate": "2026-06-21"},
                headers={"Authorization": "Bearer YOUR_API_KEY"},
            )
            series = resp.json()["data"]  # oldest first
        - lang: javascript
          label: JavaScript
          source: |
            const url = "https://api.ornnai.com/api/llm-coding/history"
              + "?product=cc-vs-codex&startDate=2026-05-01&endDate=2026-06-21";
            const res = await fetch(url, {
              headers: { Authorization: "Bearer YOUR_API_KEY" },
            });
            const { data } = await res.json();
        - lang: php
          label: PHP
          source: |
            <?php
            $url = "https://api.ornnai.com/api/llm-coding/history"
                 . "?product=cc-vs-codex&startDate=2026-05-01&endDate=2026-06-21";
            $ch = curl_init($url);
            curl_setopt_array($ch, [
                CURLOPT_RETURNTRANSFER => true,
                CURLOPT_HTTPHEADER => ["Authorization: Bearer YOUR_API_KEY"],
            ]);
            $data = json_decode(curl_exec($ch), true);
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"io\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tendpoint := \"https://api.ornnai.com/api/llm-coding/history?product=cc-vs-codex&startDate=2026-05-01&endDate=2026-06-21\"\n\treq, _ := http.NewRequest(\"GET\", endpoint, nil)\n\treq.Header.Set(\"Authorization\", \"Bearer YOUR_API_KEY\")\n\tresp, _ := http.DefaultClient.Do(req)\n\tdefer resp.Body.Close()\n\tbody, _ := io.ReadAll(resp.Body)\n\t_ = body\n}\n"
        - lang: java
          label: Java
          source: >
            import java.net.URI;

            import java.net.http.HttpClient;

            import java.net.http.HttpRequest;

            import java.net.http.HttpResponse;


            HttpClient client = HttpClient.newHttpClient();

            HttpRequest request = HttpRequest.newBuilder(
                    URI.create("https://api.ornnai.com/api/llm-coding/history?product=cc-vs-codex&startDate=2026-05-01&endDate=2026-06-21"))
                .header("Authorization", "Bearer YOUR_API_KEY")
                .build();
            HttpResponse<String> response = client.send(request,
            HttpResponse.BodyHandlers.ofString());
        - lang: ruby
          label: Ruby
          source: >
            require "net/http"

            require "json"


            uri =
            URI("https://api.ornnai.com/api/llm-coding/history?product=cc-vs-codex&startDate=2026-05-01&endDate=2026-06-21")

            req = Net::HTTP::Get.new(uri)

            req["Authorization"] = "Bearer YOUR_API_KEY"

            res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) {
            |http| http.request(req) }

            data = JSON.parse(res.body)
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, RTX 5090,
            B200, RTX PRO 6000 WS
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key passed as a Bearer token. Create one in the dashboard.

````