celedog (Go)
OpenAI-compatible Go client for Celedog.io — one API, 400+ AI models, pay as you go.
go get github.com/AIRES-Technology/celedog-go
Quick start
package main
import (
"context"
"fmt"
"github.com/AIRES-Technology/celedog-go"
openai "github.com/sashabaranov/go-openai"
)
func main() {
// Reads CELEDOG_API_KEY from the env; or pass it directly:
// celedog.NewClient("sk-celedog-...")
client := celedog.NewClient("")
resp, err := client.CreateChatCompletion(
context.Background(),
openai.ChatCompletionRequest{
Model: "gpt-4o",
Messages: []openai.ChatCompletionMessage{
{Role: openai.ChatMessageRoleUser, Content: "Hello, Celedog!"},
},
},
)
if err != nil {
panic(err)
}
fmt.Println(resp.Choices[0].Message.Content)
}
Streaming, tool calls, vision, embeddings — every feature of the official github.com/sashabaranov/go-openai SDK works unchanged. Celedog is wire-compatible with the OpenAI API; this package is a thin factory that pins the base URL.
Configuration
| Source |
Variable |
Default |
NewClient(apiKey) first arg |
— |
empty |
| Env |
CELEDOG_API_KEY |
— |
| Env (fallback) |
OPENAI_API_KEY |
— |
| Env |
CELEDOG_BASE_URL |
https://celedog.io/v1 |
Other languages
Celedog ships parity SDKs for every major language — pick the one you use:
| Language |
Install |
| Python |
pip install celedog |
| Node.js / TypeScript |
npm install celedog |
| Go |
go get github.com/AIRES-Technology/celedog-go |
| Java |
Maven coordinate io.celedog:celedog:0.1.0 (GitHub Packages — see celedog-java) |
All four expose the same env vars and the same fall-back chain.
License
MIT — free to use and integrate. The Celedog gateway server itself is AGPL-3.0 (see celedog.io); SDK code is permissive so you can ship it inside your closed-source app.