maritaca-ai/maritalk-api

Code and documentation for the MariTalk API

What it solves

MariTalk API provides access to the Sabiá family of Large Language Models (LLMs), which are specifically trained to understand Portuguese and the Brazilian context better than general-purpose models.

How it works

The API is designed to be compatible with the OpenAI API, allowing users to integrate Sabiá models (such as sabia-4 and sabiazinho-4) into existing programs that use OpenAI libraries. Users simply change the base_url to https://chat.maritaca.ai/api and specify the Sabiá model name. It supports standard LLM features like chat mode (system, user, and assistant roles), streaming responses (via generators and async generators) for long text generation, and few-shot prompting to improve response quality.

Who it’s for

Developers building applications that require high-quality Portuguese language processing and understanding of Brazilian cultural context.

Highlights

  • OpenAI Compatibility: Seamless integration with OpenAI's Python library.
  • Brazilian Portuguese Specialization: Models optimized for the Portuguese language and Brazilian context.
  • Streaming Support: Both synchronous and asynchronous streaming for more responsive applications.
  • Token Counting Utility: Includes a maritalk Python library for calculating token counts to predict costs.
  • On-Premises Option: Documentation provided for local deployment (MariTalk Local).

Related

  • Project
  • Dispatch
  • Project
  • Project
  • Project