Skip to main content
POST
/
v1
/
config
/
grants
Typescript (SDK)
import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";

const raijinLabsLucidAi = new RaijinLabsLucidAi({
  bearerAuth: process.env["RAIJINLABSLUCIDAI_BEARER_AUTH"] ?? "",
});

async function run() {
  const result = await raijinLabsLucidAi.payments.lucidCreatePaymentGrant({
    tenantId: "<id>",
    agentPassportId: "<id>",
    runId: "<id>",
    scope: {
      models: [
        "<value 1>",
      ],
      tools: [],
      maxPerCallUsd: 8892.57,
    },
    limits: {
      totalUsd: 2605.79,
      expiresAt: 877872,
      maxCalls: 60861,
    },
  });

  console.log(result);
}

run();
{
  "success": true,
  "grant": {
    "grant_id": "<string>",
    "tenant_id": "<string>",
    "agent_passport_id": "<string>",
    "run_id": "<string>",
    "scope": {
      "models": [
        "<string>"
      ],
      "tools": [
        "<string>"
      ],
      "max_per_call_usd": 123
    },
    "limits": {
      "total_usd": 123,
      "expires_at": 123,
      "max_calls": 123
    },
    "attestation": {
      "balance_verified_at": 123,
      "balance_source": "escrow"
    },
    "signature": "<string>",
    "signer_pubkey": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.lucid.foundation/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Lucid API key (lk_live_... or lk_test_...)

Body

application/json
tenant_id
string
required
agent_passport_id
string
required
run_id
string
required
scope
object
required
limits
object
required
attestation
object

Response

Grant created

success
boolean
required
grant
object
required