Home/Glossary/API
Technical

API

An Application Programming Interface that lets developers call AI model capabilities programmatically.

Full Definition

An API (Application Programming Interface) is a standardised interface through which software applications communicate. In the context of LLMs, the API exposes endpoints for chat completions, embeddings, fine-tuning, image generation, and more. Developers send HTTP requests (typically POST with a JSON body) and receive structured JSON responses. OpenAI's API, Anthropic's API, and Google's Generative AI API follow broadly similar conventions. Authentication uses API keys. Rate limits, token quotas, and pricing are enforced at the API level. The API abstraction lets developers build AI-powered applications without managing model infrastructure, GPUs, or serving stacks.

Examples

1

A Python script calling Anthropic's /v1/messages endpoint with a JSON body containing the model, max_tokens, and messages array.

2

A webhook that calls the OpenAI embeddings API to convert incoming support tickets into vectors before storing them in a vector database.

Apply this in your prompts

PromptITIN automatically uses techniques like API to build better prompts for you.

✦ Try it free

Related Terms

Inference

The process of running a trained model to generate predictions or responses from

View →

Streaming

Sending model output tokens to the client incrementally as they are generated ra

View →

Function Calling

A model feature that allows it to request the execution of developer-defined fun

View →
← Browse all 100 terms