There are two costs associated with using OpenAI and building tools designed for your business:
- The time it takes to understand your requirements, designing and coding the user interface (whether it's a chat bot, a form to upload files, embedding data from files or a voice to text translator, etc), then linking to OpenAI and showing the responses. This is the work that AI BUSINESS SOLUTIONS does.
- Other the initial discovery and proof of concept, all AI tools supplied by AI BUSINESS SOLUTIONS can be supplied on a subscription basis.
- The cost of using OpenAI - see below.
OpenAI uses different "models" depending on what you need. Some models are 1,200 times more expensive than others! (Prices are below.)
Current OpenAI API Models
- GPT-3.5 - this is the same model that you can access through ChatGPT free and Pro versions. It's quicker than GPT-4 but not as accurate. It's good for writing a basic article, letter or email but is a bit same-sy and easy to spot that it's been written by AI. Both 3.5 and 4 can translate to/from English, Spanish, French, Italian, German, Dutch, Russian, Chinese, Japanese, Korean and many other languages.
- GPT-4 - this is the same model you can access through ChatGPT Pro version. It's a little slower than 3.5 but is much more accurate and less likely to return text that sounds like an AI has written it.
- Ada - named after Ada Lovelace, a pioneer in computer programming, the Ada model is used for embeddings. If you have any data, documents, web pages or any other data you want to input into OpenAI, so you can ask it questions about, then Ada will be used to translate all the text into numbers (or vectors, as they're known). These are then stored in a vector database so they can be queried.
- Whisper - this is the transcriber model, so it can turn an MP3 file into text (single voice only, though, at the moment).
- HALL-E - this is the image generation model, so you can describe an image and it will produce a square representative image for you.
Getting your API Key
To get started you just need to register an account with OpenAI. You don't even need to set up a payment method as you get £5 worth of tokens for free (this can be used in your Proof of Concept). After you've logged on, click on API then on your avatar top-right and select API Keys. You just need to create a single API key - call it anything, then copy it (as you won't see it again), and send it to us. It's a simple process.
Tokens are not entirely easy to understand but here is what OpenAI says about models and tokens:
"You can think of tokens as pieces of words, where 1,000 tokens is about 750 words. These two sentences are 27 tokens."
As at July 2023, the token prices are as follows (per 1,000 tokens):
GPT4
Model | Input | Output |
---|---|---|
8K context | $0.03 / 1K tokens | $0.06 / 1K tokens |
32K context | $0.06 / 1K tokens | $0.12 / 1K tokens |
GPT-3.5
Model | Input | Output |
---|---|---|
4K context | $0.0015 / 1K tokens | $0.002 / 1K tokens |
16K context | $0.003 / 1K tokens | $0.004 / 1K tokens |
Ada Embeddings
Model | Usage |
---|---|
Ada v2 | $0.0001 / 1K tokens |
HALL-E Images
Resolution | Price |
---|---|
1024×1024px | $0.020 / image |
512×512px | $0.018 / image |
256×256px | $0.016 / image |
Whisper Audio to Text
Model | Usage |
---|---|
Whisper | $0.006 / minute (rounded to the nearest second) |
So you can see that an hour's audio transcription costs 36 cents, or to create a large image is 2 cents per image.
Embeddings take the most tokens, but 180,000 words (or around a 700 page Word document) would be about 1 million tokens, so it would cost 10 cents to create the vector embeddings for the document. Spreadsheets do take up more tokens as the information is relative and not just plain text, but it's still not prohibitively expensive.
Lower Cost
GPT-3.5-turbo Chatbot- Description: A basic chatbot leveraging GPT-3.5-turbo. The app can be used multiple times with the API key being the only changing component.
- Development Costs: Low – it involves setting up API calls and designing a basic UI for chat.
- Running Costs: Calculated per token – costs scale based on the complexity and length of interactions.
- Useful for: Simple, text-based interactions or FAQs.
Medium Cost
Whisper and HALL-E integration- Description: Integrating speech recognition (Whisper) and image understanding (HALL-E) capabilities.
- Development Costs: Medium – it involves integrating multiple APIs and handling different types of data (text, speech, images).
- Running Costs: Higher – it involves usage cost for two separate services (Whisper and HALL-E), in addition to the GPT model.
- Useful for: Advanced, multimodal applications.
- Description: Training GPT to learn and interact based on specific website content.
- Development Costs: Medium to High – it involves scraping the website, cleaning data, fine-tuning the model, and integrating it with the chat interface.
- Running Costs: Higher – besides API usage cost, costs for model fine-tuning and storing fine-tuned models would apply.
- Useful for: Customised interactions based on specific content or domain knowledge.
High Cost
Document Upload and Management with Embeddings and GPT-4- Description: Involves uploading and managing documents, using embeddings for document understanding, and storing vectors in a database.
- Development Costs: High – it involves integrating the API with a database and building document upload and management features.
- Running Costs: Higher – in addition to the costs for API usage, there will be storage costs for documents and embeddings.
- Useful for: High complexity tasks, such as document analysis, knowledge extraction, and maintaining a searchable knowledge base.
Actual costs will vary depending on factors like the specific requirements of the project, the region, the chosen cloud/database provider, and many other factors.