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

# Model Select or Create

IronlabsAI recommends the best-suited LLM to respond by analyzing an array of messages and a list of available LLMs, letting you handle the LLM calls however you like.

## When to use `model_select`

Use `model_select` if you want to integrate `IronlabsAI` into an existing project.
The lightweight `ironlabsai` package minimizes dependency conflicts and works smoothly with your existing code for making LLM requests.

<CodeGroup>
  ```Python Python theme={null}
  selected_models = client.chat.completions.model_select(
      messages=[
          {"role": "system", "content": "You are a helpful assistant."},
          {"role": "user", "content": "Explain the golden ratio."}
      ],
    	models=['openai/gpt-4o', 'anthropic/claude-3-5-sonnet-20240620']
  )

  ## Response output
  # selected_models = 'openai/gpt-4o'

  ```

  ```TypeScript TypeScript theme={null}
  const result = await client.modelSelect({
    messages: [{ content: 'Explain the golden ratio.', role: 'user' }],
    models: ['openai/gpt-4o', 'anthropic/claude-3-5-sonnet-20240620'],
  });
  ```
</CodeGroup>

## When to use `create`

Use `create` if you’re starting a new project & want to skip writing extra code for LLM calls.
Most examples here use create, but you can switch to `model_select` anytime.

<CodeGroup>
  ```python Python theme={null}
  completion_response, selected_models = client.completions.create(
      messages=[
          {"role": "system", "content": "You are a helpful assistant."},
          {"role": "user", "content": "Explain the golden ratio."}
      ],
    	models=['openai/gpt-4o', 'anthropic/claude-3-5-sonnet-20240620']
  )
  ```

  ```TypeScript TypeScript theme={null}
  const result = await client.create({
    messages: [{ content: 'Explain the golden ratio.', role: 'user' }],
    models: ['openai/gpt-4o', 'anthropic/claude-3-5-sonnet-20240620'],
  });
  ```
</CodeGroup>
