> ## Documentation Index
> Fetch the complete documentation index at: https://gaia-docs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get User Models

> Retrieves the current user's configured AI models and credentials

## Response

<ResponseField name="success" type="boolean">
  Indicates if the operation was successful
</ResponseField>

<ResponseField name="ai_models" type="array">
  Array of user's configured language models with credentials
</ResponseField>

<ResponseField name="embeddings" type="array">
  Array of user's configured embedding models with credentials
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.yourapp.com/api/ai/user-models \
    --header 'Authorization: Bearer <token>'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.yourapp.com/api/ai/user-models', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer <token>'
    }
  });

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.yourapp.com/api/ai/user-models"
  headers = {
      "Authorization": "Bearer <token>"
  }

  response = requests.get(url, headers=headers)
  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "success": true,
    "ai_models": [
      {
        "id": "user_model_123",
        "modelId": "gpt-4o",
        "provider": "OpenAI",
        "apiKey": "sk-...xyz",
        "isDefault": true,
        "createdAt": "2024-01-15T10:30:00Z"
      },
      {
        "id": "user_model_456",
        "modelId": "claude-3-5-sonnet-20241022",
        "provider": "Anthropic",
        "apiKey": "sk-ant-...xyz",
        "isDefault": false,
        "createdAt": "2024-01-14T09:20:00Z"
      }
    ],
    "embeddings": [
      {
        "id": "user_embed_789",
        "modelId": "text-embedding-3-large",
        "provider": "OpenAI",
        "apiKey": "sk-...xyz",
        "isDefault": true,
        "createdAt": "2024-01-15T10:30:00Z"
      }
    ]
  }
  ```

  ```json Error Response theme={null}
  {
    "success": false,
    "message": "Unauthorized"
  }
  ```
</ResponseExample>
