{"openapi":"3.1.0","info":{"title":"samehand","version":"3201de6c","description":"Reescrita com perfil de um autor e comparação de palavras. Índice: GET /api/."},"x-service-info":{"categories":["ai","writing"],"docs":{"homepage":"https://samehand.app/","apiReference":"https://samehand.app/developers","llms":"https://samehand.app/llms.txt"}},"servers":[{"url":"https://samehand.app"}],"components":{"schemas":{"Saude":{"type":"object","properties":{"ok":{"type":"boolean","description":"O Worker respondeu."},"build":{"type":"string","description":"Commit publicado. É por ele que o smoke sabe que o deploy chegou."},"exemplos":{"type":"integer","description":"Quantos textos reais há no banco de exemplos."},"modelo":{"type":"string","description":"Modelo em uso. Nome é público.","nullable":true},"reescrita_disponivel":{"type":"boolean","description":"A configuração permite aceitar uma reescrita. Não testa o provedor nem revela a chave."},"protocolo":{"type":"string","description":"`openai` ou `anthropic`."}},"required":["ok","build","exemplos","modelo","reescrita_disponivel","protocolo"],"description":"Vivacidade e o que está configurado. A credencial nunca aparece aqui."},"StyleCard":{"type":"object","properties":{"geradoEm":{"type":"string","description":"Data em que o corpus foi medido."},"desde":{"type":"string","description":"Recorte: a partir de quando os textos entraram."},"medidas":{"allOf":[{"$ref":"#/components/schemas/MedidasPorRegistro"}],"description":"Um bloco de medidas por registro."}},"required":["geradoEm","desde","medidas"],"description":"O estilo medido do autor, para ser lido e conferido em vez de caixa-preta."},"MedidasPorRegistro":{"type":"object","properties":{"resposta":{"allOf":[{"$ref":"#/components/schemas/Medidas"}],"description":"As marcas dele quando responde alguém."},"post":{"allOf":[{"$ref":"#/components/schemas/Medidas"}],"description":"As marcas dele quando posta do zero."}},"required":["resposta","post"],"description":"As medidas separadas por registro: ele escreve diferente respondendo e postando."},"Medidas":{"type":"object","properties":{"amostras":{"type":"integer","description":"Quantos textos entraram na medida."},"palavrasMediana":{"type":"integer","description":"Mediana de palavras do registro."},"comecaMinuscula":{"type":"number","description":"Fração que começa em minúscula."},"quebraDeLinha":{"type":"number","description":"Fração com quebra de linha."},"reticencias":{"type":"number","description":"Fração com reticências."},"pergunta":{"type":"number","description":"Fração que faz pergunta."},"caps":{"type":"number","description":"Fração com CAPS de ênfase."},"semPontoFinal":{"type":"number","description":"Fração que não fecha com ponto."},"travessao":{"type":"number","description":"Fração com travessão."},"pontoEVirgula":{"type":"number","description":"Fração com ponto e vírgula."},"emoji":{"type":"number","description":"Fração com emoji."}},"required":["amostras","palavrasMediana","comecaMinuscula","quebraDeLinha","reticencias","pergunta","caps","semPontoFinal","travessao","pontoEVirgula","emoji"],"description":"As marcas do autor num registro, medidas no arquivo dele. Distribuição, não regra."},"Reescrita":{"type":"object","properties":{"registro":{"type":"string","description":"`resposta` ou `post` — muda exemplo, tom e comprimento."},"entrada":{"type":"object","description":"`{achados, palavras}` do texto que entrou."},"aviso":{"type":"string","description":"Chave de aviso, hoje só `vazio`. Nulo quando não há.","nullable":true},"variantes":{"type":"array","items":{"$ref":"#/components/schemas/Variante"},"description":"Uma por estilo ligado."},"falhas":{"type":"array","items":{"$ref":"#/components/schemas/FalhaDeEstilo"},"description":"Estilos que não voltaram."},"uso":{"type":"object","description":"`{entrada, saida, modelo}` — tokens gastos nesta reescrita."},"cota":{"type":"object","description":"`{gratis, usado, limite}` da franquia diária deste IP."}},"required":["registro","entrada","aviso","variantes","falhas","uso","cota"],"description":"A resposta de `POST /api/rewrite`: uma variante por estilo, com prova do que saiu."},"Variante":{"type":"object","properties":{"estilo":{"allOf":[{"$ref":"#/components/schemas/Estilo"}],"description":"Qual estilo gerou esta versão."},"texto":{"type":"string","description":"A reescrita. É isto que se copia."},"passou":{"type":"boolean","description":"Se o lint não achou erro nesta variante."},"achados":{"type":"array","items":{"$ref":"#/components/schemas/Achado"},"description":"O que o lint ainda encontra nela."},"palavras":{"type":"integer","description":"Quantas palavras a variante tem."},"tirado":{"type":"array","items":{"type":"string"},"description":"O que a entrada reprovava e esta variante não reprova."},"palavrasAMenos":{"type":"integer","description":"Quantas palavras a menos que a entrada."},"diff":{"allOf":[{"$ref":"#/components/schemas/Diff"}],"description":"O corte, palavra a palavra."}},"required":["estilo","texto","passou","achados","palavras","tirado","palavrasAMenos","diff"],"description":"Uma versão do texto na voz do autor, com o próprio recibo."},"Estilo":{"type":"object","properties":{"id":{"type":"string","description":"Identificador do estilo."},"nome":{"type":"string","description":"Nome de exibição, vazio quando não há estilo."}},"required":["id","nome"],"description":"O estilo de saída que gerou esta variante."},"Achado":{"type":"object","properties":{"id":{"type":"string","description":"Identificador estável: `travessao`, `vocab-llm`, `nao-so-mas`…"},"rotulo":{"type":"string","description":"Nome legível do achado."},"gravidade":{"type":"string","description":"`erro` reprova a variante; `aviso` só sinaliza."}},"required":["id","rotulo","gravidade"],"description":"Uma marca de texto de IA que o lint encontrou. Determinístico, sem modelo."},"Diff":{"type":"object","properties":{"pedacos":{"type":"array","items":{"$ref":"#/components/schemas/Pedaco"},"description":"Os trechos em ordem de leitura."},"mudou":{"type":"number","description":"Fração de palavras que mudaram, de 0 a 1."},"util":{"type":"boolean","description":"`false` quando a reescrita ficou distante demais para o corte ensinar algo."}},"required":["pedacos","mudou","util"],"description":"O corte, mostrado em vez de afirmado. Comparação por palavra, normalizada."},"Pedaco":{"type":"object","properties":{"op":{"type":"string","description":"`igual`, `saiu` (estava na entrada) ou `entrou` (é da variante)."},"texto":{"type":"string","description":"O texto do trecho, como aparece na tela."}},"required":["op","texto"],"description":"Um trecho do diff por palavra entre a entrada e a variante."},"FalhaDeEstilo":{"type":"object","properties":{"estilo":{"allOf":[{"$ref":"#/components/schemas/Estilo"}],"description":"Qual estilo falhou."},"motivo":{"type":"string","description":"Causa: erro do provedor, ou `vazio (length)`."}},"required":["estilo","motivo"],"description":"Estilo que não voltou. Aparece como falha, nunca como cartão que sumiu."},"PaymentQuota":{"type":"object","properties":{"free":{"type":"array","items":{"$ref":"#/components/schemas/PaymentFree"},"description":"Free allowances and their windows."},"paid":{"type":"array","items":{"$ref":"#/components/schemas/PaymentPrice"},"description":"List prices in USD. The operation's 402 is the payable quote."},"how_to_pay":{"type":"string","description":"Payment instructions and availability restrictions."},"live":{"type":"string","description":"Authoritative product quota endpoint.","nullable":true},"free_now":{"type":"array","items":{"type":"string"},"description":"SKUs temporarily free despite their list price."},"charged_now":{"type":"array","items":{"type":"string"},"description":"SKUs charged at their list price even when free_now has `*`."},"trial":{"allOf":[{"$ref":"#/components/schemas/PaymentTrial"}],"description":"Registration trial, when offered."}},"required":["free","paid","how_to_pay","live"]},"PaymentFree":{"type":"object","properties":{"o_que":{"type":"string","description":"Operation or allowance."},"limite":{"type":"string","description":"Allowance and eligibility."},"janela":{"type":"string","description":"Reset window, when applicable.","nullable":true}},"required":["o_que","limite","janela"]},"PaymentPrice":{"type":"object","properties":{"o_que":{"type":"string","description":"Operation and billing unit."},"price_usd":{"type":"number","description":"Current list price in USD."}},"required":["o_que","price_usd"]},"PaymentTrial":{"type":"object","properties":{"days":{"type":"integer","description":"Trial duration in days."},"how":{"type":"string","description":"Eligibility and activation steps."}},"required":["days","how"]},"PaymentX402":{"type":"object","properties":{"provider":{"type":"string","description":"Always `x402` — the only billing protocol accepted."},"mode":{"type":"string","description":"Seller mode: `live` charges for real, `dev` lets calls through unpaid."},"network":{"type":"string","description":"USDC network: `base` in production, `base-sepolia` in staging."},"chain_id":{"type":"integer","description":"EVM chain ID of the network above, so the wallet signs on the right chain."},"pay_to":{"type":"string","description":"Address that receives the payment.","nullable":true},"homolog":{"type":"boolean","description":"Staging seam on: the loop can be closed without spending USDC."},"dev":{"type":"boolean","description":"Development mode: the 402 is simulated."},"dev_gate":{"type":"boolean","description":"A homologation credential is configured; this grants no access."},"alternavel":{"type":"boolean","description":"Dev only: a request with `X-MM-Pagamento: real` pays for real instead of in test mode."},"gratis":{"type":"array","items":{"type":"string"},"description":"Temporarily free SKUs."},"cobrados":{"type":"array","items":{"type":"string"},"description":"SKUs charged even when `gratis` has `*`."},"facilitator":{"type":"string","description":"URL of the facilitator that verifies and settles the payment."},"asset":{"type":"string","description":"Accepted currency — always `USDC`."},"asset_address":{"type":"string","description":"USDC contract on the network above."},"faucet":{"type":"string","description":"Test-USDC faucet; only on base-sepolia.","nullable":true},"wallets":{"type":"object","description":"Links to wallets that speak x402 (metamask, coinbase, base_app)."}},"required":["provider","mode","network","chain_id","pay_to","homolog","dev","dev_gate","alternavel","facilitator","asset","asset_address","faucet","wallets"],"description":"x402 payment configuration in force. Comes from `planPublic` and is the same across the products."},"PaymentCredit":{"type":"object","properties":{"url":{"type":"string","description":"POST to purchase credit; GET with X-Credito to inspect its balance."},"header":{"type":"string","description":"Header for a previously issued credit token: X-Credito."}},"required":["url","header"]}},"securitySchemes":{"globalAccount":{"type":"apiKey","in":"cookie","name":"__Host-mm-auth","description":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},"contaChaveApi":{"type":"http","scheme":"bearer","bearerFormat":"mmk_…","description":"Account API key: `Authorization: Bearer mmk_…` or `X-Api-Key: mmk_…`. Created on the account page (API keys), valid only in the product where it was created; it acts as the account (or the organization that owns it)."}}},"paths":{"/api/auth/bootstrap":{"get":{"operationId":"get_api_auth_bootstrap","summary":"Prepare the browser for global sign-in.","description":"Sets a host-only HttpOnly browser cookie. CSRF is bound to the current session. No CORS.\nDevolve: { csrf, context }","responses":{"200":{"description":"{ csrf, context }","content":{"application/json":{"schema":{"type":"object","properties":{"csrf":{"type":"string","description":"X-CSRF-Token"},"context":{"type":"string","description":"Opaque view context, also in X-MM-Context; not a credential / contexto opaco da vista, não é credencial."}},"required":["csrf","context"]}}}},"400":{"description":"invalid_request"},"403":{"description":"invalid_origin / invalid_csrf"},"503":{"description":"auth_unavailable: a sessão anterior é preservada / the previous session is preserved"}},"security":[]}},"/api/account/profile":{"get":{"operationId":"get_api_account_profile","summary":"Read your global profile.","description":"Reads current preferences from the account. Edit them on your account page; products never own a separate profile.\nDevolve: {profile:{name,locale,timeZone,theme,revision}}","responses":{"200":{"description":"{profile:{name,locale,timeZone,theme,revision}}"},"401":{"description":"invalid_session"},"503":{"description":"auth_unavailable"}},"security":[{"globalAccount":[]}]}},"/api/account/avatar":{"get":{"operationId":"get_api_account_avatar","summary":"Read your global profile photo.","description":"Private WebP, up to 64 KiB, no cache. Change it on your account. No user ID or object URL accepted.\nDevolve: image/webp; Cache-Control: no-store","responses":{"200":{"description":"image/webp; Cache-Control: no-store","content":{"image/webp":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"invalid_session"},"404":{"description":"not_found: no photo / sem foto"},"503":{"description":"auth_unavailable"}},"security":[{"globalAccount":[]}]}},"/api/me":{"get":{"operationId":"get_api_me","summary":"Read the current global account in this product.","description":"The product SDK also returns profile and administration. administration is {href} for the configured platform owner, otherwise null. The server derives this field from the authenticated account.\nDevolve: {user:{identityId,sessionId,productId,audience,authTime,methods,mfaState}}","responses":{"200":{"description":"{user:{identityId,sessionId,productId,audience,authTime,methods,mfaState}}"},"401":{"description":"invalid_session"},"503":{"description":"auth_unavailable"}},"security":[{"globalAccount":[]}]}},"/api/auth/logout":{"post":{"operationId":"post_api_auth_logout","summary":"Revoke this product session.","description":"Bootstrap/CSRF must belong to this browser and session. Other product sessions remain active.\nDevolve: { ok }","responses":{"200":{"description":"{ ok }","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","description":"true"}},"required":["ok"]}}}},"400":{"description":"invalid_request"},"403":{"description":"invalid_origin / invalid_csrf"},"503":{"description":"auth_unavailable: a sessão anterior é preservada / the previous session is preserved"}},"security":[{"globalAccount":[]}]}},"/api/account/keys":{"get":{"operationId":"get_api_account_keys","summary":"List your API keys in this product.","description":"Never returns the key itself: name, last 4 characters, organization, creation, last use (hourly) and whether it still works.\nDevolve: { keys }","responses":{"200":{"description":"{ keys }","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object"},"description":"`id`, `name`, `organizationId`, `last4`, `createdAt`, `lastUsedAt`, `revokedAt`, `active` (false when revoked or stopped by a password change / ending all sessions)."}},"required":["keys"]}}}},"401":{"description":"invalid_session"},"503":{"description":"auth_unavailable"}},"security":[{"globalAccount":[]}]}},"/api/account/keys/create":{"post":{"operationId":"post_api_account_keys_create","summary":"Create an API key for agents and scripts.","description":"Needs a sign-in in the last 5 minutes; an organization key also needs a second factor in the session and the owner/admin role with this product enabled. At most 10 live keys per account and product. The key (`secret`) is returned ONCE.\nDevolve: { key, secret }","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Up to 60 characters."},"organizationId":{"type":["string","null"],"description":"`null` for an account key."}},"required":["name","organizationId"]},"example":{"name":"agent","organizationId":null}}}},"responses":{"200":{"description":"{ key, secret }","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"object","description":"`id`, `name`, `organizationId`, `last4`, `createdAt`."},"secret":{"type":"string","description":"`mmk_…`, shown once."}},"required":["key","secret"]}}}},"400":{"description":"invalid_key_name / invalid_organization"},"401":{"description":"invalid_session / reauth_required"},"403":{"description":"invalid_origin / invalid_csrf / organization_forbidden / organization_mfa_required"},"409":{"description":"key_limit_reached"},"503":{"description":"auth_unavailable"}},"security":[{"globalAccount":[]}]}},"/api/account/keys/revoke":{"post":{"operationId":"post_api_account_keys_revoke","summary":"Revoke one of your API keys.","description":"Stops the key at once. Repeating is harmless.\nDevolve: { ok }","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The key `id`."}},"required":["id"]},"example":{"id":"…"}}}},"responses":{"200":{"description":"{ ok }","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","description":"true"}},"required":["ok"]}}}},"400":{"description":"invalid_key_id"},"401":{"description":"invalid_session"},"403":{"description":"invalid_origin / invalid_csrf"},"404":{"description":"key_not_found"},"503":{"description":"auth_unavailable"}},"security":[{"globalAccount":[]}]}},"/agent.json":{"get":{"operationId":"get_agent_json","summary":"Agent card: identity, operator, documentation, the MCP endpoint and the tools it serves. Same document as `/.well-known/agent-card.json`.","description":"Devolve: `application/json`: `name`, `provider`, `protocol` (`mcp`), `interfaces[]` and `skills[]`.","responses":{"200":{"description":"`application/json`: `name`, `provider`, `protocol` (`mcp`), `interfaces[]` and `skills[]`."}}}},"/okf/{arquivo}":{"get":{"operationId":"get_okf_by_arquivo","summary":"OKF bundle (Open Knowledge Format v0.1): markdown with frontmatter so an agent reads the whole product without parsing HTML.","description":"Devolve: `text/markdown`. Start at `/okf/index.md`, which lists the bundle.","parameters":[{"name":"arquivo","in":"path","required":true,"schema":{"type":"string"},"description":"`index.md`, `sobre.md`, `api.md` or `faq.md`.","example":"index.md"}],"responses":{"200":{"description":"`text/markdown`. Start at `/okf/index.md`, which lists the bundle."},"404":{"description":"File outside the bundle."}}}},"/.well-known/{arquivo}":{"get":{"operationId":"get_well_known_by_arquivo","summary":"Machine discovery before the home page: `api-catalog` (RFC 9727, a linkset with the API and the MCP), `security.txt` (RFC 9116), `x402` (payment manifest: network, wallet and the routes that charge) and `mcp-registry-auth` (the official MCP registry key).","description":"Devolve: `application/linkset+json` for the api-catalog; `application/json` for x402 and apis.json; `text/plain` for the other two.","parameters":[{"name":"arquivo","in":"path","required":true,"schema":{"type":"string"},"description":"`api-catalog`, `security.txt`, `x402`, `mcp-registry-auth` or `apis.json`.","example":"api-catalog"}],"responses":{"200":{"description":"`application/linkset+json` for the api-catalog; `application/json` for x402 and apis.json; `text/plain` for the other two."},"404":{"description":"Name outside the five published."}}}},"/apis.json":{"get":{"operationId":"get_apis_json","summary":"APIs.json (apisjson.org, 0.19): the index APIs.io harvests — the API, the MCP, OpenAPI, guide and OKF bundle in one file. Also at `/.well-known/apis.json`.","description":"Devolve: `application/json` in the APIs.json 0.19 format: `apis[]` with `baseURL`, `humanURL` and `properties[]`.","responses":{"200":{"description":"`application/json` in the APIs.json 0.19 format: `apis[]` with `baseURL`, `humanURL` and `properties[]`."}}}},"/api/":{"get":{"operationId":"api_index","summary":"Índice auto-descrito: cada rota, o que cobra e como plugar o MCP.","description":"Devolve: { name, description, build, base_url, docs, endpoints, mcp_tools }","responses":{"200":{"description":"{ name, description, build, base_url, docs, endpoints, mcp_tools }","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Nome do produto."},"description":{"type":"string","description":"O que o produto faz."},"build":{"type":"string","description":"Commit publicado."},"base_url":{"type":"string","description":"Origem em que esta API está servindo."},"docs":{"type":"object","description":"Links para llms.txt, OpenAPI, MCP e a UI."},"endpoints":{"type":"array","items":{"type":"object"},"description":"Catálogo de endpoints."},"mcp_tools":{"type":"array","items":{"type":"string"},"description":"Tools do MCP."}},"required":["name","description","build","base_url","docs","endpoints","mcp_tools"]}}}}}}},"/api/health":{"get":{"operationId":"get_api_health","summary":"Saúde do processo, número de exemplos e disponibilidade da configuração de reescrita.","description":"Devolve: { ok, build, exemplos, modelo, reescrita_disponivel, protocolo }","responses":{"200":{"description":"{ ok, build, exemplos, modelo, reescrita_disponivel, protocolo }","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Saude"}}}}}}},"/mcp":{"post":{"operationId":"post_mcp","summary":"MCP Streamable HTTP — as tools deste catálogo, despachadas neste mesmo Worker.","description":"Devolve: JSON-RPC 2.0 (`initialize`, `tools/list`, `tools/call`).","responses":{"200":{"description":"JSON-RPC 2.0 (`initialize`, `tools/list`, `tools/call`)."}}}},"/api/estilo":{"get":{"operationId":"voice_card","summary":"Estatísticas do perfil de escrita atual, com o tamanho das amostras de um único autor.","description":"Devolve: { geradoEm, desde, medidas{resposta,post} }","responses":{"200":{"description":"{ geradoEm, desde, medidas{resposta,post} }","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StyleCard"}}}}}}},"/api/rewrite":{"post":{"operationId":"rewrite_in_voice","summary":"Reescreve um texto curto com o perfil atual. Compara as palavras removidas e adicionadas.","description":"Devolve: { registro, entrada, aviso, variantes[{estilo,texto,passou,achados,palavras,tirado,palavrasAMenos,diff}], falhas[{estilo,motivo}], uso, cota }","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"texto":{"type":"string","description":"Rascunho ou ideia a reescrever. Até 4000 caracteres."},"contexto":{"type":"string","description":"Informações de referência. Até 4000 caracteres. O modelo não busca links."},"registro":{"type":"string","description":"`resposta` (padrão) ou `post`."},"instrucoes":{"type":"string","description":"Regras do autor sobre a própria voz, uma por linha."},"estilos":{"type":"array","items":{"type":"object"},"description":"Até 5 `{id, nome, prompt}`. Cada estilo é uma variante — e uma chamada ao modelo."}}}}}},"responses":{"200":{"description":"{ registro, entrada, aviso, variantes[{estilo,texto,passou,achados,palavras,tirado,palavrasAMenos,diff}], falhas[{estilo,motivo}], uso, cota }","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reescrita"}}}},"400":{"description":"`texto_vazio` ou `json_invalido`."},"402":{"description":"Franquia do dia esgotada: pague com x402 ou crédito pré-pago."},"413":{"description":"`texto_longo` — o teto é 4000 caracteres."},"502":{"description":"`falha_upstream` — o provedor do modelo não respondeu."},"503":{"description":"`sem_credencial` — reescrita sem modelo configurado. Não cobra nem chama o provedor."}}}},"/api/credito":{"post":{"operationId":"post_api_credito","summary":"Recarrega crédito pré-pago: paga uma vez com x402 e recebe o token que desconta em qualquer API da casa.","description":"Devolve: { token, saldo_usd, guarde, usar, saldo_em }","parameters":[{"name":"usd","in":"query","required":true,"schema":{"type":"number"},"description":"Pacote: 0.1, 1, 5, 10 ou 25 dólares."}],"responses":{"200":{"description":"{ token, saldo_usd, guarde, usar, saldo_em }","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Token portador do saldo (`cred_…`). Mostrado UMA vez — não há como recuperá-lo."},"saldo_usd":{"type":"string","description":"Saldo creditado."},"guarde":{"type":"string","description":"Aviso de que o token é o portador do crédito."},"usar":{"type":"string","description":"Como apresentar o token nas rotas pagas."},"saldo_em":{"type":"string","description":"Onde consultar saldo e extrato."}},"required":["token","saldo_usd","guarde","usar","saldo_em"]}}}},"400":{"description":"Pacote fora da lista (0.1, 1, 5, 10 ou 25)."},"402":{"description":"Sem pagamento — o corpo traz `accepts[]` do x402."}}},"get":{"operationId":"get_api_credito","summary":"Saldo e extrato do crédito — as últimas movimentações, sem devolver o token.","description":"Devolve: { saldo_micros, saldo_usd, criado_em, movimentos, proximo }","parameters":[{"name":"movimentos","in":"query","required":false,"schema":{"type":"string"},"description":"`1`: consulta só o histórico paginado, sem saldo."},{"name":"de","in":"query","required":false,"schema":{"type":"string"},"description":"Início inclusivo em UTC ISO 8601 com milissegundos. Padrão: 1970-01-01T00:00:00.000Z."},{"name":"ate","in":"query","required":false,"schema":{"type":"string"},"description":"Fim exclusivo em UTC ISO 8601 com milissegundos. Padrão: agora. Conserve o valor entre páginas."},{"name":"antes","in":"query","required":false,"schema":{"type":"string"},"description":"Cursor `proximo` da página anterior. Só com movimentos=1."},{"name":"limite","in":"query","required":false,"schema":{"type":"integer"},"description":"1 a 50 movimentos por página; padrão 20. Só com movimentos=1."}],"responses":{"200":{"description":"{ saldo_micros, saldo_usd, criado_em, movimentos, proximo }","content":{"application/json":{"schema":{"type":"object","properties":{"saldo_micros":{"type":"integer","description":"Saldo em micro-dólares (1e-6 USD)."},"saldo_usd":{"type":"string","description":"Saldo formatado."},"criado_em":{"type":"string","description":"Quando o crédito foi aberto."},"movimentos":{"type":"array","items":{"type":"object"},"description":"Entradas e saídas recentes, com produto e recurso."},"proximo":{"type":"object","description":"Só com movimentos=1: cursor da próxima página ou null; movimentos inclui id, em, valor_usd, saldo_usd, motivo, produto e recurso."}},"required":["saldo_micros","saldo_usd","criado_em","movimentos","proximo"]}}}},"400":{"description":"Período, limite ou cursor inválido."},"401":{"description":"Sem token ou token desconhecido."}}}},"/api/credito/pix":{"get":{"operationId":"get_api_credito_pix","summary":"Crédito por Pix: a chave, o câmbio fixo, os pacotes em reais e o que o comprovante aceita.","description":"Devolve: { chave, brl_por_usd, pacotes, comprovante, liberacao }","responses":{"200":{"description":"{ chave, brl_por_usd, pacotes, comprovante, liberacao }","content":{"application/json":{"schema":{"type":"object","properties":{"chave":{"type":"string","description":"A chave Pix que recebe o pagamento."},"brl_por_usd":{"type":"number","description":"Câmbio fixo usado nos pacotes."},"pacotes":{"type":"array","items":{"type":"object"},"description":"Os pacotes (3, 5, 10 ou 25 dólares), cada um com `brl_centavos` e `copia_e_cola` (o Pix copia e cola do valor, o mesmo texto do QR: o app do banco já vem com o valor)."},"comprovante":{"type":"object","description":"Tipos aceitos (foto ou PDF) e o tamanho máximo, em bytes."},"liberacao":{"type":"string","description":"`manual`: o dono confere o Pix e libera."}},"required":["chave","brl_por_usd","pacotes","comprovante","liberacao"]}}}}}},"post":{"operationId":"post_api_credito_pix","summary":"Pede crédito pago por Pix: multipart com `usd`, `comprovante` (foto ou PDF até 2 MB) e `email`; o resto é opcional.","description":"O código de crédito sai na resposta e passa a valer quando o dono confere o Pix e libera (manual, em geral no mesmo dia). O `email` é obrigatório: é por ele que o dono fala com a pessoa. Opcionais: `nome`, `pagina` (a página de onde pediu, até 2.000 caracteres) e o que a pessoa comprava quando recebeu o 402 — `recurso` (até 2.000), `descricao` (até 300) e `preco_usd` (decimal, ex. `0.50`); e `navegador_id` (UUID que liga os pedidos do mesmo navegador). Tudo o que chega fica registrado no pedido — o comprovante inclusive —, com a conta logada (conferida pelo cookie da sessão), a rede e o navegador de quem pediu.\nDevolve: { id, estado, credito, estado_em }","responses":{"200":{"description":"{ id, estado, credito, estado_em }","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Id do pedido, para acompanhar."},"estado":{"type":"string","description":"`pendente` até a decisão."},"credito":{"type":"string","description":"O token `cred_…`, mostrado UMA vez; vale depois da liberação."},"estado_em":{"type":"string","description":"Onde acompanhar o pedido."}},"required":["id","estado","credito","estado_em"]}}}},"400":{"description":"Pacote fora da lista (3, 5, 10 ou 25), sem comprovante ou sem e-mail válido."},"413":{"description":"Comprovante acima de 2 MB."},"415":{"description":"Comprovante que não é foto (JPEG, PNG, WebP) nem PDF."},"429":{"description":"A rede já mandou os pedidos do dia."},"502":{"description":"O e-mail ao dono não saiu: o pedido fica registrado como `falhou`; mande de novo."},"503":{"description":"Fila de conferência cheia, ou Pix indisponível neste app."}}}},"/api/credito/pix/{id}":{"get":{"operationId":"get_api_credito_pix_by_id","summary":"Estado de um pedido de crédito por Pix: `pendente`, `liberado`, `recusado` ou `falhou`.","description":"Devolve: { estado, usd, decidido_em }","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id do pedido (32 hex).","example":"0123456789abcdef0123456789abcdef"}],"responses":{"200":{"description":"{ estado, usd, decidido_em }","content":{"application/json":{"schema":{"type":"object","properties":{"estado":{"type":"string","description":"`pendente`, `liberado`, `recusado` ou `falhou` (o e-mail ao dono não saiu; mande de novo)."},"usd":{"type":"integer","description":"O pacote pedido."},"decidido_em":{"type":"string","description":"Quando o dono decidiu, ou `null`."}},"required":["estado","usd","decidido_em"]}}}},"404":{"description":"Pedido desconhecido."}}}},"/api/credito/asaas/{id}/cancelar":{"post":{"operationId":"post_api_credito_asaas_by_id_cancelar","summary":"Cancela uma cobrança pendente ao fechar o pagamento.","description":"Exige o bilhete `cancelamento` devolvido na criação. Uma cobrança antiga de crédito aceita seu token em `credito`. Só atua no produto e ambiente de origem. Não estorna pagamentos nem remove o histórico. 202 indica cancelamento em andamento; a vigia retoma falhas externas.\nDevolve: { id, estado }","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id da cobrança (32 hex).","example":"0123456789abcdef0123456789abcdef"}],"responses":{"200":{"description":"{ id, estado }","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Id da cobrança."},"estado":{"type":"string","description":"`cancelando`, `vencido` ou o estado final já confirmado."}},"required":["id","estado"]}}}},"404":{"description":"Cobrança ou bilhete inválido, produto ou ambiente diferente."}}}},"/api/credito/asaas":{"get":{"operationId":"get_api_credito_asaas","summary":"Pix automático: se está disponível neste app, os pacotes em reais e o saldo que o produto vende.","description":"Devolve: { disponivel, pacotes, exatos, saldo, precisa_documento }","responses":{"200":{"description":"{ disponivel, pacotes, exatos, saldo, precisa_documento }","content":{"application/json":{"schema":{"type":"object","properties":{"disponivel":{"type":"object","description":"`false` quando o app não tem o Asaas configurado (use o Pix com comprovante)."},"pacotes":{"type":"array","items":{"type":"object"},"description":"Os pacotes de crédito (3, 5, 10 ou 25 dólares), com `brl_centavos`."},"exatos":{"type":"array","items":{"type":"object"},"description":"Preços declarados pelo app, com `usd` e `brl_centavos`. Só aparecem a partir de R$ 5,00 e até R$ 10.000."},"saldo":{"type":"object","description":"Quando o produto vende saldo em reais: a faixa e se a conta logada pode comprar."},"precisa_documento":{"type":"object","description":"Se o CPF ou CNPJ de quem paga ainda é pedido."}},"required":["disponivel","pacotes","exatos","saldo","precisa_documento"]}}}}}},"post":{"operationId":"post_api_credito_asaas","summary":"Gera um Pix dinâmico: JSON com `oferta` (`pacote` com `usd`, ou `saldo` com `centavos`) e o pagador.","description":"O pagamento libera sozinho o que se comprou: o pacote vira o token `cred_…` que já vem na resposta; o saldo cai na organização da conta logada. Na primeira compra vão `documento` (CPF ou CNPJ, que segue para o gateway e não fica guardado aqui) e `nome`; `email`, `pagina` e `navegador_id` são opcionais e ficam registrados. Com `forma: \"cartao_boleto\"`, a cobrança é livre: a resposta traz `pagamento_em`, a página do gateway onde se paga com cartão, boleto ou Pix (vence em três dias). Com `forma: \"cartao\"` e o `cartao` (`titular`, `numero`, `mes`, `ano`, `cvv`, `documento`, `email`, `cep`, `numero_endereco`, `telefone`), a cobrança é paga no cartão no mesmo pedido: 200 com `estado: \"pago\"`, 202 com `conferir` enquanto o emissor analisa, 422 quando o cartão é recusado; o cartão não fica guardado. O `usd` deve ser um valor de `pacotes` ou `exatos` do GET. O servidor define os centavos e recusa valores não declarados.\nDevolve: { id, credito, forma, pix, pagamento_em, estado, estado_em, cancelamento }","responses":{"200":{"description":"{ id, credito, forma, pix, pagamento_em, estado, estado_em, cancelamento }","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Id da cobrança, para acompanhar."},"credito":{"type":"string","description":"No pacote: o token `cred_…`, mostrado UMA vez; vale quando o pagamento cair."},"forma":{"type":"string","description":"`pix` (o padrão), `cartao` ou `cartao_boleto`."},"pix":{"type":"object","description":"`copia_e_cola`, `imagem` (QR em PNG, data URI) e `expira_em`; só na forma `pix`."},"pagamento_em":{"type":"string","description":"Na forma `cartao_boleto`: a página de pagamento do gateway."},"estado":{"type":"string","description":"Na forma `cartao`: `pago`, ou `pendente` com `conferir`."},"estado_em":{"type":"string","description":"Onde acompanhar o pagamento."},"cancelamento":{"type":"string","description":"Bilhete para cancelar a cobrança pendente de Pix ou boleto."}},"required":["id","credito","forma","pix","pagamento_em","estado","estado_em","cancelamento"]}}}},"400":{"description":"Crédito fora de `pacotes` e `exatos`, valor fora da faixa, CPF/CNPJ, nome ou e-mail inválido, dado do cartão inválido (`cartao_dados`, com o `campo`), ou o gateway recusou o pagador (`pagador_recusado`, com a razão em `detalhe`)."},"422":{"description":"Cartão recusado (`cartao_recusado`, com o `campo` quando o gateway diz qual); troque em `POST /api/credito/asaas/:id/cartao`."},"429":{"description":"Limite de 3 tentativas por minuto ou 10 por dia, por conta ou rede, ou limite do cartão."},"502":{"description":"O gateway não gerou o Pix; tente de novo."},"503":{"description":"Pix automático indisponível neste app, o gateway ocupado (`asaas_ocupado`, espere `retry_after_s`), ou cobranças demais de quem não entrou esperando pagamento."}}}},"/api/credito/asaas/{id}":{"get":{"operationId":"get_api_credito_asaas_by_id","summary":"Estado de uma cobrança Pix automática: `pendente`, `pago`, `vencido`, `estornado` ou `falhou`.","description":"Devolve: { estado, pago_em }","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id da cobrança (32 hex).","example":"0123456789abcdef0123456789abcdef"}],"responses":{"200":{"description":"{ estado, pago_em }","content":{"application/json":{"schema":{"type":"object","properties":{"estado":{"type":"string","description":"`pago` libera o token do pacote ou o saldo; o Pix pago depois do vencimento vale."},"pago_em":{"type":"string","description":"Quando o pagamento foi confirmado, ou `null`."}},"required":["estado","pago_em"]}}}},"404":{"description":"Cobrança desconhecida."}}}},"/api/credito/asaas/{id}/cartao":{"post":{"operationId":"post_api_credito_asaas_by_id_cartao","summary":"Paga com outro cartão a cobrança de cartão cujo cartão foi recusado: a mesma cobrança, sem cobrar duas vezes.","description":"JSON com o `cartao` (os mesmos campos do `POST /api/credito/asaas`) e, sem conta, o `navegador_id` que criou a cobrança. Só a cobrança de cartão que espera pagamento, de quem a criou, e até cinco tentativas por cobrança.\nDevolve: { estado, estado_em }","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id da cobrança (32 hex).","example":"0123456789abcdef0123456789abcdef"}],"responses":{"200":{"description":"{ estado, estado_em }","content":{"application/json":{"schema":{"type":"object","properties":{"estado":{"type":"string","description":"`pago`, ou `pendente` com `conferir` enquanto o emissor analisa."},"estado_em":{"type":"string","description":"Onde acompanhar o pagamento."}},"required":["estado","estado_em"]}}}},"400":{"description":"Dado do cartão inválido (`cartao_dados`, com o `campo`)."},"404":{"description":"Cobrança desconhecida, de outra pessoa ou que não é de cartão."},"409":{"description":"A cobrança já venceu ou foi encerrada; comece o pagamento de novo."},"422":{"description":"Cartão recusado (`cartao_recusado`)."},"429":{"description":"Passou das tentativas de cartão desta cobrança ou do dia."}}}},"/api/credito/asaas/saude":{"get":{"operationId":"get_api_credito_asaas_saude","summary":"A saúde do Pix e das assinaturas ativas deste app: falhas com motivo, para o painel.","description":"Devolve: { ativo, tarefas }","responses":{"200":{"description":"{ ativo, tarefas }","content":{"application/json":{"schema":{"type":"object","properties":{"ativo":{"type":"object","description":"`false` quando o Asaas e as assinaturas estão desligados."},"tarefas":{"type":"array","items":{"type":"object"},"description":"Cada problema: `id`, `falhando` e `motivo`. Inclui Pix e, quando ativas, recuperação, fila e orçamento das assinaturas. Não consulta o provedor."}},"required":["ativo","tarefas"]}}}}}}},"/api/vitrine":{"get":{"operationId":"get_api_vitrine","summary":"The product's public numbers: traffic, agents, usage and reliability, no money.","description":"Projection published hourly by the house collector, rounded to two significant digits; `null` is a missing measurement, never zero. 15-minute cache with ETag (`If-None-Match` → 304). There is no way to send numbers through this route: publishing belongs to the collector, with its own token.\nDevolve: { v, produto, publicado, atualizado_em, stale, nome?, desde?, fuso?, hoje?, dias?, janelas?, visitantes?, pessoas?, agentes?, superficies?, mcp?, uso?, contas?, confiabilidade?, catalogo?, apoio? }","responses":{"200":{"description":"{ v, produto, publicado, atualizado_em, stale, nome?, desde?, fuso?, hoje?, dias?, janelas?, visitantes?, pessoas?, agentes?, superficies?, mcp?, uso?, contas?, confiabilidade?, catalogo?, apoio? }","content":{"application/json":{"schema":{"type":"object","properties":{"v":{"type":"integer","description":"Contract version (1)."},"produto":{"type":"string","description":"Product id."},"publicado":{"type":"boolean","description":"`false` before the collector's first publication; then only these five keys come."},"atualizado_em":{"type":"string","description":"When the collector published (ISO 8601).","nullable":true},"stale":{"type":"boolean","description":"`true` when the projection is older than 26 h."},"nome":{"type":"string","description":"Product name."},"desde":{"type":"string","description":"First day the series covers.","nullable":true},"fuso":{"type":"string","description":"Time zone of the days (`UTC`)."},"hoje":{"type":"object","description":"Today: pages by class (human, AI, bot), API calls by class, machine-surface reads and product usage."},"dias":{"type":"array","items":{"type":"object"},"description":"Up to 31 days, oldest first: `dia`, `paginas`, `api`, `api_ia`, `maquina`, `visitantes`, `uso`."},"janelas":{"type":"object","description":"7- and 30-day sums (`d7`, `d30`)."},"visitantes":{"type":"object","description":"Unique visitors at the edge over 7 days."},"pessoas":{"type":"object","description":"GA4 when available: users, sessions, countries, devices and who arrived from AI.","nullable":true},"agentes":{"type":"object","description":"The AI agents and bots that read the most, 7 days."},"superficies":{"type":"object","description":"Reads of OKF, llms, well-known, OpenAPI and MCP over 7 days."},"mcp":{"type":"object","description":"MCP calls over 7 days."},"uso":{"type":"object","description":"Real product usage per resource: label, today, 7 and 30 days."},"contas":{"type":"object","description":"Users and guests.","nullable":true},"confiabilidade":{"type":"object","description":"Share of requests without 5xx over 7 days, and the live build."},"catalogo":{"type":"object","description":"Size of the catalog, when the product has one.","nullable":true},"apoio":{"type":"object","description":"Impressions and clicks per sponsor, when any."}},"required":["v","produto","publicado","atualizado_em","stale"]}}}}}}},"/api/vitrine/operador":{"get":{"operationId":"get_api_vitrine_operador","summary":"The product's full document on the operator panel — operator token only.","description":"Devolve: { produto, atualizado_em, operador }","parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"`Bearer <METRICS_TOKEN>` — the operator class."}],"responses":{"200":{"description":"{ produto, atualizado_em, operador }","content":{"application/json":{"schema":{"type":"object","properties":{"produto":{"type":"string","description":"Product id."},"atualizado_em":{"type":"string","description":"When the collector published.","nullable":true},"operador":{"type":"object","description":"The collector's full document, with what the public projection leaves out.","nullable":true}},"required":["produto","atualizado_em","operador"]}}}},"401":{"description":"No token, wrong token or a token of another class."},"503":{"description":"Worker without `METRICS_TOKEN` or without the control plane."}}}},"/api/vitrine/painel":{"get":{"operationId":"get_api_vitrine_painel","summary":"The whole house panel, in the shape the gm reads — operator token only.","description":"Devolve: { apps, updated?, totals? }","parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"`Bearer <METRICS_TOKEN>` — the operator class."}],"responses":{"200":{"description":"{ apps, updated?, totals? }","content":{"application/json":{"schema":{"type":"object","properties":{"apps":{"type":"array","items":{"type":"object"},"description":"One operator document per product, ordered by id."},"updated":{"type":"string","description":"When the collector closed the round."},"totals":{"type":"object","description":"House totals."}},"required":["apps"]}}}},"401":{"description":"No token, wrong token or a token of another class."},"503":{"description":"Worker without `METRICS_TOKEN` or without the control plane."}}}},"/api/vitrine/cursores":{"get":{"operationId":"get_api_vitrine_cursores","summary":"The resolved-error cursor per product (`borda`, `cli`) — operator token only.","description":"Devolve: JSON: `{ [product]: { borda?: ISO, cli?: ISO } }`; empty is `{}`.","parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"`Bearer <METRICS_TOKEN>` — the operator class."}],"responses":{"200":{"description":"JSON: `{ [product]: { borda?: ISO, cli?: ISO } }`; empty is `{}`."},"401":{"description":"No token, wrong token or a token of another class."},"503":{"description":"Worker without `METRICS_TOKEN` or without the control plane."}}}},"/api/partners":{"get":{"operationId":"get_api_partners","summary":"Partnership, sponsorship and advertising: the product's placements with a suggested price, the public numbers next to them and how to propose.","description":"Information on request, no activation: placements from the house catalogue priced in USD per 30 days (90 and 365 days discounted), sponsors in effect, an excerpt of `/api/vitrine`, the house wallet (USDC on Base) and the contact path — bank deposit, PIX or invoice are arranged in the reply. Cached for 1 hour.\nDevolve: { status, produto, idioma, titulo, descricao, publico, modalidades, placements, house_bundle, parcerias, current_sponsors, stats, payment, contact, politica, _links }","responses":{"200":{"description":"{ status, produto, idioma, titulo, descricao, publico, modalidades, placements, house_bundle, parcerias, current_sponsors, stats, payment, contact, politica, _links }","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"`sob_consulta`: information and proposal, no activation and no charge."},"produto":{"type":"string","description":"Product name."},"idioma":{"type":"string","description":"Language of the texts (the product's)."},"titulo":{"type":"string","description":"Title of the offer."},"descricao":{"type":"string","description":"One sentence about the offer."},"publico":{"type":"string","description":"Who uses the product — the audience a sponsor reaches."},"modalidades":{"type":"array","items":{"type":"object"},"description":"`{ id, nome }`: patrocinio, parceria, anuncio."},"placements":{"type":"array","items":{"type":"object"},"description":"The product's placements: `id`, `nome`, `onde`, `formato`, `exclusivo`, `medicao`, `price_usd_30d` (suggested; `null` is on request), `exposure[{ dias, price_usd }]` for 30, 90 and 365 days, `disponivel`."},"house_bundle":{"type":"object","description":"The house bundle: footer and agent mention across the ten products, discounted."},"parcerias":{"type":"array","items":{"type":"string"},"description":"Partnership ideas the product is open to discuss."},"current_sponsors":{"type":"array","items":{"type":"object"},"description":"Sponsors in effect: `id`, `nome`, `url`, `frase`, `espacos`, `ate`."},"stats":{"type":"object","description":"Excerpt of the public numbers (`hoje`, `janelas`, `agentes`, `confiabilidade`) and the `link` to `/api/vitrine`; `publicado: false` before the first publication."},"payment":{"type":"object","description":"How to pay: `rede`, `chain_id`, `ativo`, `pay_to`, `eip681` (the house wallet, when declared), `alternativas` and the `nota` — bank deposit, PIX or invoice in the reply."},"contact":{"type":"object","description":"`email`, `form_url`, `api_url` (`POST /api/contact`, free: one message every 10 s per network), `campos` (required), `campos_proposta` (the optional proposal fields, each with its accepted values), `message_template`, `instructions`."},"politica":{"type":"object","description":"Placement label, refused sectors, prepayment, deadlines."},"_links":{"type":"object","description":"`self`, `stats`, `page` (`null` until the page exists), `contact`, `casa` (the same path on the ten products)."}},"required":["status","produto","idioma","titulo","descricao","publico","modalidades","placements","house_bundle","parcerias","current_sponsors","stats","payment","contact","politica","_links"]}}}}}}},"/api/contact":{"post":{"operationId":"post_api_contact","summary":"Write to the people behind the product — free, for people and agents alike.","description":"One route for a question and for a sponsorship, partnership or ad proposal (`tipo`, with the placements of `GET /api/partners`). No captcha, no account, no payment. One message every 10 seconds per network: one that arrives sooner waits its turn and then goes out — no error. The message reaches the team by e-mail, with `email` as the reply address.\nDevolve: { ok }","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"What to call the person writing."},"email":{"type":"string","description":"Where to reply."},"message":{"type":"string","description":"What you want to say."},"tipo":{"type":"string","description":"Proposal: `patrocinio`, `parceria` or `anuncio`. Turns on the fields below."},"empresa":{"type":"string","description":"Who is proposing, when it is a company."},"site":{"type":"string","description":"Website of who is proposing."},"orcamento":{"type":"string","description":"`ate_100`, `100_500`, `500_2000`, `2000_mais` or `a_combinar`."},"espaco":{"type":"array","items":{"type":"string"},"description":"Placement ids from `GET /api/partners`, up to 6."},"duracao":{"type":"string","description":"Exposure in days: `30`, `90` or `365`."},"pagamento":{"type":"string","description":"`usdc`, `deposito` or `a_combinar`."}},"required":["name","email","message"]},"example":{"name":"Agent","email":"agent@example.com","message":"hello from an agent"}}}},"responses":{"200":{"description":"{ ok }","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","description":"Always `true` when the message was accepted."}},"required":["ok"]}}}},"400":{"description":"Validation: `code` names the field."},"503":{"description":"Contact is not configured on this server."}}}},"/api/metrics":{"get":{"operationId":"get_api_metrics","summary":"Uso e receita do produto, para o painel da casa. Financeiro exige token.","description":"Devolve: `{app, produto, uso, payments?}`.","responses":{"200":{"description":"`{app, produto, uso, payments?}`."},"401":{"description":"Token errado."},"503":{"description":"`METRICS_TOKEN` não configurado no Worker — o financeiro não sai sem ele."}}}},"/api/pricing":{"get":{"operationId":"pricing","summary":"Preços vigentes e franquias gratuitas.","description":"Devolve: { product, quota{free,paid,how_to_pay,live,free_now?,charged_now?,trial?}, pricing, billing, api_index }","responses":{"200":{"description":"{ product, quota{free,paid,how_to_pay,live,free_now?,charged_now?,trial?}, pricing, billing, api_index }","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"type":"string","description":"Product name."},"quota":{"allOf":[{"$ref":"#/components/schemas/PaymentQuota"}],"description":"Public allowances and current list prices; not personal usage."},"pricing":{"type":"string","description":"Absolute URL of the current price list."},"billing":{"type":"string","description":"Absolute URL of payment discovery or the existing billing summary."},"api_index":{"type":"string","description":"Absolute URL of the API catalog."}},"required":["product","quota","pricing","billing","api_index"]}}}},"405":{"description":"Use GET ou HEAD."}}}},"/api/billing":{"get":{"operationId":"billing","summary":"Descoberta pública de pagamento e crédito pré-pago.","description":"Devolve: { product, quota{free,paid,how_to_pay,live,free_now?,charged_now?,trial?}, pricing, billing, api_index, payment{provider,mode,network,chain_id,pay_to,homolog,dev,dev_gate,alternavel,gratis?,cobrados?,facilitator,asset,asset_address,faucet,wallets}, credit{url,header} }","responses":{"200":{"description":"{ product, quota{free,paid,how_to_pay,live,free_now?,charged_now?,trial?}, pricing, billing, api_index, payment{provider,mode,network,chain_id,pay_to,homolog,dev,dev_gate,alternavel,gratis?,cobrados?,facilitator,asset,asset_address,faucet,wallets}, credit{url,header} }","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"type":"string","description":"Product name."},"quota":{"allOf":[{"$ref":"#/components/schemas/PaymentQuota"}],"description":"Public allowances and current list prices; not personal usage."},"pricing":{"type":"string","description":"Absolute URL of the current price list."},"billing":{"type":"string","description":"Absolute URL of payment discovery or the existing billing summary."},"api_index":{"type":"string","description":"Absolute URL of the API catalog."},"payment":{"allOf":[{"$ref":"#/components/schemas/PaymentX402"}],"description":"Public x402 configuration; pay_to=null means not configured."},"credit":{"allOf":[{"$ref":"#/components/schemas/PaymentCredit"}],"description":"Prepaid credit entry point. Never contains a balance or token."}},"required":["product","quota","pricing","billing","api_index","payment","credit"]}}}},"405":{"description":"Use GET ou HEAD."}}}}}}