Snapshot Diff
1 creditGET /api/premium/history/compareThe snapshot diff endpoint compares two daily history snapshots and returns the added, removed, and changed entries with deltas. Useful for "what changed in the AI pricing market between March 1 and April 1" or "which model benchmark scores moved" queries that would otherwise require multiple calls and client-side joining.
When to use this endpoint
When you need a structured diff between two specific dates rather than a continuous time series. For continuous evolution use the series endpoints.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| from* | query | string | Earlier snapshot date YYYY-MM-DD |
| to* | query | string | Later snapshot date YYYY-MM-DD |
| type | query | string | pricing or benchmarks (default pricing) |
* required
Example response
{
"ok": true,
"type": "pricing",
"from_date": "2026-04-01", "to_date": "2026-04-27",
"added": [{ "model": "Opus 4.7", "provider": "Anthropic", "inputPrice": 15, "outputPrice": 75 }],
"removed": [],
"changed": [
{ "model": "GPT-5.5", "field": "inputPrice", "from": 12, "to": 10, "delta_pct": -16.67 }
],
"unchanged_count": 8
}Code samples
Python SDK
from tensorfeed import TensorFeed
tf = TensorFeed(token="tf_live_...")
diff = tf.history_compare(from_date="2026-04-01", to_date="2026-04-27")
print(f"{len(diff['changed'])} changes, {len(diff['added'])} new models")TypeScript SDK
import { TensorFeed } from 'tensorfeed';
const tf = new TensorFeed({ token: 'tf_live_...' });
const diff = await tf.historyCompare({ from: '2026-04-01', to: '2026-04-27' });MCP tool
Available via the TensorFeed MCP server as history_compare. Add npx -y @tensorfeed/mcp-server to your Claude Desktop or Claude Code MCP config.