GET
/
v1
/
models
/
cURL
curl --request GET \
  --url https://core.dev.textlayer.ai/v1/models/
{
  "correlation_id": "<string>",
  "payload": {
    "chat_models": [
      {
        "id": "<string>",
        "name": "<string>",
        "metadata": {}
      }
    ],
    "embedding_models": [
      {
        "id": "<string>",
        "name": "<string>",
        "metadata": {}
      }
    ]
  },
  "status": 123
}

Models Endpoint

This endpoint returns a list of available chat and embedding models that can be used with TextLayer Core.

Response

{
  "status": 200,
  "payload": {
    "chat_models": [
      {
        "id": "gpt-4",
        "name": "GPT-4",
        "metadata": {
          "key": "GPT-4",
          "mode": "chat",
          "provider": "openai"
        }
      },
      {
        "id": "claude-3-opus",
        "name": "Claude 3 Opus",
        "metadata": {
          "key": "Claude 3 Opus",
          "mode": "chat",
          "provider": "anthropic"
        }
      }
    ],
    "embedding_models": [
      {
        "id": "text-embedding-ada-002",
        "name": "Text Embedding Ada 002",
        "metadata": {
          "key": "Text Embedding Ada 002",
          "mode": "embedding",
          "provider": "openai"
        }
      }
    ]
  },
  "correlation_id": "123e4567-e89b-12d3-a456-426614174000"
}
The response includes:
  • chat_models: List of available chat models with their IDs, names, and metadata
  • embedding_models: List of available embedding models with their IDs, names, and metadata
  • correlation_id: Unique identifier for tracking the request

Example Request

curl -X GET https://core.dev.textlayer.ai/v1/models

Response

200
application/json

List of available models

The response is of type object.