Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Create OpenAPI 3.1.0 schema files for OpenAI Custom GPTs Actions. Use when the user needs to (1) Generate OpenAPI schemas for GPT actions/API integrations, (2) Convert API documentation to OpenAPI format, (3) Validate or fix existing OpenAPI schemas for GPT compatibility, (4) Add authentication configurations (API Key, OAuth 2.0), (5) Create schemas for specific HTTP methods (GET, POST, PUT, DELETE), (6) Structure request/response models for GPT consumption.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 99% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 88% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 111% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 36% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 28% | 0% |
Create OpenAPI 3.1.0 schemas that enable Custom GPTs to call external REST APIs via the Actions protocol.
To create a schema, you need:
3.1.0 (not 3.0.x or 2.0)yamlopenapi: 3.1.0 info: title: My API description: What this API does version: 1.0.0 servers: - url: https://api.example.com paths: /endpoint: get: operationId: uniqueOperationName summary: Brief description description: Detailed description for GPT responses: '200': description: Success content: application/json: schema: type: object
| Element | Purpose | Tips | |---------|---------|------| | operationId | Unique identifier | Use camelCase, no spaces | | description | GPT decision guidance | Be specific about when to use | | summary | Brief context | Max 300 characters | | parameters | Input collection | Use enums for fixed values |
yaml# Simply omit security sections paths: /public/data: get: operationId: getPublicData security: [] # Explicitly no auth
yamlcomponents: securitySchemes: ApiKeyAuth: type: apiKey in: header # or query name: X-API-Key security: - ApiKeyAuth: [] paths: /private/data: get: operationId: getPrivateData security: - ApiKeyAuth: []
yamlcomponents: securitySchemes: OAuth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://auth.example.com/authorize tokenUrl: https://auth.example.com/token scopes: read: Read access write: Write access
OAuth Requirements:
https://chat.openai.com/aip/{g-YOUR-GPT-ID}/oauth/callback and https://chatgpt.com/aip/{g-YOUR-GPT-ID}/oauth/callbackyamlpaths: /search: get: operationId: searchItems parameters: - name: query in: query required: true schema: type: string description: Search term - name: limit in: query schema: type: integer default: 10 description: Max results to return responses: '200': description: Search results
yamlpaths: /items: post: operationId: createItem requestBody: required: true content: application/json: schema: type: object required: - name properties: name: type: string description: type: string tags: type: array items: type: string responses: '201': description: Item created
yamlpaths: /upload: post: operationId: uploadFile requestBody: content: multipart/form-data: schema: type: object properties: file: type: string format: binary description: type: string responses: '200': description: Upload successful
yamlpaths: /documents/{id}: get: operationId: getDocument parameters: - name: id in: path required: true schema: type: string responses: '200': description: Document data content: application/json: schema: type: object properties: openaiFileResponse: type: array items: type: object properties: name: type: string mime_type: type: string content: type: string format: byte # Base64-encoded
Descriptions are critical - GPT uses them to decide when to call actions:
yaml# Good - specific and actionable description: Fetches current weather conditions for a given city. Use when the user asks about temperature, precipitation, or weather forecasts. # Bad - vague description: Gets weather data
Return raw data, NOT natural language:
yaml# Good - structured data { "temperature": 72, "condition": "sunny", "humidity": 45 } # Bad - pre-formatted text { "message": "The weather is sunny with 72 degrees and 45% humidity" }
yamlparameters: - name: unit in: query schema: type: string enum: ["celsius", "fahrenheit", "kelvin"] description: Temperature unit
Control confirmation behavior with extension:
yamlpaths: /delete-account: post: operationId: deleteAccount x-openai-isConsequential: true # Always prompts
Default behavior:
false (shows "Always allow")true (always prompts)| Limit | Value | |-------|-------| | Description/summary per endpoint | 300 chars | | Parameter description | 700 chars | | Endpoints per action slot | 30 | | Action slots per GPT | 10 | | OpenAPI file size | 1 MB | | Request/Response payload | < 100K chars | | Request timeout | 45 seconds | | Max files per request | 10 | | Max file size | 10 MB | | TLS Version | 1.2+ | | Port | 443 only |
OpenAPI 3.1.0 supports these formats:
yamltype: string format: date-time # ISO 8601 type: string format: date # YYYY-MM-DD type: string format: email type: string format: uri type: string format: uuid type: number format: float type: number format: double type: integer format: int32 type: integer format: int64
See references/examples.md for complete working examples of:
Before using a schema:
openapi: 3.1.0operationId values are uniquerequired: trueTest schemas before deployment:
Other measured skills in the registry, with their headline benchmark lift.