ChangelogPage 3

We are constantly improving our product, fixing bugs and introducing features.Here you can find the latest updates and changes to Unkey.

Follow us onTwitterandGitHub

All changelog posts

community
operations

New onboarding experience

A brand new onboarding experience

When you sign up for an Unkey account you now get a new onboarding experience. We take you through creating a workspace, API and showing how Unkey works before you land in the dashboard.

First we ask you to create a workspace, A workspace groups all your resources and billing. You can have one personal workspace for free and create more workspaces with your teammates.

Step 1

Next we ask you to create an API, an API groups all of your keys together. They are invisible to your users but allow you to filter keys by a namespace. We recommend creating one API for each environment, typically development, preview and production.

Step 2

Finally we show you how to use Unkey, we show you how to create a root key, how to use it in your application and how to create a regular key.

Step 3

We think this experience will help new users get up to speed with Unkey and make it easier to get started. Let us know what you think!

Dashboard improvements

We fixed a number of bugs and also improved the dashboard experience here are a list of them:

  1. Adding meta to a key is now automatically formatted on blur to make it easy to read
  2. The caching issues have been resolved, so creating, updating or removing any data will be reflected correctly.
  3. Adds Remaining feature to the UI to allow you to create limited usage keys in a single click.

Error messages built to inform

Have you ever worked with a third party lib, and you received an “Oops try again” error or an extremely vague error that gives you zero indication of what caused it? Great news! Unkey’s error response provide everything you could need to rectify the problem. Every error response will return:

An error code, a link to the documentation, an informative message, and a requestId that you can provide to Unkey support to track down.

Example of an error code

SDK improvements

Our typescript package @unkey/api got two upgrades this week, to make it even faster to integrate Unkey into your project.

Verify Key

You can now verify a key and make business decisions in just a few lines of code. Below is an example:

import { verifyKey } from '@unkey/api';

const { result, error } = await verifyKey('key_123');

if (error) {
  console.error(error.message);
  return;
}

if (!result.valid) {
  // Key isn't valid so don't allow access to resource
  return;
}

// process request
console.log(result);

Automatic Retries

Our SDK will now automatically retry 5 times with a backoff to smooth over network issues, you can of course override the retry and backoff. Below is an example of 10 retries with a backoff

import { Unkey } from '@unkey/api';

const unkey = new Unkey({
  token: '<UNKEY_TOKEN>',
  retry: {
    attempts: 10,
    backoff: (previousAttempts) => previousAttempts * 1000, // 0s, 1s, 2s, 3s etc
  },
});

Community shoutout

Huge shoutout to atridadl for creating a starter project using T3, Clerk, Unkey and Drizzle. Check out the link below!

Starter

product

Performance and Bug fixes

Performance Improvements

UI Improvements

  • We now provide a mobile experience if you need to manage your keys on the go!
  • We also now have a theme switcher which allows you to enjoy Unkey in dark mode.

Bug fixes

We fixed several different bugs in the last two weeks here are the highlights:

  • Improve error messages to be actionable, soon we will provide a direct link to our documentation.
  • Creating a paid team doesn't lock you to Stripe page, and allows you to navigate back to your account.
  • Dark mode charts are correctly coloured.
  • Forms now correctly display errors, for missing or incorrect fields.

Self hosting is easier

We made Unkey easier to self host, we have hidden Kafka and Tinybird behind generic interfaces to provide more flexibility, you can now pass in flags to enable specific providers:

$ unkey agent --help

Run the Unkey agent

Usage:
  unkey agent [flags]

Flags:
      --analytics string   Send analytics to a backend, available: ['tinybird']
      --enable-axiom       Send logs and traces to axiom
      --event-bus string   Use a message bus for communication between nodes, available: ['kafka']
  -h, --help               help for agent

Global Flags:
  -e, --env string   Path to a .env file

Content

How Unkey can help AI developers

OCR as a service with Unkey

security

Usage based keys

A shiny new web experience

We just spent the last week making our website, well not just a random one page of ideas we had in the beginning. Unkey makes API management easy, and we wanted our site to reflect that. Our site now has a cohesive feel, and is easy to navigate.

Next up! Our dashboard UI is getting a make over, we might even have a dark mode.

Usage based invalidation

AI is incredible popular, and part of creating your AI product is finding a way to limit a users usage, whether they are paying or you are offering a free trial. Unkey now has usage based invalidation, where you can set how many times a key can be used before we invalidate it. Simply pass in the remaining property with a value and we take care of the rest.

