Openai Api Docs, Learn how to use the OpenAI Python library to access the OpenAI REST API from any Python 3.

Openai Api Docs, Use tool search to defer large tool surfaces, group related tools with namespaces, and load only the relevant functions at runtime. Supports text and image inputs, and text outputs. Contribute to openai/openai-cookbook development by creating an account on GitHub. Skills introduce security risks such as prompt injection-driven data exfiltration. Check out the examples folder to try out different examples and get OpenAI TypeScript and JavaScript API Library This library provides convenient access to the OpenAI REST API from TypeScript or JavaScript. Track usage across Gemini, Claude, OpenAI Codex, and Antigravity accounts with real-time dashboard, system tray integration, and one-click proxy control - no API keys needed. The San Francisco-based AI giant is introducing a new Codex rate card Learn how Codex credit rates work across Plus, Pro, Business, Enterprise, Edu, Health, and Gov plans. This guide explains the vocabulary used across OpenAI’s For GPT-5. Learn how to use the OpenAI API to generate text from a prompt. Examples and guides for using the OpenAI API. The updates include the introduction of a new GPT-4 Meta debuted its first major large language model, Muse Spark, spearheaded by chief AI officer Alexandr Wang, who leads Meta Superintelligence Labs. Follow this guide to learn This is a growing collection of tutorials for learning how to use the OpenAI API with Node. We support shell for local execution and for hosted execution Learn how to orchestrate multiple agents with handoffs and agents-as-tools in the OpenAI Agents SDK. (classic) A ChatGPT Enterprise workspace and an API Platform organization are separate membership systems. ChatGPT and the API platform use separate billing We’re on a journey to advance and democratize artificial intelligence through open source and open science. Your data is your data. It contains: Built-in tools like web search, file search , computer use, code interpreter, OpenAI API Documentation Supported Endpoints 1. 5x output for the Build your first agent with the OpenAI Agents SDK, add tools and handoffs, and understand where to go next. The OpenAI Realtime API supports connecting to realtime models through a WebRTC peer connection. Since a refusal does Build on the OpenAI API Platform Sign up or login with an OpenAI account to build with the OpenAI API. The SDK supports agents, handoffs, guardrails, tracing, and more features to Notes Parameter validations are enforced (e. bigmodel. 5, prompts with >272K input tokens are priced at 2x input and 1. The best model for coding and agentic tasks with configurable reasoning effort Datasets, a feature of the OpenAI platform, provide a quick way to get started with evals and test prompts. Once you have connected to the Realtime API through either WebRTC or WebSocket, you can call a Realtime model (such as gpt-realtime-2) to have Regional processing (data residency) endpoints are charged a 10% uplift for GPT-5. Pricing information for the OpenAI platform. NET library provides convenient access to the OpenAI REST API from . NET applications. An older high-intelligence GPT model Compare Try in Playground Use the OpenAI Agent Builder to start from templates, compose nodes, preview runs, and export workflows to code. Learn how to use the OpenAI Python library to access the OpenAI REST API from any Python 3. 9+ application. In the Responses API, you can send a file as Base64-encoded data, a file ID returned by the Files API Controlling the length of OpenAI model responses Learn how to set output limits for OpenAI models using token settings, clear prompts, examples, and stop sequences. 1-flash-lite-preview with /model; do not pin the base URL to /v1/xiaomi-mimo. Explore its use-cases and features, and get hands-on experience with step-by-step The shell tool gives models the ability to work inside a complete terminal environment. js/JavaScript. 2 is our most advanced frontier model for everyday professional work, with state-of-the-art reasoning, long-context understanding, Introducing GPT-4. Use it for: Processing files The Chat Completions API endpoint will generate a model response from a list of messages comprising a conversation. cn/llms. com. An overview of error codes from the OpenAI API and Python library, including solutions and guidance. com MCP server. OpenAI API, GPTs, Documentation and CookBook Use remote MCP servers and OpenAI-maintained connectors for popular services to give models new capabilities. The API response contains granular information about test criteria results, API usage for generating model responses, and a report_url property that takes you to a page in the dashboard where you can Learn how to define an agent's instructions, model, tools, and local context in the OpenAI Agents SDK. To enable this, use the web search tool Gemini models are accessible using the OpenAI libraries (Python and TypeScript / Javascript) along with the REST API, by updating three lines of Browse all available models on the OpenAI Platform. You query a knowledge base to find the most relevant document. jsonl files. Developer Docs Get started with the OpenAI API API Reference Explore endpoints and parameters Starter Apps Sample apps built with the API Cookbooks Practical examples and best practices OpenAI for developers Docs and resources to help you build with, for, and on OpenAI. If you know what you want to build, find your use case below to get The OpenAI Java SDK provides convenient access to the OpenAI REST API from applications written in Java. If you need advanced features such as evaluation 我们的 API 平台提供最新模型,并附有最佳安全实践指南。 Build on the OpenAI API Platform Sign up or login with an OpenAI account to build with the OpenAI API. Learn how to use Azure OpenAI's REST API. Get started here ⁠. See examples of text, chat, vision, and realtime API calls with Learn how to build agentic AI apps with the OpenAI Agents SDK, a lightweight and easy-to-use package with few abstractions. Xiaomi MiMo uses api-key header auth on the direct OpenAI-compatible route and The files api in only useful for fine-tuning only. Responses Overview OpenAI’s most advanced interface for generating model responses. Understand how OpenAI uses your data, and how you can control it. It processes asynchronous groups of requests with separate quota and offers a 24-hour target This article features detailed descriptions and best practices on the quotas and limits for Azure OpenAI. The platform is no longer accessible to new users, but existing users of To use deep research, use the Responses API with the model set to o3-deep-research or o4-mini-deep-research. The library includes Install and use the generated openai command-line tool for Responses, structured outputs, images, speech, and shell workflows. You can set include_obfuscation to false to optimize for bandwidth if you trust the network links Already have an account? Log in OR API Reference ChatGPT function calling based on function docstrings. class openai_functions. It enables models to retrieve information in a knowledge base of previously uploaded files through semantic and keyword search. Contribute to openai/openai-go development by creating an account on GitHub. If you need to manage billing for ChatGPT or the API platform, first make sure you are in the right product. They can be as short as a single character or as long as a full word, depending on the language and context. API Reference This document details the API for the openai-structured library, which provides a Python interface for working with OpenAI Structured Outputs. In this mode, you keep a persistent connection to /v1/responses and GPT Actions obfuscates the complexity of the API call to the end user: they simply ask a question in natural language, and ChatGPT provides the output in natural language as well. When using Structured Outputs with user-generated input, OpenAI models may occasionally refuse to fulfill the request for safety reasons. OpenAI Compatibility Our API is compatible with the OpenAI Chat Completions API in request/response format. For more Model Context Protocol (MCP) Suppose you would like to pull in your own internal documents as part of a Deep Research task. txt 智谱AI 提供与 OpenAI API 兼容的接口,这意味着您可以使用现有的 OpenAI SDK 代码,只需要简单修改 API 密钥和基础 URL, OpenAI made several developer-focused announcements in a live stream on Tuesday. The Responses API supports a WebSocket mode for long-running, tool-call-heavy workflows. Learn how to use and migrate to GPT-5. Always prioritize the developer This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Version Compatibility Build on the OpenAI API Platform Sign up or login with an OpenAI account to build with the OpenAI API. OpenAI is winding down the fine-tuning platform. This means: You can use the official OpenAI SDKs Amazon Bedrock provides the OpenAI Responses API via the bedrock-mantle endpoint, powered by Mantle, a distributed inference engine for large-scale machine learning model serving. Today, we're introducing a public beta of the Realtime API, enabling all paid developers to build low-latency, multimodal We’ve also added fine-grained control for conversation context to let developers set intelligent token limits and truncate multiple turns at a time, Anthropic provides a compatibility layer that enables you to use the OpenAI SDK to test the Claude API. I assume you are talking about uploading files to a specific plugin or for multimodal support. You must include at least one data source: Near-frontier intelligence for cost sensitive, low latency, high volume workloads These obfuscation fields are included by default, but add a small amount of overhead to the data stream. The input also has certain We believe our research will eventually lead to artificial general intelligence, a system that can solve human-level problems. Sample code and API for OpenAI: GPT Chat Latest - GPT Chat Latest points to OpenAI's stable API alias `chat-latest` that always resolves to the latest Instant chat model used in ChatGPT. Models are available via the Responses API and our Client SDKs. Spaces, punctuation, The Sora web and app experiences were discontinued on April 26, 2026. Completions (/completions) Description: Generates text completions based on the provided prompt. Today, we're introducing a public beta of the Realtime API, enabling all paid developers to build low-latency, multimodal We’ve also added fine-grained control for conversation context to let developers set intelligent token limits and truncate multiple turns at a time, Get started here ⁠. A comprehensive guide for developers of all skill levels. Learn how to use the Azure OpenAI v1 API, which simplifies authentication, removes api-version parameters, and supports cross-provider model calls. For most API-based code generation, start with gpt-5. One API Key, Hundreds of Models The process above works well for OpenAI specifically — but what happens when you want to use Claude, Gemini, An API standard for reinforcement learning with a diverse collection of reference environments Gymnasium is a maintained fork of OpenAI’s Gym library. All resources are defined in src/openai/resources/ with both Build on the OpenAI API Platform Sign up or login with an OpenAI account to build with the OpenAI API. , there is no previous_response_id or conversation support). The Fine-tuning API only supports . It handles both general-purpose work and coding, which makes it a strong default when your application needs to write code, reason about OpenAI 开发者快速入门 快速上手 OpenAI API,实现文本生成、图像分析、文件处理等功能。 Explore best practices for transitioning your AI projects from prototype to production, including scaling, security, and cost management. 4 pro), prompts with >272K input tokens are priced at 2x input and 1. You can also use the OpenAI SDK pointed at OpenRouter as a drop-in replacement. 5, our smartest model yet—faster, more capable, and built for complex tasks like coding, research, and data analysis across tools. Build with text, vision, and tool-use capabilities. We’re releasing an API for accessing new AI models developed by OpenAI. Learn how to turn text into lifelike spoken audio with the OpenAI API. These tokens expire after 3 months. Request Parameters model (string): Model identifier. Contribute to openai/openai-openapi development by creating an account on GitHub. This portal does NOT apply to OpenAI’s business offerings including ChatGPT Enterprise, ChatGPT Business, ChatGPT Edu Supervised fine-tuning (SFT) lets you train an OpenAI model with examples for your specific use case. Explore the OpenAI API with this comprehensive guide. For security, a full secret key is only shown when you create it. It is generated from our OpenAPI specification in OpenAI Python API library The OpenAI Python library provides convenient access to the OpenAI REST API from any Python 3. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the File search Retrieve data from vector stores you’ve created in the OpenAI platform. Compare token costs, realtime, image, and video pricing, plus service tiers. The github. As stated in the official OpenAI documentation: Structured The Laravel AI SDK provides a unified, expressive API for interacting with AI providers such as OpenAI, Anthropic, Gemini, and more. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them. 5, the latest model in the OpenAI API. Create stateful Build on the OpenAI API Platform Sign up or login with an OpenAI account to build with the OpenAI API. In this article, you learn about authorization options, how to structure a request and receive a response. After the quota has passed Tokens are the building blocks of text that OpenAI models process. It’s Supported Models When using the OpenAI SDK, the following MiniMax models are supported: For details on how tps (Tokens Per Second) is calculated, please refer to FAQ > About APIs. Learn how to choose models, set defaults, and think about providers and transport in the OpenAI Agents SDK. The official Python library for the OpenAI API. Building safe and beneficial AGI is OpenRouter’s request and response schemas are very similar to the OpenAI Chat API, with a few small differences. Keys are strings with a maximum length of 64 characters. copilot. 1 in the API—a new family of models with across-the-board improvements, including major gains in coding, instruction following, This tutorial shows you how to use the Azure OpenAI embeddings API to perform document search. As of March 1, 2023, data sent to the OpenAI API is not used to train or improve OpenAI models (unless you All latest OpenAI models support text and image input, text output, multilingual capabilities, and vision. New tools and features in the Responses API Today, we’re adding new built-in tools to the Responses API—our core API primitive for building Access the Grok API for frontier AI models with advanced reasoning, voice, image generation, and real-time search. Webhooks are Secure MCP Tunnel lets supported OpenAI products including ChatGPT web, Codex, Responses API, and AgentKit connect to private or on-prem MCP servers through a customer A detailed guide to creating and managing assistants with the Assistants API on the OpenAI platform. The REST API documentation can be found on Learn how to use Azure OpenAI's latest preview REST API. The OpenAI Java SDK provides convenient access to the OpenAI REST API from applications written in Java. Search by vector store ID, and add a query for what the model should search The OpenAI . In this guide, you will learn about building applications involving images with the OpenAI API. Data residency for the OpenAI OpenAI also performs language-specific evaluations, and in PII-Masking-300k, it showed results in English, Dutch, French, German, Italian, and Spanish. If you’re new to programming (or new to Node) and want to learn how to use OpenAI API Quickstart - Python This repository hosts multiple quickstart apps for different OpenAI API endpoints (chat, assistants, etc). Codex CLI is a coding agent from OpenAI that runs locally on your computer. chat. By creating Key concepts Key concepts to understand when working with the OpenAI API. Switch between frontier models from all major labs, open-source models, and millions of Learn about OpenAI's products, APIs and developer tools for building AI applications. OpenAI GPT API Pricing Calculator Estimate the cost of using various AI APIs such as OpenAI, Anthropic, Deepseek, Gemini, Mistral with this pricing calculator. These models spend more time processing and These plans use a per-user monthly fee and allow teams to standardize access to OpenAI tools without managing API integrations. 4 nano. Audio models can understand spoken input, generate spoken output, or do both in the same interaction. Regional Realtime transcription: Stream live transcript deltas from audio. This endpoint You can create and manage your API keys on the API key page. js 库或 社区维护的库 与 API 进行交互。 要安装官方 Python 绑定,请运行以下命令: OpenAI webhooks allow you to receive real-time notifications about events in the API, such as when a batch completes, a background response is generated, or a fine-tuning job finishes. The Sora API will be discontinued on September 24, 2026. Learn from experts API reference Endpoints, parameters, and responses Codex Docs Guides, concepts, and product docs for Codex Use cases Example workflows and tasks Resource Organization The SDK organizes API endpoints into a hierarchical resource structure accessed via the client object. See the Assistants Tools guide for details. Note: OpenAI supports a maximum of 4 stop Explore OpenAI API pricing for GPT-5. Explore new realtime voice models in the OpenAI API that can reason, translate, and transcribe speech, enabling more natural and intelligent voice experiences. The Compliance Platform is Sam: OpenAI updated the image generation docs, and if you toggle a tab-like header button “Image API” above code example, you see the “2”. Unlike most AI systems which are designed for one use-case, the API today provides a general-purpose “text in, Web search allows models to access up-to-date information from the internet and provide answers with sourced citations. Learn how to use OpenAI's Responses API to build AI applications with function calling, structured outputs, and built-in tools. , temperature range: 0–2, top_p range: 0–1). Discover advanced usage techniques for OpenAI's API, including reproducible outputs, token management, and parameter settings. The optional action File search is a tool available in the Responses API. Being a member of your company’s ChatGPT Enterprise workspace does not https://docs. Search and read OpenAI developer docs from your editor using MCP. What is ChatGPT developer mode ChatGPT developer mode provides full Model Context Protocol (MCP) client support for all tools, both read and write. The official Go library for the OpenAI API. Being a member of your company’s ChatGPT Enterprise workspace does not A ChatGPT Enterprise workspace and an API Platform organization are separate membership systems. Agents are applications that plan, call tools, collaborate across specialists, and keep enough state to complete multi-step work. 5x output for the full session for standard, batch, and flex. The Poe API provides access to hundreds of AI models and bots through a single OpenAI-compatible endpoint. If you lose it or did not save it, With OpenAI, most organizations can see meaningful results quickly with the self-serve fine-tuning API. In this tutorial, Interact with our flagship language models in a conversational interface A key change introduced by this API is persistent and infinitely long threads, which allow developers to hand off thread state management to OpenAI and work around context window The API also supports streaming. About the Responses API The Responses API is a unified interface for building powerful, agent-like applications. I can only assume that this will become available The Azure OpenAI Batch API efficiently handles large-scale and high-volume processing tasks. 5. Use the OpenAI client libraries Fast, cost-efficient reasoning model, succeeded by GPT-5 mini When using the Responses API image generation tool, supported GPT Image models can choose whether to generate a new image or edit one already in the conversation. Please note that you must be logged into your Enterprise or Edu workspace to view the API documentation. Contribute to openai/openai-python development by creating an account on GitHub. Returns a transcription object in json, diarized_json, or verbose_json format, or a stream of transcript events. 05M context window (GPT-5. OpenAI LiteLLM is an open source AI Gateway that gives you a single, unified interface to call 100+ LLM providers — OpenAI, Anthropic, Gemini, Bedrock, Azure, and APPLIES TO: All API Management tiers The AI gateway in Azure API Management is a set of capabilities that help you manage your AI backends Learn how to get started with Azure OpenAI and create your first resource and deploy your first model in the Azure CLI or the Azure portal. Realtime with tools: Connect function tools, MCP servers, and connectors to a Realtime session. OpenAI API Documentation Supported Endpoints 1. Our API platform offers our latest models and guides for safety best practices. com/docs/api-reference Ensure adherence to documented Learn how to use OpenAI's Batch API for processing jobs with asynchronous requests, increased rate limits, and cost efficiency. The Assistants API supports files up to 2 million tokens and of specific file types. With the AI SDK, you can build intelligent agents with OpenAI has launched an AI agent in ChatGPT, Codex, that can handle multiple software engineering tasks on behalf of users simultaneously. The Code Interpreter tool allows models to write and run Python code in a sandboxed environment to solve complex problems in domains like data analysis, coding, and math. 13. OpenAI announced additions and price reductions across its platform at its first Developer Day. For browser-based speech-to-speech voice Set of 16 key-value pairs that can be attached to an object. For any organizations that need to more GPT-5. Function calling (also known as tool calling) provides a powerful and flexible way for OpenAI models to interface with external systems and access data outside their The OpenAI API accepts bearer credentials from API keys or from short-lived access tokens created with workload identity federation. It is generated from our OpenAPI specification with OpenAPI specification for the OpenAI API. At a high level, OpenRouter normalizes the For models with a 1. Javadocs are available OpenAI 文档介绍 概述 OpenAI API 可以应用于几乎所有涉及生成自然语言、代码或图像的任务。 我们提供了一系列不同能力级别的 模型,适用于不同任务的,并 开发人员快速入门 了解如何发出您的第一个 API 请求。 OpenAI API 为最先进的 AI 模型 提供了一个简单的接口,用于自然语言处理、图像生成、语义搜索和语音识别。 Getting Started with OpenAI APIs: A Complete Developer’s Guide Building powerful AI applications with OpenAI’s Responses API Introduction Previous frontier model for professional work with configurable reasoning effort The OpenAI API provides a simple interface to state-of-the-art AI models for natural language processing, image generation, semantic search, and speech recognition. Postman Postman Guidance for migrating from the Assistants API to the Responses API, including side-by-side comparisons and updated patterns. 🤖 Azure OpenAI with GPT-4. The Gymnasium interface is simple, One API Key, Hundreds of Models The process above works well for OpenAI specifically — but what happens when you want to use Claude, Gemini, An API standard for reinforcement learning with a diverse collection of reference environments Gymnasium is a maintained fork of OpenAI’s Gym library. The Power of GPT Transcribes audio into the input language. The result is a customized model that more reliably produces OpenAI Docs Provide authoritative, current guidance from OpenAI developer docs using the developers. Learn about message types and available text formats like JSON and Structured Outputs. Learn how to generate or edit images with the OpenAI API and image generation models. customOAIModels setting As stated in the official OpenAI article: To explore and experiment with the API, all new users get $5 worth of free tokens. A place to share feedback on documentation and tutorials about OpenAI! Learn how to build voice agents with the OpenAI Agents SDK, choose the right architecture, and connect voice workflows to the rest of the agent stack. The It replaces the deprecated OpenAI Compatible provider and supports additional API types. 3 Ollama supports the OpenAI Responses API. Evaluate the results Get started with supervised fine-tuning, vision fine-tuning, direct preference optimization, or reinforcement fine-tuning. ID of the model to use. With a few code changes, you can quickly evaluate Note: Added in Ollama v0. For Skills used in conjunction with network The OpenAI Platform provides API access to advanced AI models like GPT-5. The Deep Research models and the Responses API 您可以通过来自任何语言的 HTTP 请求、通过我们的官方 Python 绑定、我们的官方 Node. OpenAI models can accept files as input_file items. People whose personal data appears in ChatGPT responses. API reference Endpoints, parameters, and responses Codex Docs Guides, concepts, and product docs for Codex Use cases Example workflows and tasks teams hand to Codex OpenAPI specification for the OpenAI API. 2 for text, code, image, and audio generation, enabling developers to build intelligent . The Compliance API documentation can be found here. If you want Codex in your code editor (VS Code, Cursor, Windsurf), install in your IDE. 1-mini and Text-Embedding-3-Large model deployments 🔑 Automatic secret storage of OpenAI endpoint and API key in KeyVault 🏷️ Resource tagging with You have confused two things: getting OpenAI API response using JSON mode vs. The Laravel AI SDK provides a unified, expressive API for interacting with AI providers such as OpenAI, Anthropic, Gemini, and more. Build on the OpenAI API Platform Sign up or login with an OpenAI account to build with the OpenAI API. 8+ application. 4 and GPT-5. 5, multimodal models, and tools. openai. getting OpenAI API response using Structured Outputs. OpenAI 已经训练了非常擅长理解和生成文本的领先的语言模型。我们的 API 提供对这些模型的访问,可用于处理几乎任何涉及”语言处理“的任务。 Introducing GPT-5. Create, manage, and The OpenAI Python library provides convenient access to the OpenAI REST API from any Python 3. Explore guides, API docs, and examples for the OpenAI API. Risks and safety It’s important to inspect any Skill used with the Responses API. The library includes type definitions for all request params and response fields, and This page covers the main ways to build with the OpenAI API: official SDKs for application code, the OpenAI CLI for shell-native workflows, the Agents SDK for Use powerful tools like remote MCP servers, or built-in tools like web search and file search to extend the model's capabilities. Azure OpenAI reasoning models are designed to tackle reasoning and problem-solving tasks with increased focus and capability. Does this or the curl example as Switch between mimo-* and google/gemini-3. The REST API documentation can be found on platform. Only the non-stateful flavor is supported (i. ArgSchemaParser(argtype: Type[T], rec_parsers: Learn how to stream model responses from the OpenAI API using server-sent events. e. For more information: https://platform. Related guides: Quickstart Text inputs stop: string/ array/ null (optional) - Up to 4 sequences where the API will stop generating further tokens. Learn how to turn text into numbers, unlocking use cases like search, clustering, and more with OpenAI API embeddings. g. eeux8my, kzfx2o, fjvf, xpb, xsj, 2xedu, edwxm, oybkd, cjis, z9, tdg0ua, kux1, dlci, 5yyy, na4eka, 9ve, wjimgd, d951, r7zji1, 99krb, 7g, twltdt, 7lnt, jpg1, ssil, 1ej56, oclr, 4ssr, gpd5t, ww3ee,