Quick Start

Get started with the Selam API in minutes. This guide will walk you through setting up your API key and making your first request.

1. Get Your API Key

To use the Selam API, you'll need an API key. Follow these steps to generate one:

  1. Sign up or log in to your account at selamgpt.com
  2. Navigate to the API Keys page
  3. Click "Create New API Key"
  4. Give your key a name and select your tier (FREE, BETA, or PRO)
  5. Copy your API key and store it securely

Warning

Important: Keep your API key secure and never share it publicly. Treat it like a password. If you believe your key has been compromised, revoke it immediately and generate a new one.

2. Install the SDK (Optional)

The Selam API is OpenAI-compatible, so you can use the official OpenAI SDKs:

Python

pip install openai

JavaScript/Node.js

npm install openai

Information

You can also use the API directly with cURL or any HTTP client. No SDK required!

3. Make Your First Request

Here's how to make your first chat completion request:

Basic Chat Completion

1from openai import OpenAI
2
3# Initialize the client
4client = OpenAI(
5    api_key="your-api-key-here",
6    base_url="https://api.selamgpt.com/v1"
7)
8
9# Make a chat completion request
10response = client.chat.completions.create(
11    model="selam-turbo",
12    messages=[
13        {"role": "system", "content": "You are a helpful assistant."},
14        {"role": "user", "content": "What is the capital of Ethiopia?"}
15    ]
16)
17
18# Print the response
19print(response.choices[0].message.content)

Tip

Pro tip: Use environment variables to store your API key instead of hardcoding it. For Python: os.environ.get("SELAM_API_KEY"). For JavaScript: process.env.SELAM_API_KEY.

Common Use Cases

Here are some popular ways developers use the Selam API:

Chatbots

Build conversational AI assistants for customer support, education, or entertainment.

Code Generation

Generate, explain, or debug code using Selam-Coder for programming tasks.

Multilingual Models

Use models that understand and respond in Ethiopian languages with auto-detection or target language modes.

Image Generation

Create custom images for marketing, design, or creative projects.

Text-to-Speech

Convert text to natural-sounding speech in multiple languages and voices.

Web Search

Access real-time information with built-in web search capabilities.

Next Steps

Now that you've made your first request, explore more features:

Need Help?

If you run into any issues or have questions, we're here to help: