0% found this document useful (0 votes)
3 views11 pages

Lecture 05 What Are APIs

APIs (Application Programming Interfaces) enable different software applications to communicate and share data, simplifying software development by allowing developers to integrate existing services rather than building from scratch. Key components of an API include the API client, endpoint, API key, and API request, which facilitate communication between clients and servers. In AI/ML development, APIs provide access to advanced functionalities, reduce development time and costs, and help developers avoid complexities associated with AI implementation.

Uploaded by

syedmudaser92
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views11 pages

Lecture 05 What Are APIs

APIs (Application Programming Interfaces) enable different software applications to communicate and share data, simplifying software development by allowing developers to integrate existing services rather than building from scratch. Key components of an API include the API client, endpoint, API key, and API request, which facilitate communication between clients and servers. In AI/ML development, APIs provide access to advanced functionalities, reduce development time and costs, and help developers avoid complexities associated with AI implementation.

Uploaded by

syedmudaser92
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

What are APIs ?

API Call API Call

Cake = Bakery7.GetCake(2 pound, 3000) Karahi = Restaurant4.GetKarahi(2kg, 8000)

Function Function
Endpoint Subscription Key Endpoint
Subscription Key
Purpose of API Call
• API allows different software applications to communicate and share
data, enabling them to work together.

• APIs simplify software development by enabling developers to integrate


data, services, or capabilities from other applications, rather than
needing to develop them from scratch.
API Call --- Components
API client:
API client makes it easier for a person to use an API while hiding the complexities of the API
backend details.

Endpoint:
An endpoint is a dedicated Uniform Resource Locator (URL) that points to the location of a
resource on a server.

API key:
A unique passcode containing letters and numbers that grants access to an API. These keys
often authenticate an application or identify an authorized user.

API request:
API request is a message sent to an application asking a server for information or a service.
API Call -- Format
HTTP Method
GET
https://socialmedia.com/v1beta/GetComments?User=UserId&apikey=AIzaSyB14KbVfFYxUwoF0U6
OpcenAJY-i5JVOKE

Endpoint Parameter API Key

POST
https://sociamedia.com/v1beta/SubmitComment?User=UserId&apikey=AIzaSyB14KbVfFYxUwoF0U
6OpcenAJY-i5JVOKE
{“Comment”:”This looks excellent.”, Request Body
“rating” : “5/5”
}
Client - API Server communication

API Server Web Server Database


Client
Request API Key
1 Server

2 API Key granted

3
API Key with Request

4 Resource granted
Web Application & API
Web Application:
An online shopping website where users browse, select, and
purchase products. For example, Amazon

API: The backend service that allows web application (Amazon)


to retrieve product information, check inventory or process
payments.
Advantages of APIs in AI/ML Development
In AI development, APIs enable AI developers to integrate sophisticated AI
functionalities into applications without building complex AI models from scratch,
streamlining development and making advanced technologies accessible.

Advantages:

• Access to AI Capabilities: APIs help Integrate AI functionalities from services like


OpenAI, Google Cloud, or Microsoft Azure into their applications.

• Reduced Development Time: Instead of building AI models from the ground up,
developers can leverage pre-trained models and algorithms through APIs, significantly
reducing development time and effort.

• Escape from AI Complexities: Developers can concentrate on the required features


instead of getting Involved in the complexities of AI implementation.

• Reduced costs: By leveraging pre-built models and algorithms, developers can reduce
development costs.
Difference between web application & API
Examples of AI APIs
•OpenAI API:
Provides access to powerful language models for tasks like text generation, translation, and
code generation.

•Google Cloud AI APIs:


Offers a suite of machine learning and AI tools for vision, speech, natural language, and
structured data analysis.

•Microsoft Azure AI Services:


Provides pre-built machine learning models and algorithms for tasks like emotion detection,
facial recognition, and speech recognition.

•IBM Watson: An AI platform that helps developers create intelligent apps with natural
language understanding and big data analysis capabilities.

•Clarifai: Specializes in visual recognition and computer vision technology.


Aassignment

Retrieve API key for Google Gemini API.


What is API Authentication ?

You might also like