Caches

Get a cached response

Changed on

Retrieve a cached response by its organization-scoped cache key. API-key responses omit internal numeric IDs.

get/api/caches/{cache_key}/

Request

  • Base URL
    https://api.respan.ai
  • URL
    https://api.respan.ai/api/caches/{cache_key}/
  • Auth
    • HTTP bearer
    • or HTTP bearer

Path parameters

cache_keystring required

Organization-scoped cache key returned by the cache list endpoint.

Response

Cached response details.

idinteger

Internal numeric ID. Present only for dashboard-JWT responses.

cache_keystring required

Organization-scoped public cache key.

prompt_contentstring required

Prompt text extracted from the cached request.

response_contentstring required

Response text extracted from the cached response.

request_contentstring

Stored request text preview. The current backend serializer truncates this field to roughly the first 100 characters.

prompt_messagesobject[]

Original prompt message array stored with the cache entry.

full_responseobject

Full cached provider response object.

hit_countinteger required

Live cache hit count enriched from ClickHouse.

response_timenumber

Stored response time for the cached entry, in seconds.

timestampstring date-time required

When the cache entry was created.

updated_atstring date-time required

When the cache entry was last updated.

expiry_datestring date-time nullable

When the cache entry expires. Always in the future; an entry whose expiry is past or null returns 404.

Example response

{
  "id": 123,
  "cache_key": "cached_response_550e8400-e29b-41d4_abc123def456",
  "prompt_content": "What is the capital of France?",
  "response_content": "The capital of France is Paris.",
  "request_content": "What is the capital of France?",
  "prompt_messages": [
    {
      "role": "user",
      "content": "What is the capital of France?"
    }
  ],
  "full_response": {
    "choices": [
      {
        "message": {
          "role": "assistant",
          "content": "The capital of France is Paris."
        }
      }
    ]
  },
  "hit_count": 42,
  "response_time": 0.5,
  "timestamp": "2026-04-10T12:00:00Z",
  "updated_at": "2026-04-10T12:00:00Z",
  "expiry_date": "2026-05-10T12:00:00Z"
}

Changes

    • breaking

      the response property became nullable for the status

    • breaking

      the response's property format changed from double to no format for status

    • info

      api operation id caches_api_caches_retrieve removed and replaced with api_caches_retrieve

    • info

      the endpoint scheme security DashboardJwt was added to the API

    • info

      api tag Caches added

    • info

      api tag caches removed

    • warning

      removed the optional property from the response with the status

    • info

      added the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      added the required property to the response with the status