DEVUP AI for Go
Call DEVUP AI models from your Go services with the official OpenAI Go SDK or go-openai. Set one base URL and your key, and keep the code you already write.
System Architecture
How Go Apps Connect to DEVUP AI
Configuration
Two Settings That Matter
Base URL
Pass it with option.WithBaseURL in openai-go, or set cfg.BaseURL in go-openai.
Model
Any DEVUP AI catalog ID works as the Model value.
Quick Start
Your First Request in Go
package main
import (
"context"
"fmt"
"log"
"os"
"time"
"github.com/openai/openai-go/v3"
"github.com/openai/openai-go/v3/option"
)
func main() {
client := openai.NewClient(
option.WithBaseURL("https://api.devupai.com/v1"),
option.WithAPIKey(os.Getenv("DEVUP_API_KEY")),
)
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
defer cancel()
completion, err := client.Chat.Completions.New(ctx, openai.ChatCompletionNewParams{
Model: "deepseek-ai/DeepSeek-V4-Pro",
Messages: []openai.ChatCompletionMessageParamUnion{
openai.UserMessage("Reply with exactly: Salam DEVUP"),
},
})
if err != nil {
log.Fatal(err)
}
if len(completion.Choices) == 0 {
log.Fatal("response contained no choices")
}
fmt.Println(completion.Choices[0].Message.Content)
}Set DEVUP_API_KEY, then run go run . to print Salam DEVUP.
Capabilities
Supported Capabilities
Streaming with usage
Stream tokens as they arrive; token usage arrives once, in the final chunk.
Tool calling
Let the model call your Go functions and answer with their results.
Structured output and embeddings
Decode strict JSON into Go structs, and create BAAI/bge-m3 vectors.
Local DZD billing
Metered billing in Algerian Dinar with BaridiMob, Edahabia, and CIB local payment support.
FAQ
Go and DEVUP AI
Does the OpenAI Go SDK work with DEVUP AI?
Yes. Pass option.WithBaseURL("https://api.devupai.com/v1") and your DEVUP AI key to openai.NewClient, then use any DEVUP AI catalog ID as the model.
Which Go version do I need?
Go 1.25 or newer for openai-go v3. go-openai works with Go 1.18 or newer.
How is usage from Go billed on DEVUP AI?
Every chat and embedding request is a regular DEVUP AI API call, metered in Algerian Dinar on your account.