RAGJur Classificação API

Classificação direcional em massa

GitHub OpenAPI

Operations 2

POST /api/v1/batch-classify Classificação direcional em massa (padrões + LLM) #
GET /api/v1/batch-classify/status Progresso de job ou cobertura de classificação por tema #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ragjur-ai:ragjur-ai-classifica-o-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ragjur-ai-classifica-o-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: RAGJur Classificação API
  version: 1.3.0
  summary: Busca jurisprudencial e jurimetria sobre 114 milhões de julgados de 90+ tribunais brasileiros.
  description: 'API REST da RAGJur (Beans Tech Inova Simples (I.S.), CNPJ 64.160.205/0001-17).


    - **Busca**: BM25 sobre ementas/inteiro teor com analisador jurídico pt-BR; modo híbrido com kNN (`multilingual-e5-large-instruct`, 1024d) + rerank.

    - **Jurimetria**: taxa de provimento por tema/turma/relator, evolução, divergência (χ²), mudança de entendimento (CUSUM), predição multi-fator, intervalos de Wilson, decaimento temporal.

    - **IA**: verificação anti-alucinação de citações, chat com fontes e geração de peças fundamentadas em precedentes reais.


    Todas as rotas exigem `x-api-key` (exceto `/health` e `/openapi.json`). Também aceitamos tokens OAuth 2.1 emitidos pelo servidor MCP (`https://mcp.ragjur.ai`) para integrações Claude/ChatGPT/Copilot — ver `securitySchemes.OAuth2`.


    Convenções: `fonte` identifica a base (`GET /filtros`); sem `fonte`/`tribunal` os endpoints jurimétricos usam `tst_jurisprudencia`. Respostas em JSON UTF-8; percentuais em 0–100.'
  termsOfService: https://ragjur.ai/termos
  contact:
    name: Suporte RAGJur
    email: suporte@ragjur.ai
    url: https://ragjur.ai/suporte
  license:
    name: Proprietária — ver Termos de Uso
    url: https://ragjur.ai/termos
  x-logo:
    url: https://ragjur.ai/logo-512.png
    altText: RAGJur
servers:
- url: https://api.ragjur.ai
  description: Produção
- url: https://api.ragjur.com.br
  description: Legado (redireciona 301 para api.ragjur.ai)
security:
- ApiKeyAuth: []
- OAuth2:
  - ragjur:read
tags:
- name: Classificação
  description: Classificação direcional em massa
paths:
  /api/v1/batch-classify:
    post:
      tags:
      - Classificação
      operationId: batchClassify
      summary: Classificação direcional em massa (padrões + LLM)
      description: Lotes ≤ 20 executam de forma síncrona; acima disso responde 202 com `job_id` e processa em background. Consulte o progresso em `GET /batch-classify/status?job_id=`. Restrito à chave interna.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - fonte
              - tema
              properties:
                fonte:
                  type: string
                tema:
                  type: string
                  description: 'Chave de tema direcional (ex.: `dano_moral`)'
                limit:
                  type: integer
                  minimum: 1
                  maximum: 20000
                  default: 1000
            example:
              fonte: tst_jurisprudencia
              tema: dano_moral
              limit: 100
      responses:
        '200':
          description: Lote síncrono concluído
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '202':
          description: Job em background
          content:
            application/json:
              schema:
                type: object
                properties:
                  job_id:
                    type: string
                  status:
                    type: string
                  status_url:
                    type: string
                  fonte:
                    type: string
                  tema:
                    type: string
                  limit:
                    type: integer
                  chunk_size:
                    type: integer
                  note:
                    type: string
        '400':
          description: Parâmetro obrigatório ausente ou inválido
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Busca deve ter ao menos 3 caracteres
        '401':
          description: Sem `x-api-key` ou chave inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Missing x-api-key header
        '403':
          description: Chave desativada
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: API key is deactivated. Contact support.
        '429':
          description: Rate limit excedido (janela deslizante por chave). Ver `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Segundos até a próxima janela
            X-RateLimit-Limit:
              schema:
                type: integer
            X-RateLimit-Remaining:
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Rate limit exceeded
        '500':
          description: Erro interno
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Erro interno
  /api/v1/batch-classify/status:
    get:
      tags:
      - Classificação
      operationId: batchClassifyStatus
      summary: Progresso de job ou cobertura de classificação por tema
      parameters:
      - name: job_id
        in: query
        description: Se informado, devolve o progresso do job.
        schema:
          type: string
      - name: fonte
        in: query
        description: 'Código da base/tribunal (ver `GET /filtros`). Ex.: `stj_integras`, `tst_jurisprudencia`, `tjsp_cjsg`. Se omitido junto com `tribunal`, usa `tst_jurisprudencia`.'
        schema:
          type: string
        example: stj_integras
      - name: tema
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Status
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '401':
          description: Sem `x-api-key` ou chave inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Missing x-api-key header
        '403':
          description: Chave desativada
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: API key is deactivated. Contact support.
        '404':
          description: Nenhum resultado / recurso não encontrado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Nenhum resultado encontrado para esta busca/fonte
        '429':
          description: Rate limit excedido (janela deslizante por chave). Ver `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Segundos até a próxima janela
            X-RateLimit-Limit:
              schema:
                type: integer
            X-RateLimit-Remaining:
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Rate limit exceeded
        '500':
          description: Erro interno
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Erro'
              example:
                error: Erro interno
components:
  schemas:
    Erro:
      type: object
      required:
      - error
      properties:
        error:
          type: string
      additionalProperties: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Chave `rj_…` criada no painel (https://app.ragjur.ai/painel/chaves). Nunca exponha em front-end.
    OAuth2:
      type: oauth2
      description: OAuth 2.1 (PKCE S256, DCR RFC 7591, metadata RFC 8414/9728) do servidor MCP. Escopo único `ragjur:read`.
      flows:
        authorizationCode:
          authorizationUrl: https://mcp.ragjur.ai/oauth/authorize
          tokenUrl: https://mcp.ragjur.ai/oauth/token
          refreshUrl: https://mcp.ragjur.ai/oauth/token
          scopes:
            ragjur:read: Busca jurisprudencial e jurimetria (somente leitura)
externalDocs:
  description: Documentação para desenvolvedores
  url: https://docs.ragjur.ai