diff --git a/lib/tml/application.rb b/lib/tml/application.rb
index <HASH>..<HASH> 100644
--- a/lib/tml/application.rb
+++ b/lib/tml/application.rb
@@ -311,7 +311,7 @@ class Tml::Application < Tml::Base
   end
 
   def api_client
-    @api_client ||= Tml::Api::Client.new(application: self)
+    @api_client ||= Tml.config.api_client_class.new(application: self)
   end
 
   def postoffice
diff --git a/lib/tml/config.rb b/lib/tml/config.rb
index <HASH>..<HASH> 100644
--- a/lib/tml/config.rb
+++ b/lib/tml/config.rb
@@ -80,13 +80,14 @@ module Tml
 
     # Used by Rails and Sinatra extensions
     attr_accessor :current_locale_method, :current_user_method, :translator_options, :i18n_backend
-    attr_accessor :invalidator, :agent
+    attr_accessor :invalidator, :agent, :api_client_class
 
     # Used for IRB only
     attr_accessor :submit_missing_keys_realtime
 
     def initialize
       @enabled = true
+      @api_client_class = Tml::Api::Client
       @default_level  = 0
       @format = :html
       @subdomains = false
@@ -418,7 +419,7 @@ module Tml
     end
 
     def default_day_name(index)
-      "" + default_day_names[index]
+      '' + default_day_names[index]
     end
 
     def default_abbr_day_names
add ability to configure a custom API client