Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

API reference

AI & ML API reference

AI / machine-learning engineering

Identifiers
112
With full guides
25
Types
3

Topics covered

  • Embeddings & vector search
  • Prompt engineering
  • RAG pipelines
  • Fine-tuning vs RAG
  • Function & tool calling
  • Streaming responses
  • Evals & guardrails
  • Cost & token optimisation

Function

NameWhat it does
chat.completionsFunction
responsesThe Responses API makes direct model requests for text, structured outputs, tools, and multimodal workflows. Submit a model and input, then read generated output from the returned response.
createEmbeddingCreates numerical vector representations of text through the OpenAI embeddings API. These vectors can be used for semantic search, retrieval, and related machine-learning workflows.
moderationsThe Moderations API identifies potentially harmful text and image content. Use its category flags and scores to apply application-specific filtering, review, or account-safety policies.

Const

NameWhat it does
embeddingsEmbeddings convert text into vectors that preserve aspects of its content or meaning. Comparing these vectors enables semantic search, clustering, recommendations, anomaly detection, diversity measurement, and classification.
toolstools is the request parameter that gives an OpenAI model access to callable functions and built-in capabilities. The model can choose a tool, while your application performs the operation and returns its output for continued generation.
TransformerConst
Self-AttentionSelf-attention lets sequence positions integrate information from one another. PyTorch’s TransformerEncoderLayer implements this with a feedforward network and exposes multi-head attention configuration.
Multi-Head AttentionPyTorch's MultiheadAttention jointly attends to information from multiple representation subspaces. It splits the model dimension across parallel heads, combines their outputs, and supports self-attention or cross-attention.
Encoder-DecoderConst
CNNConst
RNNConst
LSTMConst
GRUConst
GANConst
VAEConst
AutoencoderConst
Diffusion ModelConst
ResNetConst
BERTConst
GPTConst
U-NetConst
Vision TransformerConst
Mixture of ExpertsConst
State Space ModelConst
Gradient DescentConst
Stochastic Gradient DescentConst
BackpropagationConst
Loss FunctionConst
Activation FunctionConst
SoftmaxConst
ReLUConst
SigmoidConst
TanhConst
DropoutConst
Batch NormalizationConst
Layer NormalizationConst
RegularizationConst
L2 RegularizationConst
OverfittingConst
UnderfittingConst
Bias-Variance TradeoffConst
Cross-ValidationConst
Learning RateConst
OptimizerConst
AdamConst
MomentumConst
EpochConst
Batch SizeConst
EmbeddingEmbeddings represent text as vectors that preserve aspects of content or meaning. They support similarity-based tasks such as search, clustering, recommendations, anomaly detection, and classification.
TokenizationTokenization divides text into tokens—commonly occurring character sequences that models process. Token count affects how much input and generated output can fit within a model’s context length.
Positional EncodingConst
Fine-tuningFine-tuning adapts an OpenAI base model to a specific task using representative input-output examples. The process involves preparing JSONL data, creating a job, and evaluating the resulting model.
Transfer LearningConst
PretrainingConst
Zero-shot LearningZero-shot classification with embeddings assigns new text to the most similar candidate class without labeled training data. Embed each class name or short description, compare it with the input embedding, and choose the highest-similarity class.
Few-shot LearningFew-shot learning steers a language model with a handful of input/output examples in the prompt. The model infers the pattern and applies it to a new task input.
RLHFConst
LoRAConst
QuantizationConst
Knowledge DistillationConst
Beam SearchConst
TemperatureTemperature controls sampling randomness in a completion. Values from 0 to 2 trade determinism for variety: lower is more focused, higher is more random.
Top-k SamplingConst
Top-p SamplingConst
PerplexityConst
ClassificationConst
RegressionConst
ClusteringClustering groups text by similarity using semantically meaningful embedding vectors. It is an unsupervised way to uncover hidden groupings in a large text dataset.
Dimensionality ReductionConst
Anomaly DetectionAnomaly detection can use embedding vectors to represent data and identify items that differ from a reference set. OpenAI documents embeddings as useful for anomaly detection, but not a dedicated anomaly-detection API.
Reinforcement LearningReinforcement fine-tuning (RFT) trains a reasoning model by grading generated responses and reinforcing higher-scoring behavior. It is intended for complex, domain-specific tasks that require advanced reasoning.
Supervised LearningSupervised fine-tuning adapts a supported model using examples of prompts and correct responses. It is intended for tasks such as classification, nuanced translation, fixed-format generation, and instruction-following correction.
Unsupervised LearningConst
Self-Supervised LearningConst
Semi-Supervised LearningConst
PrecisionConst
RecallConst
F1 ScoreConst
ROC-AUCConst
Confusion MatrixConst
Cross-EntropyConst
BLEUConst
ROUGEConst
Cosine SimilarityConst
Prompt EngineeringPrompt engineering designs model instructions and inputs to produce responses that consistently satisfy requirements. Use clear guidance, context, examples, evaluations, and versioned deployment practices to improve reliability.
Chain-of-ThoughtConst
In-Context LearningConst
Context WindowA context window is the token-based memory limit for a model during a generation request. It determines how much input and conversational material the model can consider, and its size varies by model.
HallucinationConst
RAGConst
Vector DatabaseA vector store is an OpenAI-managed container for files used in semantic search. Files are automatically chunked, embedded, and indexed when added, and natural-language queries return relevant content.
Semantic SearchSemantic search uses embeddings to find semantically relevant chunks in indexed data, including matches with few or no shared keywords. OpenAI's Retrieval API performs this search over vector stores.
System PromptA system prompt is an application-level instruction supplied as a system-role message to guide model behavior. For newer o1 models, use a developer message instead.
Function CallingFunction calling lets OpenAI models request application code or external services through declared function tools. Your application executes the requested calls, returns their outputs, and lets the model continue or answer.
GuardrailsConst
AlignmentConst
Constitutional AIConst
k-NNConst
k-MeansConst
Decision TreeConst
Random ForestConst
Gradient BoostingConst
XGBoostConst
SVMConst
Naive BayesConst
PCAConst
t-SNEOpenAI’s embeddings guide uses t-SNE to transform high-dimensional embedding data into two dimensions for visualization. The example applies scikit-learn’s TSNE to an embedding matrix and recommends cosine similarity for comparing embeddings.
UMAPConst
DBSCANConst

Module

NameWhat it does
fineTuningFine-tuning adapts an OpenAI base model to task-specific behavior using representative input-output examples. Prepare JSONL data, upload it, create a job, and evaluate the resulting model.
filesModule

Search across every package and filter by type in your dashboard.

Start learning