Skip to content
Last updated

Track which AI models your API key has recently used to provide a better user experience.

GEThttps://api.aitronos.com/v1/models?include_recent_usage=true

Overview

The Recently Used Models feature automatically tracks which models each API key uses, allowing you to display recently accessed models in your UI for quick selection.

How It Works

  • Automatic Tracking: Every time you make a request with a specific model, the system records the timestamp
  • Per API Key: Each API key has its own usage history
  • Timestamp Updates: Using the same model again updates the timestamp to the current time
  • Usage Counter: Tracks how many times each model has been used

Query Parameters

include_recent_usage boolean optional · Defaults to false

Include last_used_at timestamp for each model.

ui_models_only boolean optional · Defaults to false

Filter to UI-visible models only.

include_capabilities boolean optional · Defaults to true

Include model capabilities.

include_details boolean optional · Defaults to false

Include detailed model information.


Returns

A list of Model objects with last_used_at timestamps.

Fields:

  • last_used_at (string | null): ISO 8601 timestamp of when this model was last used by your API key. null if never used.

Important Notes

  • API Key Only: This feature only works with API key authentication. Bearer token authentication does not track model usage.
  • Per Key Tracking: Each API key maintains its own usage history. Different keys will have different recently used models.
  • Automatic Updates: You don't need to do anything special - just use models normally and the tracking happens automatically.
  • No Performance Impact: Tracking is done asynchronously and won't slow down your requests.
  • Privacy: Usage data is only visible to the API key that generated it.

Use Cases

  1. Quick Model Selection: Show users their most frequently used models at the top of dropdowns
  2. Personalized Experience: Customize the UI based on user preferences
  3. Model Switching: Make it easy to switch between recently used models
  4. Usage Analytics: Track which models are most popular for your use case
cURL
curl "https://api.aitronos.com/v1/models?include_recent_usage=true" \
  -H "X-API-Key: $FREDDY_API_KEY"

Response:

200 OK
{
  "models": [
    {
      "id": "mdl_09adacc3e5d3",
      "key": "gpt-4o",
      "name": "GPT-4o",
      "description": "Most advanced multimodal model",
      "last_used_at": "2026-01-16T08:15:42Z",
      "is_visible_in_ui": true,
      "availability_status": "general_availability",
      "recommended_for": ["general_purpose", "reasoning"],
      "capabilities": ["text_generation", "vision", "tool_calling"]
    },
    {
      "id": "mdl_abc123def456",
      "key": "claude-sonnet-4.5",
      "name": "Claude Sonnet 4.5",
      "last_used_at": "2026-01-16T08:14:30Z",
      "is_visible_in_ui": true,
      "capabilities": ["text_generation", "vision"]
    },
    {
      "id": "mdl_xyz789ghi012",
      "key": "ftg-3.0-speed",
      "name": "FTG 3.0 Speed",
      "last_used_at": null,
      "is_visible_in_ui": true,
      "capabilities": ["text_generation"]
    }
  ],
  "total_count": 3
}