AdmissibleAI

Direct SDK Quickstart

Run a short Direct SDK example against the Admissible API using your Sandbox API key. The example shows one allowed action, one denied action, and the runtime decision that explains the difference.

Send direct SDK requests against the Admissible API and see one allowed action, one denied action, and the runtime decision that explains the difference.

Ready to integrate this into a real app? Read the full docs.

Prerequisites

  • Node.js 18 or later and npm
  • Admissible API URL
  • ADMISSIBLE_API_KEY

Need an API key? Create a Sandbox account.

Quickstart

  1. Create a project directory and install dependencies

    Note: The Direct SDK package currently publishes under the @baseline-labs npm namespace. It is the official SDK package for using Admissible AI.

    Command

    mkdir admissible-sdk-quickstartcd admissible-sdk-quickstartnpm init -ynpm install @baseline-labs/sdk tsx
  2. Set the required environment variables

    Command

    export ADMISSIBLE_BASE_URL="https://api.admissible.io"export ADMISSIBLE_API_KEY="your-admissible-api-key"
  3. Run the example

    Command

    npx tsx sdk-sandbox-quickstart.ts

What this run does

This example sends direct SDK requests through Admissible so you can see how Admissible evaluates execute and commit actions at the runtime boundary.

  • The script sends one direct execute request and one direct commit request with @baseline-labs/sdk.
  • The first action is an allowed read-style execute call. The second is an irreversible production-style commit.
  • Admissible completes the execute request, blocks the commit request, and returns operation status details in the API response.

Direct SDK / Runtime integration surface

const client = new BaselineClient({ baseUrl, apiKey, userAgent: "admissible-sdk-quickstart" });const execute = await client.execute(createAllowedExecuteRequest(sessionId));await client.commit(createDeniedCommitRequest(sessionId, execute.operation.id), {  idempotencyKey: "idem_commit_001",});

What you should see

A successful first run should make the allowed path and the runtime decision easy to spot.

  • one completed execute operation
  • one blocked commit request
  • direct SDK-visible fields such as status, result, message, operation id, and nested details
  • the execute operation id carried into the blocked commit path
  • a Sandbox usage summary before and after the run