Skip to content
skyl

v1.0.0 · Apache 2.0 · Go 1.22+

skyl

One Go interface for every AI model.

Talk to Claude, GPT, Gemini, Ollama and 400+ other models through a single, stable interface — then switch between them by changing one string.

main.go
client := skyl.New(anthropic.New(os.Getenv("ANTHROPIC_API_KEY")))
resp, err := client.Complete(ctx, &skyl.Request{    Model: "claude-opus-5",    Messages: []skyl.Message{skyl.UserText("Hello")},})
fmt.Println(resp.Text())

The highlighted line is the only one that changes.

Why skyl

Integrating an AI model into a Go service means writing the same 400 lines every time: request mapping, SSE parsing, retry with jitter, rate-limit backoff, token accounting, error classification. skyl does that once, properly, with tests.

Provider-agnostic

One Request and Response shape across every vendor. Your application code never learns a vendor’s JSON.

Zero-day model support

Model IDs are pass-through strings. A model released this morning works this morning, with no skyl release.

No lock-in

Every response carries Raw — the untouched provider JSON — so skyl’s abstraction is never the reason you cannot ship.

Streaming that works

A pull iterator with proper context cancellation, verified by a goroutine-leak test rather than by convention.

Honest errors

Typed and classified, so you branch with errors.Is instead of matching on message text that vendors reword.

Small surface

The core module has zero external dependencies. No router, no logger, no framework imposed on you.

Try it without an API key

skyl ships a sandbox that speaks all four providers’ wire protocols locally. Every example in this documentation runs against it — no signup, no credential, no cost.

go run ./cmd/skyl-sandbox

Read the no-API-key guide →

Status: v1.0.0 — the API is stable, the feature surface is not complete

Every adapter has been exercised against its live provider API, so the wire mapping is confirmed rather than merely self-consistent. Since v1.0.0 the exported API is frozen: no breaking change without a major version. What is not promised is complete provider coverage. Each adapter still silently ignores some provider features, and embeddings, prompt-caching control, batch APIs, token counting and failover are deliberately deferred. Both lists are published rather than implied.

What stands between this and production use →