swift-openai-api

0.0.1

OpenAI API client generated using Swift OpenAPI Generator
atacan/swift-openai-api

What's New

Swift OpenAI API

This is a Swift package for the OpenAI public API. It is generated from the official OpenAI OpenAPI specification using Swift OpenAPI Generator.

Issues

OpenAI's OpenAPI specification has some issues. Some of them are fixed in the download script with string replacements.

For example, duplicate models are removed from the OpenAPI specification. Type mismatches are fixed by replacing the type with the correct one.

Installation

Add the following to your Package.swift file:

dependencies: [
    .package(url: "https://github.com/atacan/swift-openai-api", from: "0.1.0"),
],
targets: [
    .target(name: "YourTarget", dependencies: [
        .product(name: "OpenAIUrlSessionClient", package: "swift-openai-api"),
        // .product(name: "OpenAIAsyncHTTPClient", package: "swift-openai-api"),
    ]),
]

Description

  • Swift Tools 6.0.0
View More Packages from this Author

Dependencies

Last updated: Sun May 11 2025 20:26:13 GMT-0900 (Hawaii-Aleutian Daylight Time)