Get your free
API key.

Connect your app to deny.sh’s hosted services with an API key, your account’s access credential.

Free. No card. 500 API calls/month.

Use this to sign in to your dashboard for usage, audit log, billing, and account settings.

Your API key will appear on screen immediately. Keep your API key and dashboard password safe. If you lose both, we cannot restore access yet.

Your API key authorises service requests. We store a hash, never the key itself. A dashboard password only unlocks account controls.

Already have a key? Sign in · API docs · Vault

What you get
🔒

Encrypt + decoy

Free hosted encrypt/decrypt API. Creating a chosen decoy through the hosted API requires a paid plan. You can try chosen decoys in the free browser tool or run the local SDK. Compare entitlements.

📦

Vault storage

Store client-side encrypted secrets in your vault. The separate encrypt tool creates real and decoy control files.

🚨

Decoy alerts

Register a decoy’s identifier for alerts when our monitored decryption service sees it. Availability depends on your plan.

💻

Code libraries in 4 languages

Free code libraries for TypeScript, Python, Go and Rust. Local encryption needs no account.

What it looks like in practice

Create an API key, then follow the encrypt/decrypt quickstart. Both passwords are required together; choose the real or decoy control file when decrypting.

Open the quickstart ↗
No tracking
No analytics
Independent audit on the roadmap
Apache 2.0
Account created

You're in.

Copy your key, as it will not be displayed again.

Your API key
  • Your API key is hidden when this page becomes hidden, for example when you switch tabs or minimise the browser, and is not shown again on this screen.
  • The full API key is not stored. deny.sh stores its SHA-256 hash and last four characters.
  • If you lose your key, sign in with your dashboard password and choose Rotate under API keys.
01 / Agent setup

Connect your agent

Use your Free account’s API key with the OpenAI Agents SDK for JavaScript and TypeScript.

  • The test key is made up
  • No OpenAI key needed
  • Node.js 22 or newer
  1. Install the plug-in

    Run this command in an empty folder.

    Terminal
    npm install deny-sh-openai-agents @openai/agents zod
  2. Try a fake key

    Save this script as test-decoy.mjs and run it with your API key in DENY_API_KEY. It prints stopped: deny_decoy_leak.

    test-decoy.mjs
    import { createDecoyWatch } from 'deny-sh-openai-agents';
    
    const decoy = 'sk_live_DECOY_change_me_to_any_fake_value';
    const watch = createDecoyWatch({
      decoys: [{ label: 'my first decoy', value: decoy }],
    });
    await watch.arm();
    
    await watch
      .check(`The key is ${decoy}`, 'model_output')
      .catch((error) => console.log('stopped:', error.code));
    Terminal
    export DENY_API_KEY=dk_your_key
    node test-decoy.mjs
    Expected output stopped: deny_decoy_leak
    Seeing something else?
    Cannot find package 'deny-sh-openai-agents'
    Run the install command in the folder containing your script.
    An API key is required for decoy reporting or arming.
    Set DENY_API_KEY in the same terminal window and run the script again.
    deny.sh returned 401 while arming a decoy tripwire.
    Set DENY_API_KEY to the key you copied from this screen and run the script again. If you did not save it, sign in and rotate it under API keys.
  3. Check your test was recorded

    Open Decoy alerts in your dashboard to see the armed decoy and the recorded leak.

  4. Connect it to your agent

    Attach a watch configured with the same decoy to your agent’s final answers and tool calls as shown below. A final answer containing the decoy is stopped, and a tool call with the decoy in its arguments is not executed.

    agent.mjs
    import { Agent, tool } from '@openai/agents';
    import { z } from 'zod';
    import {
      createDecoyWatch,
      decoyWatchOutputGuardrail,
      decoyWatchToolInputGuardrail,
    } from 'deny-sh-openai-agents';
    
    const decoy = 'sk_live_DECOY_change_me_to_any_fake_value';
    const watch = createDecoyWatch({
      decoys: [{ label: 'my first decoy', value: decoy }],
    });
    
    const sendEmail = tool({
      name: 'send_email',
      description: 'Send an email',
      parameters: z.object({ to: z.string(), body: z.string() }),
      inputGuardrails: [decoyWatchToolInputGuardrail(watch)],
      execute: async () => 'sent',
    });
    
    const agent = new Agent({
      name: 'Support agent',
      instructions: 'Help the customer.',
      tools: [sendEmail],
      outputGuardrails: [decoyWatchOutputGuardrail(watch)],
    });
02 / Explore deny.sh
Developer quickstart

Try it now

Your first encrypt
curl -X POST https://deny.sh/api/encrypt \ -H "Content-Type: application/json" \ -H "x-api-key: dk_your_key" \ -d '{"message":"hello world","password1":"example-one","password2":"example-two"}'

Or install an SDK

npm install deny-sh // Local encryption: no API key required. import { encrypt, generateDeniableControl, generateControlData } from 'deny-sh'; const password1 = 'example-one'; const password2 = 'example-two'; const message = new TextEncoder().encode('my secret'); const controlData = generateControlData(message.length + 4); const record = await encrypt(message, { password1, password2, controlData }); const decoy = await generateDeniableControl(record.ciphertext, password1, password2, new TextEncoder().encode('decoy')); // Hosted API key (keep private): dk_your_key
pip install deny-sh # Local encryption: no API key required. from deny_sh import encrypt, generate_deniable_control ct, real_control = encrypt(b'my secret', 'example-one', 'example-two') decoy_control = generate_deniable_control(ct, 'example-one', 'example-two', b'decoy') # Hosted API key (keep private): dk_your_key
go get github.com/deny-sh-crypto/deny-go/v2 // In your Go program, import denysh from the module above. // Local encryption needs no API key. Handle errors in production. ct, realControl, err := denysh.Encrypt([]byte("my secret"), "example-one", "example-two", nil) decoyControl, err := denysh.GenerateDeniableControl(ct, "example-one", "example-two", []byte("decoy text")) // Hosted API key (keep private): dk_your_key
# Add to Cargo.toml: deny-sh = "2" // In your Rust program: use deny_sh::{encrypt, generate_deniable_control}; let (ct, real_control) = encrypt(b"my secret", "example-one", "example-two", None).unwrap(); let decoy_control = generate_deniable_control(&ct, "example-one", "example-two", b"decoy text").unwrap(); // Hosted API key (keep private): dk_your_key