Skip to content
skyl

v0.1.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: pre-v1, and not yet validated against live provider APIs

Everything here is implemented, unit-tested, contract-tested, exercised end to end over real sockets, and CI-green — but every fake in the test suite was written from the same provider documentation as the adapter it tests. If a field name is wrong, the fake is wrong in the same way and both stay green. No adapter has yet made a call to a real provider. Treat it as ready to evaluate, not ready to depend on in production.

What stands between this and production use →