HomeIntegrations › Add authorization to OpenAI function calling
Integration

Add authorization to OpenAI function calling

When an OpenAI model calls a function, check the agent's warrant first — so a tool call can only do what you authorized.

Why authorize OpenAI tools?

The OpenAI tools/function-calling API lets the model choose which function to run and with what arguments. Your handler executes it. That handler is the enforcement point: before it acts, confirm the caller's warrant permits this resource, action, and amount. Liceat makes that a one-line wrap, and records the decision.

Enforce inside your tool handler

import { createClient, guardTool } from 'liceat';
const decide = createClient({ gateway: 'https://liceat.com' }).decider();
const chargeCard = guardTool(decide,
  { resource: 'pay:stripe/charge', action: 'pay', amount: a => a.cents, currency: 'USD' },
  async (a) => stripe.charges.create({ amount: a.cents, currency: 'usd' }));

for (const call of message.tool_calls) {
  if (call.function.name === 'charge_card') {
    const args = JSON.parse(call.function.arguments);
    const result = await chargeCard(agentWarrant, args).catch(e => ({ error: e.message }));
    // return `result` as the tool output — the model sees a clean denial if blocked
  }
}

What you get

Frequently asked

What is Liceat?

Liceat is permission infrastructure for AI agents. You issue a warrant — a scoped, spend-capped, revocable token — that grants an agent narrow authority; the agent presents it at the point of action; Liceat enforces it (scope, spend, rate, holder-binding, revocation) and records every decision in a tamper-evident log. It is open source with a zero-dependency SDK for TypeScript and Python.

Is it free?

The SDK and self-hosted gateway are free and open source. The hosted gateway at liceat.com gives 10,000 free decisions with no card, then meters at fractions of a cent per decision — payable by card or USDC.

Give your agents permission, not your keys.

Free to self-host. 10,000 free decisions on the hosted gateway — no card.

Get an API key Read the docs