Integrations

Uncensored LLM for Ruby on Rails

Call the OpenAI-compatible /v1/chat/completions endpoint from Ruby or Rails with your abliteration.ai API key.

Updated 2026-08-04

Use any Ruby HTTP client in Rails to call abliteration.ai by switching the base URL.

require "net/http"
require "json"

uri = URI("https://api.abliteration.ai/v1/chat/completions")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer #{ENV.fetch("ABLIT_KEY")}"
req["Content-Type"] = "application/json"
req.body = {
  model: "abliterated-model",
  messages: [{ role: "user", content: "Hello from Rails." }],
}.to_json

res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.body
FAQ

Frequently asked questions.

How do I fix a 401 Unauthorized error from abliteration.ai?

Check that your API key is set and sent as a Bearer token.

How do I fix a 404 Not Found error from abliteration.ai?

Make sure the base URL ends with /v1 and you call /chat/completions.

How do I fix a 400 Bad Request error from abliteration.ai?

Verify the model id and that messages are an array of { role, content } objects.

How do I fix a 429 Rate limit error from abliteration.ai?

Back off and retry. Use the Retry-After header for pacing.