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

# List Models

> Returns a list of all AI models currently available on Samurai AI.

<RequestExample>
  ```bash cURL theme={null}
  curl https://www.samuraiapi.in/v1/models \
    -H "Authorization: Bearer $SAMURAI_API_KEY"
  ```

  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      api_key="sk-samurai-YOUR_KEY",
      base_url="https://www.samuraiapi.in/v1"
  )

  models = client.models.list()
  for model in models.data:
      print(model.id)
  ```

  ```javascript Node.js theme={null}
  const models = await client.models.list();
  models.data.forEach(m => console.log(m.id));
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "object": "list",
    "data": [
      {
        "id": "gpt-4o",
        "object": "model",
        "created": 1715000000,
        "owned_by": "openai"
      },
      {
        "id": "claude-3-5-sonnet-20241022",
        "object": "model",
        "created": 1715000000,
        "owned_by": "anthropic"
      },
      {
        "id": "gemini-2.0-flash",
        "object": "model",
        "created": 1715000000,
        "owned_by": "google"
      }
    ]
  }
  ```
</ResponseExample>
