Hadrian is experimental alpha software. Do not use in production.
Hadrian

Model pricing

Configure per-model pricing for cost tracking. Pricing can be set globally, per-provider, per-organization, per-project, or per-user.

List global model pricing

GET
/admin/v1/model-pricing
AuthorizationBearer <token>

API key authentication using Bearer token format

In: header

Query Parameters

limit?integer|null

Maximum number of results to return

Formatint64
cursor?string|null

Cursor for keyset pagination. Encoded as base64 string.

direction?string|null

Pagination direction: "forward" (default) or "backward".

include_deleted?boolean|null

Include soft-deleted records in results

Response Body

application/json

application/json

curl -X GET "https://loading/admin/v1/model-pricing"
{
  "data": [
    {
      "cache_write_per_1m_tokens": 0,
      "cached_input_per_1m_tokens": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "input_per_1m_tokens": 0,
      "model": "string",
      "output_per_1m_tokens": 0,
      "owner": {
        "type": "global"
      },
      "per_1m_characters": 0,
      "per_image": 0,
      "per_request": 0,
      "per_second": 0,
      "provider": "string",
      "reasoning_per_1m_tokens": 0,
      "source": "manual",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "pagination": {
    "has_more": true,
    "limit": 100,
    "next_cursor": "MTczMzU4MDgwMDAwMDphYmMxMjM0NS02Nzg5LTAxMjMtNDU2Ny0wMTIzNDU2Nzg5YWI",
    "prev_cursor": "string"
  }
}
{
  "error": {
    "code": "budget_exceeded",
    "message": "Budget limit exceeded for monthly period",
    "param": null,
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "invalid_request_error"
  }
}

Create a new model pricing entry

POST
/admin/v1/model-pricing
AuthorizationBearer <token>

API key authentication using Bearer token format

In: header

Request Body

application/json

cache_write_per_1m_tokens?integer|null

Cost per 1M cache write tokens in microcents

Formatint64
cached_input_per_1m_tokens?integer|null

Cost per 1M cached input tokens in microcents

Formatint64
input_per_1m_tokens?integer

Cost per 1M input tokens in microcents

Formatint64
model*string
output_per_1m_tokens?integer

Cost per 1M output tokens in microcents

Formatint64
owner*||||

Owner scope for model pricing configuration

per_1m_characters?integer|null

Cost per 1M characters in microcents (for TTS)

Formatint64
per_image?integer|null

Cost per image in microcents

Formatint64
per_request?integer|null

Cost per request in microcents

Formatint64
per_second?integer|null

Cost per second of audio in microcents (for transcription/translation)

Formatint64
provider*string
reasoning_per_1m_tokens?integer|null

Cost per 1M reasoning tokens in microcents

Formatint64
source?string

Source of pricing data

Value in"manual" | "provider_api" | "default"

Response Body

application/json

application/json

curl -X POST "https://loading/admin/v1/model-pricing" \  -H "Content-Type: application/json" \  -d '{    "model": "string",    "owner": {      "type": "global"    },    "provider": "string"  }'
{
  "cache_write_per_1m_tokens": 0,
  "cached_input_per_1m_tokens": 0,
  "created_at": "2019-08-24T14:15:22Z",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "input_per_1m_tokens": 0,
  "model": "string",
  "output_per_1m_tokens": 0,
  "owner": {
    "type": "global"
  },
  "per_1m_characters": 0,
  "per_image": 0,
  "per_request": 0,
  "per_second": 0,
  "provider": "string",
  "reasoning_per_1m_tokens": 0,
  "source": "manual",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "error": {
    "code": "budget_exceeded",
    "message": "Budget limit exceeded for monthly period",
    "param": null,
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "invalid_request_error"
  }
}

Bulk upsert model pricing entries

POST
/admin/v1/model-pricing/bulk
AuthorizationBearer <token>

API key authentication using Bearer token format

In: header

Request Body

application/json

Response Body

application/json

curl -X POST "https://loading/admin/v1/model-pricing/bulk" \  -H "Content-Type: application/json" \  -d '[    {      "model": "string",      "owner": {        "type": "global"      },      "provider": "string"    }  ]'
{
  "count": 0
}

List all pricing for a specific provider (across all scopes)

GET
/admin/v1/model-pricing/provider/{provider}
AuthorizationBearer <token>

API key authentication using Bearer token format

In: header

Path Parameters

provider*string

Provider name

Query Parameters

limit?integer|null

Maximum number of results to return

Formatint64
cursor?string|null

Cursor for keyset pagination. Encoded as base64 string.

direction?string|null

Pagination direction: "forward" (default) or "backward".

include_deleted?boolean|null

Include soft-deleted records in results

Response Body

application/json

application/json

curl -X GET "https://loading/admin/v1/model-pricing/provider/string"
{
  "data": [
    {
      "cache_write_per_1m_tokens": 0,
      "cached_input_per_1m_tokens": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "input_per_1m_tokens": 0,
      "model": "string",
      "output_per_1m_tokens": 0,
      "owner": {
        "type": "global"
      },
      "per_1m_characters": 0,
      "per_image": 0,
      "per_request": 0,
      "per_second": 0,
      "provider": "string",
      "reasoning_per_1m_tokens": 0,
      "source": "manual",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "pagination": {
    "has_more": true,
    "limit": 100,
    "next_cursor": "MTczMzU4MDgwMDAwMDphYmMxMjM0NS02Nzg5LTAxMjMtNDU2Ny0wMTIzNDU2Nzg5YWI",
    "prev_cursor": "string"
  }
}
{
  "error": {
    "code": "budget_exceeded",
    "message": "Budget limit exceeded for monthly period",
    "param": null,
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "invalid_request_error"
  }
}

Upsert model pricing (create or update based on owner/provider/model)

POST
/admin/v1/model-pricing/upsert
AuthorizationBearer <token>

API key authentication using Bearer token format

In: header

Request Body

application/json

cache_write_per_1m_tokens?integer|null

Cost per 1M cache write tokens in microcents

Formatint64
cached_input_per_1m_tokens?integer|null

Cost per 1M cached input tokens in microcents

Formatint64
input_per_1m_tokens?integer

Cost per 1M input tokens in microcents

Formatint64
model*string
output_per_1m_tokens?integer

Cost per 1M output tokens in microcents

Formatint64
owner*||||

Owner scope for model pricing configuration

per_1m_characters?integer|null

Cost per 1M characters in microcents (for TTS)

Formatint64
per_image?integer|null

Cost per image in microcents

Formatint64
per_request?integer|null

Cost per request in microcents

Formatint64
per_second?integer|null

Cost per second of audio in microcents (for transcription/translation)

Formatint64
provider*string
reasoning_per_1m_tokens?integer|null

Cost per 1M reasoning tokens in microcents

Formatint64
source?string

Source of pricing data

Value in"manual" | "provider_api" | "default"

Response Body

application/json

curl -X POST "https://loading/admin/v1/model-pricing/upsert" \  -H "Content-Type: application/json" \  -d '{    "model": "string",    "owner": {      "type": "global"    },    "provider": "string"  }'
{
  "cache_write_per_1m_tokens": 0,
  "cached_input_per_1m_tokens": 0,
  "created_at": "2019-08-24T14:15:22Z",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "input_per_1m_tokens": 0,
  "model": "string",
  "output_per_1m_tokens": 0,
  "owner": {
    "type": "global"
  },
  "per_1m_characters": 0,
  "per_image": 0,
  "per_request": 0,
  "per_second": 0,
  "provider": "string",
  "reasoning_per_1m_tokens": 0,
  "source": "manual",
  "updated_at": "2019-08-24T14:15:22Z"
}

Get a model pricing entry by ID

GET
/admin/v1/model-pricing/{id}
AuthorizationBearer <token>

API key authentication using Bearer token format

In: header

Path Parameters

id*string

Model pricing ID

Formatuuid

Response Body

application/json

application/json

curl -X GET "https://loading/admin/v1/model-pricing/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "cache_write_per_1m_tokens": 0,
  "cached_input_per_1m_tokens": 0,
  "created_at": "2019-08-24T14:15:22Z",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "input_per_1m_tokens": 0,
  "model": "string",
  "output_per_1m_tokens": 0,
  "owner": {
    "type": "global"
  },
  "per_1m_characters": 0,
  "per_image": 0,
  "per_request": 0,
  "per_second": 0,
  "provider": "string",
  "reasoning_per_1m_tokens": 0,
  "source": "manual",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "error": {
    "code": "budget_exceeded",
    "message": "Budget limit exceeded for monthly period",
    "param": null,
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "invalid_request_error"
  }
}

Update a model pricing entry

PATCH
/admin/v1/model-pricing/{id}
AuthorizationBearer <token>

API key authentication using Bearer token format

In: header

Path Parameters

id*string

Model pricing ID

Formatuuid

Request Body

application/json

cache_write_per_1m_tokens?integer|null

Cost per 1M cache write tokens in microcents

Formatint64
cached_input_per_1m_tokens?integer|null

Cost per 1M cached input tokens in microcents

Formatint64
input_per_1m_tokens?integer|null

Cost per 1M input tokens in microcents

Formatint64
output_per_1m_tokens?integer|null

Cost per 1M output tokens in microcents

Formatint64
per_1m_characters?integer|null

Cost per 1M characters in microcents (for TTS)

Formatint64
per_image?integer|null

Cost per image in microcents

Formatint64
per_request?integer|null

Cost per request in microcents

Formatint64
per_second?integer|null

Cost per second of audio in microcents (for transcription/translation)

Formatint64
reasoning_per_1m_tokens?integer|null

Cost per 1M reasoning tokens in microcents

Formatint64
source?null|PricingSource

Response Body

application/json

application/json

curl -X PATCH "https://loading/admin/v1/model-pricing/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{
  "cache_write_per_1m_tokens": 0,
  "cached_input_per_1m_tokens": 0,
  "created_at": "2019-08-24T14:15:22Z",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "input_per_1m_tokens": 0,
  "model": "string",
  "output_per_1m_tokens": 0,
  "owner": {
    "type": "global"
  },
  "per_1m_characters": 0,
  "per_image": 0,
  "per_request": 0,
  "per_second": 0,
  "provider": "string",
  "reasoning_per_1m_tokens": 0,
  "source": "manual",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "error": {
    "code": "budget_exceeded",
    "message": "Budget limit exceeded for monthly period",
    "param": null,
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "invalid_request_error"
  }
}

Delete a model pricing entry

DELETE
/admin/v1/model-pricing/{id}
AuthorizationBearer <token>

API key authentication using Bearer token format

In: header

Path Parameters

id*string

Model pricing ID

Formatuuid

Response Body

application/json

curl -X DELETE "https://loading/admin/v1/model-pricing/497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{
  "error": {
    "code": "budget_exceeded",
    "message": "Budget limit exceeded for monthly period",
    "param": null,
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "invalid_request_error"
  }
}

List model pricing for an organization

GET
/admin/v1/organizations/{org_slug}/model-pricing
AuthorizationBearer <token>

API key authentication using Bearer token format

In: header

Path Parameters

org_slug*string

Organization slug

Query Parameters

limit?integer|null

Maximum number of results to return

Formatint64
cursor?string|null

Cursor for keyset pagination. Encoded as base64 string.

direction?string|null

Pagination direction: "forward" (default) or "backward".

include_deleted?boolean|null

Include soft-deleted records in results

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/admin/v1/organizations/string/model-pricing"
{
  "data": [
    {
      "cache_write_per_1m_tokens": 0,
      "cached_input_per_1m_tokens": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "input_per_1m_tokens": 0,
      "model": "string",
      "output_per_1m_tokens": 0,
      "owner": {
        "type": "global"
      },
      "per_1m_characters": 0,
      "per_image": 0,
      "per_request": 0,
      "per_second": 0,
      "provider": "string",
      "reasoning_per_1m_tokens": 0,
      "source": "manual",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "pagination": {
    "has_more": true,
    "limit": 100,
    "next_cursor": "MTczMzU4MDgwMDAwMDphYmMxMjM0NS02Nzg5LTAxMjMtNDU2Ny0wMTIzNDU2Nzg5YWI",
    "prev_cursor": "string"
  }
}
{
  "error": {
    "code": "budget_exceeded",
    "message": "Budget limit exceeded for monthly period",
    "param": null,
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "invalid_request_error"
  }
}
{
  "error": {
    "code": "budget_exceeded",
    "message": "Budget limit exceeded for monthly period",
    "param": null,
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "invalid_request_error"
  }
}

List model pricing for a project

GET
/admin/v1/organizations/{org_slug}/projects/{project_slug}/model-pricing
AuthorizationBearer <token>

API key authentication using Bearer token format

In: header

Path Parameters

org_slug*string

Organization slug

project_slug*string

Project slug

Query Parameters

limit?integer|null

Maximum number of results to return

Formatint64
cursor?string|null

Cursor for keyset pagination. Encoded as base64 string.

direction?string|null

Pagination direction: "forward" (default) or "backward".

include_deleted?boolean|null

Include soft-deleted records in results

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/admin/v1/organizations/string/projects/string/model-pricing"
{
  "data": [
    {
      "cache_write_per_1m_tokens": 0,
      "cached_input_per_1m_tokens": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "input_per_1m_tokens": 0,
      "model": "string",
      "output_per_1m_tokens": 0,
      "owner": {
        "type": "global"
      },
      "per_1m_characters": 0,
      "per_image": 0,
      "per_request": 0,
      "per_second": 0,
      "provider": "string",
      "reasoning_per_1m_tokens": 0,
      "source": "manual",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "pagination": {
    "has_more": true,
    "limit": 100,
    "next_cursor": "MTczMzU4MDgwMDAwMDphYmMxMjM0NS02Nzg5LTAxMjMtNDU2Ny0wMTIzNDU2Nzg5YWI",
    "prev_cursor": "string"
  }
}
{
  "error": {
    "code": "budget_exceeded",
    "message": "Budget limit exceeded for monthly period",
    "param": null,
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "invalid_request_error"
  }
}
{
  "error": {
    "code": "budget_exceeded",
    "message": "Budget limit exceeded for monthly period",
    "param": null,
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "invalid_request_error"
  }
}

List model pricing for a user

GET
/admin/v1/users/{user_id}/model-pricing
AuthorizationBearer <token>

API key authentication using Bearer token format

In: header

Path Parameters

user_id*string

User ID

Formatuuid

Query Parameters

limit?integer|null

Maximum number of results to return

Formatint64
cursor?string|null

Cursor for keyset pagination. Encoded as base64 string.

direction?string|null

Pagination direction: "forward" (default) or "backward".

include_deleted?boolean|null

Include soft-deleted records in results

Response Body

application/json

application/json

curl -X GET "https://loading/admin/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/model-pricing"
{
  "data": [
    {
      "cache_write_per_1m_tokens": 0,
      "cached_input_per_1m_tokens": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "input_per_1m_tokens": 0,
      "model": "string",
      "output_per_1m_tokens": 0,
      "owner": {
        "type": "global"
      },
      "per_1m_characters": 0,
      "per_image": 0,
      "per_request": 0,
      "per_second": 0,
      "provider": "string",
      "reasoning_per_1m_tokens": 0,
      "source": "manual",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "pagination": {
    "has_more": true,
    "limit": 100,
    "next_cursor": "MTczMzU4MDgwMDAwMDphYmMxMjM0NS02Nzg5LTAxMjMtNDU2Ny0wMTIzNDU2Nzg5YWI",
    "prev_cursor": "string"
  }
}
{
  "error": {
    "code": "budget_exceeded",
    "message": "Budget limit exceeded for monthly period",
    "param": null,
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "invalid_request_error"
  }
}