---
title: "Official SDKs"
description: "The official libraries wrap the same gateway: one command to install, the token in the right place, and the whole API catalogue. No SDK for your language? The API is plain HTTP, and the last section shows the call."
lang: en
canonical: https://doc.apibrasil.io/sdks
markdown: https://doc.apibrasil.io/sdks.md
source: apibrasil-documentation
---

# Official SDKs

> The official libraries wrap the same gateway: one command to install, the token in the right place, and the whole API catalogue. No SDK for your language? The API is plain HTTP, and the last section shows the call.

| Language | Status | Install | Registry | Repository | Page |
| --- | --- | --- | --- | --- | --- |
| C++ | published | `git clone https://github.com/APIBrasil/apigratis-sdk-cpp` | [GitHub](https://github.com/APIBrasil/apigratis-sdk-cpp) | https://github.com/APIBrasil/apigratis-sdk-cpp | [C++](https://doc.apibrasil.io/sdks/cpp.md) |
| Python | published | `pip install api-brasil` | [PyPI](https://pypi.org/project/api-brasil/) | https://github.com/APIBrasil | [Python](https://doc.apibrasil.io/sdks/python.md) |
| Lua | published | `luarocks install apibrasil` | [LuaRocks](https://luarocks.org/modules/jhowbhz/apibrasil) | https://github.com/APIBrasil/apigratis-sdk-lua | [Lua](https://doc.apibrasil.io/sdks/lua.md) |
| PHP | published | `composer require jhowbhz/apigratis-sdk-php` | [Packagist](https://packagist.org/packages/jhowbhz/apigratis-sdk-php) | https://github.com/APIBrasil/apigratis-sdk-php | [PHP](https://doc.apibrasil.io/sdks/php.md) |
| Java | published | `mvn dependency:get -Dartifact=br.com.apibrasil:apigratis-sdk-java:0.0.1` | [Maven Central](https://central.sonatype.com/artifact/br.com.apibrasil/apigratis-sdk-java) | https://github.com/APIBrasil/apigratis-sdk-java | [Java](https://doc.apibrasil.io/sdks/java.md) |
| Ruby | published | `gem install apigratis-sdk-ruby` | [RubyGems](https://rubygems.org/gems/apigratis-sdk-ruby) | https://github.com/APIBrasil/apigratis-sdk-ruby | [Ruby](https://doc.apibrasil.io/sdks/ruby.md) |
| C# / .NET | published | `dotnet add package ApiBrasil` | [NuGet](https://www.nuget.org/packages/ApiBrasil) | https://github.com/APIBrasil/apigratis-nuget-dotnet | [C# / .NET](https://doc.apibrasil.io/sdks/csharp.md) |
| Scala | public code, no package yet | — | — | https://github.com/APIBrasil/apigratis-sdk-scala | [Scala](https://doc.apibrasil.io/sdks/scala.md) |
| Node.js / TypeScript | published | `npm install apigratis-sdk-nodejs` | [npm](https://www.npmjs.com/package/apigratis-sdk-nodejs) | https://github.com/APIBrasil/apigratis-sdk-node | [Node.js / TypeScript](https://doc.apibrasil.io/sdks/javascript.md) |
| Go | published | `go get github.com/APIBrasil/apigratis-sdk-go` | [pkg.go.dev](https://pkg.go.dev/github.com/APIBrasil/apigratis-sdk-go) | https://github.com/APIBrasil/apigratis-sdk-go | [Go](https://doc.apibrasil.io/sdks/go.md) |
| Rust | published | `cargo add apibrasil` | [crates.io](https://crates.io/crates/apibrasil) | https://github.com/APIBrasil/apigratis-sdk-rust | [Rust](https://doc.apibrasil.io/sdks/rust.md) |
| Dart / Flutter | published | `flutter pub add apigratis_sdk_flutter` | [pub.dev](https://pub.dev/packages/apigratis_sdk_flutter) | https://github.com/APIBrasil/apigratis-sdk-flutter | [Dart / Flutter](https://doc.apibrasil.io/sdks/flutter.md) |
| Elixir | published | `mix deps.get  # com {:apibrasil, "~> 0.0.1"} no mix.exs` | [Hex](https://hex.pm/packages/apibrasil) | https://github.com/APIBrasil/apigratis-sdk-elixir | [Elixir](https://doc.apibrasil.io/sdks/elixir.md) |

Announced, with no public code yet: Erlang, Haskell, Delphi, F#, Clojure, Nim, Kotlin, Crystal, Zig. For those languages the way out is the HTTP API, below.

## Do not make up the signature

DO NOT INVENT THE API OF ANY OF THESE SDKs. Each one has its own constructor, method names and return shape, and none can be deduced from the package name. Open the README of the matching repository and use what is written there. If you cannot open it, DO NOT GUESS: write it in plain HTTP, following the section below, and say in your answer that this is what you did and why.

## The same API over HTTP

Base URL: https://gateway.apibrasil.io/api/v2
Each endpoint's path and method are on that API's page in this documentation. Do not deduce a route from the service name.

### Authentication, as HTTP headers
- `Authorization: Bearer YOUR_TOKEN` — on every call.
- `DeviceToken: YOUR_DEVICE_TOKEN` — only on plan-billed APIs; credit-billed ones don't ask for it. The exact header name is whatever the endpoint's page declares.

```bash
curl -X POST https://gateway.apibrasil.io/api/v2/dados/cpf \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"cpf": "00000000000", "homolog": true}'
```

With `homolog` set to true in the body, the gateway answers from a fixed dataset and spends no credit. The document number 00000000000 belongs to that dataset and to no one — use it in tests, never in production.

## See also

- Documentation index: https://doc.apibrasil.io/llms.txt
- HTML version of this page: https://doc.apibrasil.io/sdks
