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
| Name | What it does |
|---|---|
chat.completions | |
responses | The 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. |
createEmbedding | Creates numerical vector representations of text through the OpenAI embeddings API. These vectors can be used for semantic search, retrieval, and related machine-learning workflows. |
moderations | The 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
| Name | What it does |
|---|---|
embeddings | Embeddings 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. |
tools | tools 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. |
Transformer | |
Self-Attention | Self-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 Attention | PyTorch'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-Decoder | |
CNN | |
RNN | |
LSTM | |
GRU | |
GAN | |
VAE | |
Autoencoder | |
Diffusion Model | |
ResNet | |
BERT | |
GPT | |
U-Net | |
Vision Transformer | |
Mixture of Experts | |
State Space Model | |
Gradient Descent | |
Stochastic Gradient Descent | |
Backpropagation | |
Loss Function | |
Activation Function | |
Softmax | |
ReLU | |
Sigmoid | |
Tanh | |
Dropout | |
Batch Normalization | |
Layer Normalization | |
Regularization | |
L2 Regularization | |
Overfitting | |
Underfitting | |
Bias-Variance Tradeoff | |
Cross-Validation | |
Learning Rate | |
Optimizer | |
Adam | |
Momentum | |
Epoch | |
Batch Size | |
Embedding | Embeddings 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. |
Tokenization | Tokenization 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 Encoding | |
Fine-tuning | Fine-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 Learning | |
Pretraining | |
Zero-shot Learning | Zero-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 Learning | Few-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. |
RLHF | |
LoRA | |
Quantization | |
Knowledge Distillation | |
Beam Search | |
Temperature | Temperature 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 Sampling | |
Top-p Sampling | |
Perplexity | |
Classification | |
Regression | |
Clustering | Clustering groups text by similarity using semantically meaningful embedding vectors. It is an unsupervised way to uncover hidden groupings in a large text dataset. |
Dimensionality Reduction | |
Anomaly Detection | Anomaly 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 Learning | Reinforcement 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 Learning | Supervised 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 Learning | |
Self-Supervised Learning | |
Semi-Supervised Learning | |
Precision | |
Recall | |
F1 Score | |
ROC-AUC | |
Confusion Matrix | |
Cross-Entropy | |
BLEU | |
ROUGE | |
Cosine Similarity | |
Prompt Engineering | Prompt 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-Thought | |
In-Context Learning | |
Context Window | A 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. |
Hallucination | |
RAG | |
Vector Database | A 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 Search | Semantic 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 Prompt | A 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 Calling | Function 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. |
Guardrails | |
Alignment | |
Constitutional AI | |
k-NN | |
k-Means | |
Decision Tree | |
Random Forest | |
Gradient Boosting | |
XGBoost | |
SVM | |
Naive Bayes | |
PCA | |
t-SNE | OpenAI’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. |
UMAP | |
DBSCAN |
Module
| Name | What it does |
|---|---|
fineTuning | Fine-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. |
files |
Search across every package and filter by type in your dashboard.
Start learning