К содержимому
CheapLLM

Как подключить CheapLLM к Go

Официальный Go SDK от OpenAI. Пошаговая настройка CheapLLM API в Go с доступом к Claude, GPT-6, Gemini и DeepSeek до 70% дешевле.

4 мин чтенияОбновлено: нояб. 2026 г.

1. Создайте API-ключ CheapLLM

Создайте аккаунт CheapLLM и выпустите API-ключ (sk-clm-YOUR_API_KEY) — один ключ открывает доступ ко всем 49+ моделям OpenAI, Anthropic, Google и DeepSeek до 70% дешевле официальных прайсов.

Base URL (OpenAI-совместимый)
https://api.cheapllm.app/v1

2. Установите openai-go

Терминал
go get github.com/openai/openai-go

3. Отправьте первый запрос

main.go
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.cheapllm.app/v1"),
		option.WithAPIKey("sk-clm-YOUR_API_KEY"),
	)
	res, _ := client.Chat.Completions.New(context.Background(), openai.ChatCompletionNewParams{
		Model: "gpt-6.2-sol",
		Messages: []openai.ChatCompletionMessageParamUnion{
			openai.UserMessage("Привет!"),
		},
	})
	fmt.Println(res.Choices[0].Message.Content)
}

Лучшие модели для Go

Все 49+ моделей →
МодельОфициально (вх / вых)CheapLLM (вх / вых)Экономия
Claude Opus 5.5$4.00 / $20.00$2.80 / $14.00−30%
GPT-6.1 Sol$2.00 / $10.00$1.40 / $7.00−30%
Gemini 4 Argon$2.00 / $10.00$1.40 / $7.00−30%
DeepSeek V4 Pro 0813$0.11 / $4.44$0.078 / $3.11−30%
← Все 55 гайдов по подключению