aiAI TOOLS.
THE ARTIFICIAL INTELLIGENCE DIRECTORY
Top 100
◎  EN
Start here

What is an API?

Find out how a software requests a result from a service, what is sent and what it receives in return.

The idea: make a request with known rules

An API is an interface that allows software to communicate according to documented rules. You use an application with buttons; another program can use its API to request an operation. For an AI, it may be to send a text to a template and receive a response. The API is not the model itself and does not automatically represent all functions of the consumer application.

Imagine a summary form. Your site sends the text to your server, which calls the AI service, then returns the result to the visitor. The access key remains on the server. This organization controls requests and spending instead of distributing a private key to all those who open the page.

Elements of a claim

A request has an address, a method and sometimes content. The address means an endpoint, i.e. a service operation. The method specifies, in particular, whether you are reading information or sending a request. Headers can contain authentication and content format. The body transmits the data, often in JSON form. These rules must be verified in the supplier's documentation.

Immediate response or pending work

An API can respond immediately with the result. For long video or processing, it can return a task ID. The program then consults its status or is awaiting notification. A "waiting" response does not mean that the work has failed. Check the operation before returning the same request and risking a duplicate.

Before a first call, identify the required account, billing, data sent and expected result. Use fictional content and a limited trial. A technically successful answer still needs to be reread: a valid status does not prove the quality of the AI response.

Questions before you start

Does an application subscription always include its API?

No. Access and billing for API must be checked separately.

Do you need to program to use an API?

An automation tool can handle calls, but data, permissions and errors remain to be understood.

Does an API give access to all the functions of the site?

No. Only the transactions documented and authorized in your offer can be used.

Continue learning

Official documentation