---
title: "Price history of a model"
description: "Every dated list row of a model, both dates on each, and your cost rows for it."
canonical_url: "https://twominutebilling.com/help/developers/api-reference/model-prices/price-history-of-a-model"
---
# Price history of a model

> Every dated list row of a model, both dates on each, and your cost rows for it.

<api-operation method="GET" path="/v1/organization/model_prices/history">
<template v-slot:docs="">

## Query parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        model
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      The model id.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        provider
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Only this provider.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        token_type
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Only this token type.
    </td>
  </tr>
</tbody>
</table>

## Response

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The object type; always <code>
        model_price_history
      </code>
      
      . One of <code>
        model_price_history
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        provider
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The payment provider.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        model
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The pricing model.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        prices
      </code>
    </td>
    
    <td>
      <code>
        array of object
      </code>
    </td>
    
    <td>
      The model price history's prices.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        costs
      </code>
    </td>
    
    <td>
      <code>
        array of object
      </code>
    </td>
    
    <td>
      The model price history's costs.
    </td>
  </tr>
</tbody>
</table>

## Status codes

<table>
<thead>
  <tr>
    <th>
      Status
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        200
      </code>
    </td>
    
    <td>
      The model's price history.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        400
      </code>
    </td>
    
    <td>
      A parameter is not correct.
    </td>
  </tr>
</tbody>
</table>
</template>

<template v-slot:request="">

```bash [Request]
curl "$TMBILLING_URL/v1/organization/model_prices/history?model=flat" \
  -H "Authorization: Bearer $TMBILLING_API_KEY"
```

</template>

<template v-slot:response="">
<code-group>

```json [200 OK]
{
  "object": "model_price_history",
  "provider": "stripe",
  "model": "flat",
  "prices": [
    {
      "object": "model_price",
      "id": "mpr_XXXXXXXXXXXX01",
      "provider": "openai",
      "model": "gpt-4o",
      "token_type": "input",
      "currency": "USD"
    }
  ],
  "costs": [
    {
      "object": "model_cost_override",
      "id": "mco_XXXXXXXXXXXX01",
      "provider": "stripe",
      "model": "flat",
      "token_type": "input",
      "currency": "USD"
    }
  ]
}
```

```json [400 Bad Request]
{
  "error": {
    "type": "invalid_request_error",
    "message": "A parameter is not correct."
  }
}
```

</code-group>
</template>
</api-operation>


## Sitemap

See the full [sitemap](https://twominutebilling.com/sitemap.md) for all pages.
