Configuring OpenAI API Keys

How to configure your API keys

Machined is a bring-your-own-key service, so you will need an OpenAI Platform account with billing enabled and a sufficient rate limit to create content.

Configuration

It's super easy to get up and running:

  1. Sign up for an OpenAI Platform account

  2. Upgrade your OpenAI Platform limits to at least Tier 1

  3. Create and copy an api key into Machined and start creating content

OpenAI Platform account

Machined requires you to have an OpenAI Platform account - you cannot connect your ChatGPT or ChatGPT Plus account (that's a different service).

The Platform account is a standalone service which is billed using a credit based system and is paid separately to ChatGPT Plus. Essentially, you add credits to your account which get consumed when you use the API services.

Machined cannot use ChatGPT Plus - you must have an OpenAI Platform account.

If you don't already have an account, sign up here.

OpenAI Usage Tiers

Machined requires your OpenAI Platform account to be on Tier 1 or above, although we highly recommend Tier 2 and above to avoid being rate limited.

OpenAI imposes rate limits on all accounts in order to preserve fair usage and protect their platform from abuse. Rate limits restrict how many tokens an account is allowed to generate over a period of time, and it's usually a different limit for each model.

In November 2023, OpenAI introduced the concept of Usage Tiers, which are essentially predefined usage levels with a specific set of rate limits, shown below:

Users can progress and upgrade from one tier to the next by following the qualification steps outlined for each tier.

You can see the tier and limits for your organisation in your account limits page.

Requirements

The below tables outlines how each of the usage tiers is supported by Machined and what behaviour you should expect.

Tier
Support
Limitations

Free

None

Will not work - free accounts are not supported

Tier 1

Partial

Can write articles but will likely experience rate limiting - useful for evaluation purposes and low volume usage

Tier 2

Full

Can write articles in bulk but might experience rate limiting for high volume usage

Tier 3+

Full

No restrictions or limitations

Machined will allow you to connect an account that is on Tier 1 - but we recommend this only for evaluation purposes as it allows you to play with the platform while waiting to qualify for the next tier.

Setup Guide

Generate an api key

Go to your OpenAI Platform account's api keys page and generate a new secret key.

  • Provide a memorable name for your secret key so that you can remember what it is used for, we recommend "machined" or similar

  • Leave the permissions as "All" because Machined uses multiple models, we might change which models we use when new models become available

After you have generated you new secret key, copy it so that you can add it to Machined in the next step.

Add the api key

In Machined open the Configuration popup and go into the OpenAI Configuration section.

You will be presented with a form where you can paste your api key. Machined will verify and validate your account.

Machined will show you a summary of your available models and their rate limits.

If you see warnings, it means that everything will work but your rate limits are lower than required so you might experience rate limiting and intermittent errors when writing content.

If you see errors, it means that there is an issue that needs to be resolved, please check the troubleshooting guide below...

Troubleshooting

If you receive an error when setting your key, this usually means that there is a problem with either your OpenAI account or API key. Common reasons for invalid keys:

  • Typos - mistyped or incorrectly copied key

    • Copy the key again, ensuring it is correct

  • Throttling - an intermittent error with your api account

    • Wait a few minutes and try again

  • Revoked key - you are using an old key that has been revoked

    • Create a new key in your account and try again

  • Restrictions on key - you are using a key that is restricted in some way

    • Create a new key in your account, and remember to leave it unrestricted

  • You are on a Free OpenAI account - free accounts are not supported

    • Add a payment method and enable billing on your OpenAI Platform account

  • You have an insufficient Rate Limit - you need an account with sufficient rate limits

    • Double check your rate limits and ensure they are sufficient

    • You could reach out to OpenAI and ask for a rate limit increase

Last updated