Documentation

Everything you need to point your code at 400+ models. If you already use the OpenAI SDK, change base_url and nothing else changes.

curl https://api.uttapen.ir/v1/chat/completions \
  -H "Authorization: Bearer sk-up-…" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5",
    "messages": [{"role": "user", "content": "Introduce yourself."}],
    "stream": true
  }'
from openai import OpenAI

client = OpenAI(
    base_url="https://api.uttapen.ir/v1",
    api_key="sk-up-…",
)

stream = client.chat.completions.create(
    model="openai/gpt-5",
    messages=[{"role": "user", "content": "Introduce yourself."}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="", flush=True)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.uttapen.ir/v1",
  apiKey: "sk-up-…",
});

const stream = await client.chat.completions.create({
  model: "openai/gpt-5",
  messages: [{ role: "user", content: "Introduce yourself." }],
  stream: true,
});
for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}
<?php
// composer require openai-php/client guzzlehttp/guzzle
$client = OpenAI::factory()
    ->withBaseUri('https://api.uttapen.ir/v1')
    ->withApiKey('sk-up-…')
    ->make();

$result = $client->chat()->create([
    'model' => 'openai/gpt-5',
    'messages' => [['role' => 'user', 'content' => 'Introduce yourself.']],
]);
echo $result->choices[0]->message->content;
package main

import (
	"context"
	"fmt"

	"github.com/openai/openai-go"
	"github.com/openai/openai-go/option"
)

func main() {
	client := openai.NewClient(
		option.WithBaseURL("https://api.uttapen.ir/v1"),
		option.WithAPIKey("sk-up-…"),
	)
	resp, err := client.Chat.Completions.New(context.Background(), openai.ChatCompletionNewParams{
		Model:    "openai/gpt-5",
		Messages: []openai.ChatCompletionMessageParamUnion{openai.UserMessage("Introduce yourself.")},
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(resp.Choices[0].Message.Content)
}

Prefer to watch? Video guides: first request, streaming, images and speech, LangChain →

Getting started

Capabilities

Media

API reference

SDKs and tools

Coding tools