0
0
Prompt Engineering / GenAIml~5 mins

First interaction with GenAI APIs - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a GenAI API?
A GenAI API is a service that lets you send text or data to a smart computer model that can generate answers, stories, or other content automatically.
Click to reveal answer
beginner
Why do we need an API key when using GenAI APIs?
An API key is like a password that lets you use the GenAI service safely and tracks your usage to prevent misuse.
Click to reveal answer
beginner
What is the typical first step when calling a GenAI API?
The first step is to send a request with your input text or prompt to the API endpoint, including your API key for access.
Click to reveal answer
beginner
What kind of response do you get from a GenAI API?
You get a response containing generated text or content based on your input, often in a structured format like JSON.
Click to reveal answer
beginner
Name one common use case for GenAI APIs.
One common use case is generating creative writing, like stories or poems, based on a short prompt you provide.
Click to reveal answer
What do you need to include in your request to a GenAI API to authenticate yourself?
AAPI key
BUsername only
CPassword only
DNo authentication needed
What format is the response from a GenAI API usually in?
AJSON
BPlain text only
CXML only
DBinary data
Which of these is a typical first step when using a GenAI API?
ATrain the model yourself
BDownload the model to your computer
CCreate a database
DSend a prompt to the API endpoint
Why is it important to keep your API key secret?
ATo reduce the size of the response
BTo prevent others from using your quota
CTo improve the model's accuracy
DTo make your code run faster
Which of these is NOT a common use of GenAI APIs?
AGenerating text content
BCreating images from text
CRunning a web server
DAnswering questions
Describe the basic steps you take when making your first call to a GenAI API.
Think about what you need before and after sending your input.
You got /4 concepts.
    Explain why authentication is important when using GenAI APIs.
    Consider what could happen if anyone could use the API without restrictions.
    You got /4 concepts.