Skip to content

GET /v1/resources

Summary

Returns the set of available models and their capabilities. Use this endpoint to discover which models are available, what modality they support, and which run options they accept.

The response includes a content hash that can be used for cache invalidation. CLI tools send the hash via the cli-agent header; if the hash no longer matches, the server sets an action-require response header signalling that the client should refresh its local cache.

HTTP Request

http
GET /v1/resources

Response

Success (200 OK)

Returns a JSON object whose status is "SUCCESS" and a data object containing:

FieldTypeDescription
hashstringBase64url-encoded content hash. Use this to detect changes in available models.
resourcesobjectContainer for available resources.
resources.modelsarray of objectsList of available models.
resources.models[].modelstringModel identifier (e.g. "gpt-4o", "dall-e-3").
resources.models[].modalitystringModel modality: "text", "image", or "video".
resources.models[].availableRunOptionsarray of objectsRun options this model supports. Empty array if none.
resources.models[].availableRunOptions[].keystringOption key (e.g. "reasoningEffort", "quality").
resources.models[].availableRunOptions[].optionsarray of stringsAccepted values for this option.

Example response

json
{
  "status": "SUCCESS",
  "data": {
    "hash": "dGhpcyBpcyBhIGhhc2g",
    "resources": {
      "models": [
        {
          "model": "o3",
          "modality": "text",
          "availableRunOptions": [
            {
              "key": "reasoningEffort",
              "options": ["low", "medium", "high"]
            }
          ]
        },
        {
          "model": "gpt-image-1",
          "modality": "image",
          "availableRunOptions": [
            {
              "key": "quality",
              "options": ["low", "medium", "high"]
            }
          ]
        },
        {
          "model": "gpt-4o",
          "modality": "text",
          "availableRunOptions": []
        }
      ]
    }
  }
}

Error responses

HTTP statusstatus codeDescription
401UNAUTHORIZED_ERRORMissing or invalid API key.

See also