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.
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.
Every model, one interface
Three native adapters for full vendor fidelity, and one generic adapter that reaches the long tail of hosts speaking OpenAI’s wire format.
provider/anthropicown moduleClaude, native. A separate module, because it is built on the official Anthropic SDK and that brings a dozen transitive dependencies nobody else should pay for.
Claude Opus 5, Fable 5, Sonnet 5, Haiku 4.5, and the 4.x family
provider/openaiGPT, native. Ships inside the core module, so it costs you no dependencies.
GPT-5.6 (Sol, Terra, Luna), GPT-5.5, GPT-5.4 nano, the o-series, and gpt-oss
provider/geminiGemini, native. Handles Gemini’s structural differences — contents/parts, the "model" role in place of "assistant", and systemInstruction — so your Request does not have to.
Gemini 3.6 Flash, 3.5/3.1 Flash-Lite, and 3 Pro
provider/openaicompatOne adapter, configured per host, reaching the long tail of vendors that speak OpenAI's wire format — including local runtimes that need no credential at all.
~18 hosts including xAI, DeepSeek, Groq, OpenRouter, Ollama, vLLM and LM Studio
18 verified compatible endpoints — including Ollama, vLLM and LM Studio, which need no credential at all.
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-sandboxStatus: 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.