Integration guide
How to use Fiber with an OpenAI-compatible endpoint (Go)
Fiber integration guide for Go. Connect to an OpenAI-compatible endpoint with a base URL swap and keep the same request schema.
Updated 2026-01-06
Fiber works with OpenAI-compatible APIs by switching the base URL and API key.
This guide shows a Go example plus a test vector you can run to validate responses.
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
payload := []byte(`{
"model": "abliterated-model",
"messages": [
{ "role": "user", "content": "Respond with: Fiber Go ready." }
],
"temperature": 0.2
}`)
req, _ := http.NewRequest("POST", "https://api.abliteration.ai/v1/chat/completions", bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer "+os.Getenv("ABLIT_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}Configure Fiber
Follow this checklist to point your integration at the OpenAI-compatible endpoint.
OpenAI-compatible payload
Use this request body as a known-good payload before customizing parameters.
{
"model": "abliterated-model",
"messages": [
{ "role": "user", "content": "Respond with: Fiber Go ready." }
],
"temperature": 0.2
}Streaming and tool calling readiness
If you stream responses or send tool definitions, keep the OpenAI-compatible schema and validate against the OpenAPI spec.