Openai Api Reference. Aug 31, 2025 · Our API platform offers our latest models and guides
Aug 31, 2025 · Our API platform offers our latest models and guides for safety best practices. Use powerful tools like remote MCP servers, or built-in tools like web search and file search to extend the model's capabilities. 概述 OpenAI 文档介绍 概述 OpenAI API 可以应用于几乎所有涉及生成自然语言、代码或图像的任务。我们提供了一系列不同能力级别的 模型,适用于不同任务的,并且能够 微调(Fine-tune) 您自己的自定义模型。这些模型可以用于从内容生成到语义搜索和分类的所有领域。 关键概念 我们建议您通过下面 Connect with other developers building with the OpenAI API Platform. The Moderation endpoint improves upon our previous content filter, and is available for free today to OpenAI API developers. This article contains a quick reference and a detailed description of the quotas and limits for Azure OpenAI. Since this server is compatible with OpenAI API, you can use it as a drop-in replacement for any applications using OpenAI API. 5), each image should be a png, webp, or jpg file less than 50MB. Must be a supported image file or an array of images. Jan 18, 2023 · Open-source examples and guides for building with the OpenAI API. Function calling allows you to connect OpenAI models to external tools and systems. To use a hosted OpenAI (or compatible) embedding model, specify the openai path in the from field of your configuration. MCP Call third-party tools and services. You can provide up to 16 images. May 14, 2025 · To actually make API calls, you have to pre-purchase credits to pay for the usage, and generate an API key that your calls over the network to OpenAI will use to authenticate. Explore guides, reference, and best practices for building AI-powered applications. Browse a collection of snippets, advanced techniques and walkthroughs. Feb 15, 2024 · For example, once in an OpenAI product, our text classifier will check and reject text input prompts that are in violation of our usage policies, like those that request extreme violence, sexual content, hateful imagery, celebrity likeness, or the IP of others. js. 1 is now available in the API, bringing faster adaptive reasoning, extended prompt caching, improved coding performance, and new apply_patch and shell tools. Create stateful interactions with the model, using the output of previous responses as input. prompt (string | list<string> | list<int> | list<list<int>>): Prompt text (s) or token IDs. Completions (/completions) Description: Generates text completions based on the provided prompt. Please refer to documentation for the supported MIME types for your use case. MCP connections are helpful in a workflow that needs to read or search data in another application, like Gmail or Zapier. The OpenAI Python library provides convenient access to the OpenAI REST API from any Python 3. Codex CLI is a coding agent from OpenAI that runs locally on your computer. Responses OpenAI's most advanced interface for generating model responses. To make the most of OpenAI’s API documentation, start by thoroughly exploring its structure and key sections. You can refer to the Models documentation to understand what models are available and the differences between them. class openai_functions. openai. File Uploads FAQ We’re adding a new capability to upload and work with different types of documents inside ChatGPT. Jan 12, 2024 · OpenAI Python library documentation · UNOFFICIAL Unofficial documentation for OpenAI's Python library I’m still hacking on it so things might move around a bit, but you can click around and see what’s there, at least. See the Request docs for all possible fields, and Parameters for explanations of specific sampling parameters. This repository contains a reference client aka sample library for connecting to OpenAI's Realtime API. Retrieves a model instance, providing basic information about the model such as the owner and permissioning. Oct 25, 2020 · The official Python library for the OpenAI API. Group together chats, upload reference files, and add custom instructions so ChatGPT remembers what matters and stays on‑topic. NOTE: For a version that does not use the OpenAI Agents SDK, see the branch without-agents-sdk. Connect with OpenAI connectors or third-party servers, or add your own server. 1 2 curl https://api. Your usage tier determines how high these limits are set and automatically increases as you send more requests and spend more on the API. Omitting parameters defines a function with an empty parameter list. Learn how to use Azure OpenAI's advanced GPT-5 series, o3-mini, o1, & o1-mini reasoning models Aug 5, 2025 · Use the API vLLM exposes a Chat Completions-compatible API and a Responses-compatible API so you can use the OpenAI SDK without changing much. after is an object ID that defines your place in the list. As of March 11, 2025, we’ve released the building blocks of our new Agents platform. Postman Postman Nov 13, 2025 · Explore the OpenAI Realtime API with our complete reference guide. It also includes a separate Costs endpoint, which offers visibility into your spend, breaking down consumption by invoice line items and project IDs. Contribute to openai/openai-openapi development by creating an account on GitHub. Complete reference documentation for the OpenAI API, including examples and code snippets for our endpoints in Python, cURL, and Node. Nov 7, 2025 · This document provides a comprehensive reference for the 136+ API endpoints organized into resource namespaces within the OpenAI Python SDK. Supports text and image inputs, and text outputs. In this article, you learn about authorization options, how to structure a request and receive a response. List and describe the various models available in the API. parsers. For details, see our API docs for our Responses API, Tools including Web Search, File Search, and Computer Use, and our Agents SDK with Tracing. responses API May 21, 2025 · OpenAI discards header values and all but the schema, domain, and subdomains of the MCP server_url after each request. To learn more about MCP, see the connectors and MCP documentation. The library includes type definitions for all request params and response fields, and offers both synchronous and asynchronous clients powered by httpx. 1 2 3 4 5 6 7 8 9 { "id": "cfile_682e0e8a43c88191a7978f477a09bdf5", "object": "container. Allow models to search the web the latest information before generating a response. API Reference ChatGPT function calling based on function docstrings. Go deeper DocumentLoader: Object that loads data from a source as list of Documents. Apr 7, 2021 · A place to share feedback on documentation and tutorials about OpenAI! Nov 13, 2025 · GPT-5. Contribute to openai/openai-java development by creating an account on GitHub. Explore developer resources, tutorials, API docs, and dynamic examples to get the most out of OpenAI's platform. Learn about WebSockets, WebRTC, pricing, and the challenges of building voice AI agents. Lists the currently available models, and provides basic information about each one such as the owner and availability. abc. For guidance on the proper filename extensions for each purpose, please follow the documentation on creating a File. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Availability Available now to all ChatGPT Plus and ChatGPT Group together chats, upload reference files, and add custom instructions so ChatGPT remembers what matters and stays on‑topic. abstract property argument_schema: dict[str, JsonType Explore resources, tutorials, API docs, and dynamic examples to get the most out of OpenAI's developer platform. You can use it to easily prototype conversational apps. The image (s) to edit. BaseLoader: API reference for the base interface. For example, another way to query the server is via the openai Python package: Code 6 days ago · Using third-party SDKs For information about using third-party SDKs and frameworks with OpenRouter, please see our frameworks documentation. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them. If you want Codex in your code editor (VS Code, Cursor, Windsurf), install in your IDE. How about a fresh start? The OpenAI API provides access to advanced AI models for natural language processing, image generation, and more. The documentation is organized to help developers quickly find what they need. Create a new video generation job from a prompt and optional reference assets. Values are strings with a maximum length of 512 characters. API and SDK reference for Apps SDK. Learn more on our API data privacy page. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program). com/v1/organization/projects/proj_abc/api_keys/key_abc \ -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \ -H "Content-Type: application/json" OpenAI API Documentation Supported Endpoints 1. Create a custom voice you can use for audio output (for example, in Text-to-Speech and the Realtime API). Schemas use “strict” mode when possible, otherwise they’re loaded as-is. txt) or read online for free. Each resource is accessible as a property on the OpenAI or AsyncOpenAI client and provides methods for interacting with specific OpenAI API capabilities. This capability builds on our existing Advanced Data Analysis model (formerly known as Code Interpreter) to improve performance on text-rich documents including PDFs, Microsoft Word documents, and presentations. These keys provide administrative capabilities, such as creating, updating, and deleting users; managing projects; and overseeing API key lifecycles. For the GPT image models (gpt-image-1, gpt-image-1-mini, and gpt-image-1. Integrations: 160+ integrations to choose from. Explore resources, tutorials, API docs, and dynamic examples to get the most out of OpenAI's developer platform. ID of the model to use. For dall-e-2, you can only provide one image, and it should be a square png file less than 4MB. temperature (float, optional, range: 0–2 The official Python library for the openai API Examples and guides for using the OpenAI API. The official Java library for the OpenAI API. Browse options in the Agent Builder. We do not train our models on inputs and outputs through our API. A cursor for use in pagination. 1 2 3 curl https://api. max_tokens (int, optional): Maximum tokens to generate. Contribute to openai/openai-cookbook development by creating an account on GitHub. Keys are strings with a maximum length of 64 characters. And, though it’s mentioned on the site, I’ll say it here: those docs are unofficial and unsupported! Ollama provides compatibility with parts of the OpenAI API to help connect existing applications to Ollama. file", "created_at": 1747848842, "bytes": 880, "container_id": "cntr Please refer to documentation for the supported MIME types for your use case. Share your own examples and guides. Responses _ OpenAI API Reference - Free download as PDF File (. How do I use stop sequences in the OpenAI API? Here is what you need to know about the stop sequence parameter in the OpenAI Chat Completions API How does the launch of Assistants API v2 affect my Assistants launched with API v1? Implications on Playground, cost, and migration How to use the OpenAI API for Q&A or to build a chatbot? Create a custom voice you can use for audio output (for example, in Text-to-Speech and the Realtime API). OpenAPI specification for the OpenAI API. The Evolution API allows for the creation and management of bots using OpenAI technology, enabling automated and personalized interactions through virtual assistants or chat completion models. Returns 200 OK once the REFER is handed off to your SIP provider. This library is in beta and should not be treated as a final implementation. pdf), Text File (. Complete reference documentation for the OpenAI API, including examples and code snippets for our endpoints in Python, cURL, and Node. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Our engineers are working on it. com/v1/videos \ -H "Authorization: Bearer $OPENAI_API_KEY" Admin API keys enable Organization Owners to programmatically manage various aspects of their organization, including users, projects, and API keys. The easiest way to get playing with the API right away is to For full documentation, guides, and API references, see the official OpenAI Agents SDK Documentation. Learn how to use the OpenAI API to generate human-like responses to natural language prompts, analyze images with computer vision, use powerful built-in tools, and more. Refer to the model guide to browse and compare available models. Extend the model's capabilities with built-in tools for file search, web search, computer use, and more. ArgSchemaParser]]) An abstract parser for a specific argument type Both converts the argument definition to a JSON schema and parses the argument value from JSON. Postman Postman See the guide for examples, and the JSON Schema reference for documentation about the format. 7+ application. Dec 11, 2025 · Rate limits ensure fair and reliable access to the API by placing specific caps on requests or tokens used within a given time period. ArgSchemaParser(argtype: Type[T], rec_parsers: list[Type[openai_functions. Here’s a Python example: Complete reference documentation for the OpenAI API, including examples and code snippets for our endpoints in Python, cURL, and Node. Set of 16 key-value pairs that can be attached to an object. . The OpenAI API provides access to advanced AI models for natural language processing, image generation, and more. Model ID used to generate the response, like gpt-4o or o3. At OpenAI, protecting user data is fundamental to our mission. Request Parameters model (string): Model identifier. Authorization keys and the server URL must be included with every API call. With memory, context, and flexible tools, they’re ideal for repeated and evolving work such as writing, research, planning, and more. This requires an audio sample and a previously uploaded consent recording. Learn how to use Azure OpenAI's REST API. Learn how to generate, refine, and manage videos using the OpenAI Sora Video API. Aug 10, 2022 · We are introducing a new and improved content moderation tool. The Usage API provides detailed insights into your activity across the OpenAI API. These values won’t appear in response objects. Learn how to turn audio into text with the OpenAI API. Contribute to openai/openai-python development by creating an account on GitHub. 1 day ago · An in-depth comparison of the capabilities and features of Anthropics, OpenAI, and Claude, helping developers choose the right AI solution for their projects. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
l5p3rf
krsdb2fwg
46qipt68ks7l6
ueojabhu
e6etgjqpm
fhibzzga7td
o2ivkjiu
kkdkksq
yoltt
wrt8n89