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

# Quickstart

> Get an API key and make your first request to the Ornn Data API in under two minutes.

This guide takes you from zero to your first price in three steps.

<Steps>
  <Step title="Get an API key">
    Sign in to [data.ornn.com](https://data.ornn.com), open **Settings → API Keys**, and click **Create key**. Copy the key. It starts with `sk_live_` and is shown only once.

    See [Manage API keys](/docs/manage-api-keys) for the full walkthrough.
  </Step>

  <Step title="Make your first request">
    Fetch the current price index for an H100 SXM. Replace `YOUR_API_KEY` with the key you created.

    <CodeGroup>
      ```bash cURL theme={null}
      curl "https://api.ornnai.com/api/gpu/H100%20SXM" \
        -H "Authorization: Bearer YOUR_API_KEY"
      ```

      ```python Python theme={null}
      import requests

      resp = requests.get(
          "https://api.ornnai.com/api/gpu/H100 SXM",
          headers={"Authorization": "Bearer YOUR_API_KEY"},
      )
      resp.raise_for_status()
      print(resp.json())
      ```

      ```javascript JavaScript theme={null}
      const res = await fetch("https://api.ornnai.com/api/gpu/H100 SXM", {
        headers: { Authorization: "Bearer YOUR_API_KEY" },
      });
      const data = await res.json();
      console.log(data);
      ```

      ```php PHP theme={null}
      <?php
      $ch = curl_init("https://api.ornnai.com/api/gpu/" . rawurlencode("H100 SXM"));
      curl_setopt_array($ch, [
          CURLOPT_RETURNTRANSFER => true,
          CURLOPT_HTTPHEADER => ["Authorization: Bearer YOUR_API_KEY"],
      ]);
      $data = json_decode(curl_exec($ch), true);
      print_r($data);
      ```

      ```go Go theme={null}
      package main

      import (
      	"fmt"
      	"io"
      	"net/http"
      	"net/url"
      )

      func main() {
      	endpoint := "https://api.ornnai.com/api/gpu/" + url.PathEscape("H100 SXM")
      	req, _ := http.NewRequest("GET", endpoint, nil)
      	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
      	resp, _ := http.DefaultClient.Do(req)
      	defer resp.Body.Close()
      	body, _ := io.ReadAll(resp.Body)
      	fmt.Println(string(body))
      }
      ```

      ```java Java theme={null}
      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/gpu/H100%20SXM"))
          .header("Authorization", "Bearer YOUR_API_KEY")
          .build();
      HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
      System.out.println(response.body());
      ```

      ```ruby Ruby theme={null}
      require "net/http"
      require "json"

      uri = URI("https://api.ornnai.com/api/gpu/H100%20SXM")
      req = Net::HTTP::Get.new(uri)
      req["Authorization"] = "Bearer YOUR_API_KEY"
      res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
      puts JSON.parse(res.body)
      ```
    </CodeGroup>
  </Step>

  <Step title="Read the response">
    You get back the latest index value, in USD per hour:

    ```json theme={null}
    {
      "success": true,
      "data": {
        "gpu_name": "H100 SXM",
        "region": "",
        "index_value": 2.00,
        "last_updated": "2026-01-01T00:00:00.000Z"
      }
    }
    ```
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Pull history into pandas" img="https://mintcdn.com/ornn-data/XYIc8NRHBiyV90g7/images/cards/pandas.jpg?fit=max&auto=format&n=XYIc8NRHBiyV90g7&q=85&s=55214d56459fc6ffc98dc422104785d4" href="/docs/pandas-dataframe" width="1200" height="805" data-path="images/cards/pandas.jpg">
    Load a price series into a DataFrame and plot it.
  </Card>

  <Card title="Browse all endpoints" img="https://mintcdn.com/ornn-data/XYIc8NRHBiyV90g7/images/cards/endpoints.jpg?fit=max&auto=format&n=XYIc8NRHBiyV90g7&q=85&s=bae67aeb37a17f24d3a7fcb77d32951c" href="/docs/api-reference/current-prices/get-current-price-for-one-gpu" width="1200" height="805" data-path="images/cards/endpoints.jpg">
    Current prices, history, analytics, and memory.
  </Card>
</CardGroup>

<Tip>
  The GPU name goes straight in the URL path. A literal space works (`H100 SXM`); your HTTP client URL-encodes it to `H100%20SXM` for you.
</Tip>
