Skip to main content
Hero Light

Overview

The Dedalus Go SDK provides convenient access to the Dedalus REST API from applications written in Go. Built with Stainless, it offers a type-safe, idiomatic Go interface for interacting with AI models and services.

Quickstart

Get started with your first chat completion in minutes

Installation

Install the SDK and set up your development environment

Key Features

Create conversational AI experiences with support for streaming responses, system messages, and multi-turn conversations.
Generate vector embeddings for text inputs to power semantic search, clustering, and recommendation systems.
Comprehensive audio capabilities including speech synthesis (text-to-speech), transcription (speech-to-text), and audio translation.
Create, edit, and generate variations of images using powerful AI models.
List available models and retrieve detailed information about model capabilities and configurations.
Use generic Field types to distinguish between zero values, null values, and omitted fields, preventing accidental errors.
Built-in retry logic with exponential backoff for connection errors, timeouts, and rate limits.
Add custom request/response handling with middleware for logging, monitoring, and request modification.
Switch between production and development environments with simple configuration options.
Seamless file upload support for audio transcription, image generation, and other file-based operations.

OpenAI Compatible

The Dedalus SDK maintains full compatibility with OpenAI API standards while providing additional Dedalus-specific features like server-side tool execution and MCP error reporting.

Quick Example

package main

import (
	"context"
	"fmt"

	"github.com/dedalus-labs/dedalus-sdk-go"
	"github.com/dedalus-labs/dedalus-sdk-go/option"
	"github.com/dedalus-labs/dedalus-sdk-go/shared"
)

func main() {
	client := githubcomdedaluslabsdedalussdkgo.NewClient(
		option.WithAPIKey("My API Key"),
	)
	chatCompletion, err := client.Chat.Completions.New(context.TODO(), githubcomdedaluslabsdedalussdkgo.ChatCompletionNewParams{
		Model: githubcomdedaluslabsdedalussdkgo.F[githubcomdedaluslabsdedalussdkgo.ChatCompletionNewParamsModelUnion](shared.UnionString("openai/gpt-5-nano")),
		Messages: githubcomdedaluslabsdedalussdkgo.F([]githubcomdedaluslabsdedalussdkgo.ChatCompletionNewParamsMessageUnion{
			githubcomdedaluslabsdedalussdkgo.ChatCompletionUserMessageParam{
				Role:    githubcomdedaluslabsdedalussdkgo.F(githubcomdedaluslabsdedalussdkgo.ChatCompletionUserMessageParamRoleUser),
				Content: githubcomdedaluslabsdedalussdkgo.F[githubcomdedaluslabsdedalussdkgo.ChatCompletionUserMessageParamContentUnion](shared.UnionString("Hello!")),
			},
		}),
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", chatCompletion.ID)
}

Next Steps

API Reference

Explore the complete API documentation

GitHub Repository

View source code and contribute

Build docs developers (and LLMs) love