Skip to main content
GET
/
classifications
/
task
Task classification market share
curl --request GET \
  --url https://openrouter.ai/api/v1/classifications/task \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://openrouter.ai/api/v1/classifications/task"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://openrouter.ai/api/v1/classifications/task', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://openrouter.ai/api/v1/classifications/task",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

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

func main() {

	url := "https://openrouter.ai/api/v1/classifications/task"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://openrouter.ai/api/v1/classifications/task")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://openrouter.ai/api/v1/classifications/task")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "data": {
    "as_of": "2026-06-17",
    "classifications": [
      {
        "category_token_share": 0.48,
        "category_usage_share": 0.51,
        "display_name": "Code Generation",
        "macro_category": "code",
        "models": [
          {
            "id": "openai/gpt-4.1-mini",
            "tag_token_share": 0.75,
            "tag_usage_share": 0.55
          }
        ],
        "tag": "code:general_impl",
        "token_share": 0.31,
        "usage_share": 0.23
      }
    ],
    "macro_categories": [
      {
        "key": "code",
        "label": "Code",
        "token_share": 0.52,
        "usage_share": 0.45
      }
    ],
    "window_days": 7
  }
}
{
  "error": {
    "code": 400,
    "message": "Invalid request parameters"
  }
}
{
  "error": {
    "code": 401,
    "message": "Missing Authentication header"
  }
}
{
  "error": {
    "code": 429,
    "message": "Rate limit exceeded"
  }
}
{
  "error": {
    "code": 500,
    "message": "Internal Server Error"
  }
}

Authorizations

Authorization
string
header
required

API key as bearer token in Authorization header

Query Parameters

window
enum<string>
default:7d

Trailing time window for the classification data. Currently only 7d (trailing 7 days) is supported.

Available options:
7d
Example:

"7d"

Response

Task classification market-share data for the requested trailing window.

data
object
required