curl --request POST \
  --url https://api.unkey.dev/v1/keys.createKey \
  --header 'Authorization: Bearer <UNKEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "apiId":"<API_ID>",
  "remaining": 100
  }'

Then when you validate your key we will return two properties, is it valid and how many requests remain.

curl --request POST \
  --url https://api.unkey.dev/v1/keys.verifyKey \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<NEW_KEY>"
  }'

Which will return if the key is valid, and the remaining value which represents how many verifications are remaining after the current one.

{
  "valid": true,
  "remaining": 99
}

Update your keys.

Need to update ratelimits? Change some metadata? Maybe you want to use our new remaining to create tokens and update them when a user pays. This is all now possible with our update endpoint.

curl --request POST \
  --url https://api.unkey.dev/v1/keys.updateLey \
  --header 'Authorization: Bearer <UNKEY>' \
  --header 'Content-Type: application/json' \
  -d '{
    "keyId": "<KEY_ID>",
    "remaining": 200,
  }'

You can read about this in our documentation.

Community Shoutout

A huge shoutout to Wilfred Almeida who spent some time creating the Go SDK. You can check out the Go code on GitHub and even help with some remaining items.

operations
community

Build with your team

We're excited to bring you our latest changelog for July 10th. Our team and the community has been hard at work adding new features and improving existing ones to enhance your experience with Unkey.

Whitelist your IPs

The Whitelist IP feature is an essential security measure that allows you to specify the IP addresses that you want to be able to call Unkey from. This update aims to provide you with an extra layer of security, protecting your data from potential threats.

To use the Whitelist IP feature, you need to be on our Enterprise plan. You can reach out to myself or Andreas in our Discord or via email and we can add the IP range.

Introducing Teams

We're thrilled to introduce support of teams. This feature allows you to collaborate more effectively with your team members and keeps your personal side projects separate from your work projects.

To create a new team, log into the Unkey admin dashboard, and select create workspace. Once you create your team, you need to upgrade the workspace to the pro tier. Once you have upgraded the workspace you can invite your entire team to Unkey.

Daily Usage analytics

We now provide daily usage for both your API and for each individual key. You can use the analytics to find out which of your APIs is being used frequently and which of your users are power users. This is live in your dashboard right now!

Usage Example from the Unkey dashboard

Community contributions

Our community this week, has helped us introduce SDKs for three more languages. Huge shoutout to Daniel Roe for introducing a Nuxt module, and the documentation that allows our users to integrate with minimal configuration.

Thanks to Discord user glamboyosa for introducing the Elixir SDK, documentation and example and finally thanks to jonxslays for introducing the Python SDK and documentation.

We truly appreciate the community for adding to Unkey and making the product better and better.

engineering

Cache all the things

Prewarming and Stale while revalidate

Today Andreas focused on rewriting our cache to use stale-while-revalidate mechanics and prewarming when creating new keys.

As a result we now get:

  • More cache hits
  • Instant cache hits after key creation
  • No stampeding cache misses when a cache expires

This means more performance for unkey without any extra work for you.

operations
engineering

New Go API and introduce pricing

Introducing the new API

Today we finished the complete rewrite of the API in go.

  • Added versions to keys to allow future upgrade paths without breaking things.
  • Faster handlers
  • Faster machine boots
  • Actual type safety

Pricing

We also introduced pricing, we wanted pricing to be simple and affordable for anyone, so we've created flexible plans that don't need an accounting degree to figure out.

On the free tier:

  • 100 Monthly Active Keys
  • 2500 Verifications per month
  • Discord Support
  • 7 Day Data Retention

On the pro tier:

  • 250 Monthly Active keys included *
  • 10,000 Verifications included *
  • Workspaces with team members
  • Priority Support
  • Data retention for 90 days
  • Additonal active keys are billed at $0.10
  • Additonal verifications are charged at $1 per 5000

We also offer volume discounts for larger customers, please contact us for more information.

You can check out the pricing page.

operations

The First Changelog

Added this changelog

Added this very changelog for your eyes.

Added the ownerId filter

If provided, this will only return keys where the ownerId matches.

curl \
  --url https://api.unkey.dev/v1/apis/api_123/keys?ownerId=chronark \
  --header 'Authorization: Bearer <UNKEY>'