# SDKs

Although we haven't developed our official SDK, our API interface is designed to be fully compatible with OpenAI. This means that you can seamlessly integrate our API into your projects using the OpenAI SDK to make calls to our services.

Here are examples of how to use the OpenAI SDK to call Slier.AI API interface:

### Install <a href="#install" id="install"></a>

Python

```python
pip install openai
```

### Chat <a href="#chat" id="chat"></a>

Feel free to input any of our supported models in the 'model' field, including Claude.

#### Example

Python

```python
import os
import openai

openai.api_base = "https://api.Slier.ai/v1"
# openai.api_base = "https://api.Slier.ai/v2"
openai.api_key = os.getenv("Slier_AI_API_KEY")

completion = openai.ChatCompletion.create(
  model="claude-instant-1",
  messages=[
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Hello!"}
  ],
  stream=False,
  model_params={
    "temperature": 0.8
  }
)

print(completion.choices[0].message)
```

### Search <a href="#search" id="search"></a>

Our Search model is currently not compatible with the OpenAI SDK. However, you can directly access the API by referring to the API Reference .

### Images <a href="#images" id="images"></a>

Remember to pass the model parameter.

#### Example

```python
import os
import openai

openai.api_base = "https://api.Slier.ai/v1"
# openai.api_base = "https://api.Slier.ai/v2"
openai.api_key = os.getenv("Slier_AI_API_KEY")

images = openai.Image.create(
  model="dall-e-2",
  prompt="A cute baby sea otter",
  model_params={
    "n": 1,
    "size": "1024x1024"
  }
)
print(images.data)
```
