abliteration

Abliteration - the Ruby gem for the abliteration.org Public API

Read access to the abliteration.org catalog: models and their method classification, alignment datasets and their passports, the M-code taxonomy, the four flagship indices and the curated field timeline.

Every call is authenticated with a bearer key and metered in credits against the same wallet the Research Agent spends from. There is no free tier for machine traffic and no separate billing.

Responses report cost and credits_remaining on every success. While metering reads preview, the cost shown is what the call will bill once metering is enabled and nothing is actually deducted; when it reads billed, it was.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 0.1.0
  • Generator version: 7.25.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://abliteration.org/api

Installation

Build a gem

To build the Ruby code into a gem:

gem build abliteration.gemspec

Then either install the gem locally:

gem install ./abliteration-0.1.0.gem

(for development, run gem install --dev ./abliteration-0.1.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'abliteration', '~> 0.1.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'abliteration', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'abliteration'

# Setup authorization
Abliteration.configure do |config|
  # Configure Bearer authorization: bearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
  # Configure a proc to get access tokens in lieu of the static access_token configuration
  config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' } 
end

api_instance = Abliteration::AuthorsApi.new
id = 'mlabonne' # String | 

begin
  #Get one author
  result = api_instance.get_author(id)
  p result
rescue Abliteration::ApiError => e
  puts "Exception when calling AuthorsApi->get_author: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://abliteration.org

Class Method HTTP request Description
Abliteration::AuthorsApi get_author GET /api/v1/authors/id Get one author
Abliteration::AuthorsApi list_authors GET /api/v1/authors List authors
Abliteration::DatasetsApi get_dataset GET /api/v1/datasets/id Get one dataset
Abliteration::DatasetsApi list_datasets GET /api/v1/datasets List datasets
Abliteration::IndicesApi get_index GET /api/v1/indices/id One index with history
Abliteration::IndicesApi list_indices GET /api/v1/indices All four indices
Abliteration::MethodsApi get_method GET /api/v1/methods/id Get one method
Abliteration::MethodsApi list_methods GET /api/v1/methods List the method taxonomy
Abliteration::ModelsApi get_historical_deletion_summary GET /api/v1/models/historical-deletions/summary Historical deletions — aggregate summary
Abliteration::ModelsApi get_model GET /api/v1/models/id Get one model
Abliteration::ModelsApi get_model_download_history GET /api/v1/models/id/download-history Per-model download timeline
Abliteration::ModelsApi get_model_readme_at GET /api/v1/models/id/readme-at/commit README content at one commit (wayback)
Abliteration::ModelsApi list_anomalies GET /api/v1/market/anomalies Anomalies in the download counter (change stream)
Abliteration::ModelsApi list_delisted_models GET /api/v1/models/delisted List delisted models (change stream)
Abliteration::ModelsApi list_historical_deletions GET /api/v1/models/historical-deletions/list Historical deletions — paged list
Abliteration::ModelsApi list_model_readme_drifts GET /api/v1/models/id/drifts README drift stream for one model
Abliteration::ModelsApi list_models GET /api/v1/models List models
Abliteration::TimelineApi list_timeline GET /api/v1/timeline Curated field events

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication