# openai/openai-go

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/openai-openai-go).**

2,974 stars · 272 forks · Go · apache-2.0

## Links

- GitHub: https://github.com/openai/openai-go
- awesome-repositories: https://awesome-repositories.com/repository/openai-openai-go.md

## Description

openai-go is an LLM SDK for Go and a client for interacting with OpenAI services. It provides type-safe bindings to generate text, images, and audio via REST endpoints, enabling the integration of large language models and AI assistant orchestration into Go applications.

The library serves as an agent orchestration tool for managing stateful conversation threads and autonomous agents with integrated tool calling and file search. It also functions as an asynchronous batch processing client for monitoring large-scale request groups and fine-tuning jobs, alongside a management SDK for controlling organization users, project roles, and spending alerts.

The SDK covers a broad range of capabilities, including multimodal content generation for video and speech, the creation of numerical embeddings, and the management of vector stores. It includes administrative tools for governance, such as audit log retrieval and security certificate management, as well as traffic management features like exponential backoff retries and server-sent events streaming.

The client supports integration with Azure OpenAI and allows for custom network behavior through a request-response middleware pipeline and an interface-based HTTP client.

## Tags

### Artificial Intelligence & ML

- [LLM Model Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/generative-ai-resources/generative-ai/llm-model-integrations.md) — Provides the primary interface for integrating large language models into software for text generation and streaming.
- [Model API Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/model-api-integrations.md) — Provides the primary SDK for connecting Go applications to OpenAI models for text and image processing. ([source](https://github.com/openai/openai-go/blob/main/Brewfile))
- [AI Agent Skills](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-agent-skills.md) — Define and update custom capabilities or skills for AI agents. ([source](https://github.com/openai/openai-go/blob/main/api.md))
- [AI Assistants](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-assistants.md) — Allows defining persistent AI assistants by specifying their model, instructions, tools, and response formats. ([source](https://github.com/openai/openai-go/blob/main/betaassistant_test.go))
- [AI Management SDKs](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-management-sdks.md) — Provides administrative tools for controlling organization users, project roles, and spending alerts.
- [AI Model APIs](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-model-apis.md) — Select consistent model versions using predefined identifiers to ensure type-safe API requests. ([source](https://github.com/openai/openai-go/blob/main/aliases.go))
- [AI Organization Administration](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-organization-administration.md) — Provides a comprehensive suite of tools for managing organization users, project roles, and spending alerts.
- [Tool-Enhanced AI Assistants](https://awesome-repositories.com/f/artificial-intelligence-ml/artificial-intelligence-tooling/language-model-integrations/ai-assistance-tools/tool-enhanced-ai-assistants.md) — Enables the creation of AI assistants that use specialized tools and models to complete complex tasks. ([source](https://github.com/openai/openai-go/blob/main/beta.go))
- [Assistant Management APIs](https://awesome-repositories.com/f/artificial-intelligence-ml/assistant-management-apis.md) — Provides programmatic interfaces for defining and configuring AI assistants with specialized tools. ([source](https://github.com/openai/openai-go/blob/main/api.md))
- [Autonomous Agent Orchestration](https://awesome-repositories.com/f/artificial-intelligence-ml/autonomous-agent-orchestration.md) — Orchestrates autonomous agents with persistent memory and tool-calling to automate multi-step workflows.
- [Custom AI Assistant Development](https://awesome-repositories.com/f/artificial-intelligence-ml/custom-ai-assistant-development.md) — Enables the creation of personalized AI assistants with integrated tools and managed conversation threads.
- [Conversation Threads](https://awesome-repositories.com/f/artificial-intelligence-ml/language-model-orchestration/conversation-management/conversation-threads.md) — Manages persistent conversation threads to maintain state and context across multiple user-agent interactions. ([source](https://github.com/openai/openai-go/blob/main/beta.go))
- [LLM Response Streaming](https://awesome-repositories.com/f/artificial-intelligence-ml/llm-response-streaming.md) — Deliver language model output incrementally so users see results as they are generated. ([source](https://github.com/openai/openai-go/blob/main/examples/responses-streaming/main.go))
- [Model Customization](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-training-and-tuning/fine-tuning-and-customization/model-customization.md) — Supports improving model performance through fine-tuning on custom datasets and managing model versions.
- [Tool Call Executions](https://awesome-repositories.com/f/artificial-intelligence-ml/mcp-tool-connectors/tool-call-executions.md) — Executes external functions and computer-use tools within AI workflows to perform real-world actions. ([source](https://github.com/openai/openai-go/blob/main/CHANGELOG.md))
- [OpenAI API Clients](https://awesome-repositories.com/f/artificial-intelligence-ml/openai-api-clients.md) — Provides a Go client implementation of the OpenAI API specification for generating multimodal content.
- [Text Generation APIs](https://awesome-repositories.com/f/artificial-intelligence-ml/text-generation-apis.md) — Interfaces with large language models to produce text completions with reasoning and prompt caching. ([source](https://github.com/openai/openai-go/blob/main/api.md))
- [Text Embeddings](https://awesome-repositories.com/f/artificial-intelligence-ml/text-to-numeric-transformations/text-embeddings.md) — Converts input text into numerical vector representations for semantic similarity searches. ([source](https://github.com/openai/openai-go/blob/main/api.md))
- [Asynchronous Batch Processing](https://awesome-repositories.com/f/artificial-intelligence-ml/asynchronous-batch-processing.md) — Enables creation and tracking of asynchronous processing jobs for large-scale API request groups. ([source](https://github.com/openai/openai-go/blob/main/batch_test.go))
- [Audio Transcription](https://awesome-repositories.com/f/artificial-intelligence-ml/audio-transcription.md) — Convert spoken audio files into written text using various model versions. ([source](https://github.com/openai/openai-go/blob/main/audio.go))
- [Speech-to-Text Translation](https://awesome-repositories.com/f/artificial-intelligence-ml/audio-transcription/end-to-end-pipelines/speech-to-text-translation.md) — Translate spoken audio from one language to another in text format. ([source](https://github.com/openai/openai-go/blob/main/api.md))
- [Audio Transcriptions](https://awesome-repositories.com/f/artificial-intelligence-ml/audio-transcriptions.md) — Converts audio files into text using specified models and speaker identification parameters. ([source](https://github.com/openai/openai-go/blob/main/audiotranscription_test.go))
- [High Volume AI Processing](https://awesome-repositories.com/f/artificial-intelligence-ml/high-volume-ai-processing.md) — Handles large-scale asynchronous batch processing and organizes vector stores for high-volume document retrieval.
- [Image Generation](https://awesome-repositories.com/f/artificial-intelligence-ml/image-generation.md) — Create and edit visual content using image models with size and character consistency. ([source](https://github.com/openai/openai-go/blob/main/api.md))
- [Speech-to-Text Translation](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/speech-processing/speech-datasets/english/speech-to-text-translation.md) — Convert audio files into English text using specific models and style prompts. ([source](https://github.com/openai/openai-go/blob/main/audiotranslation.go))
- [Model Lifecycle Management](https://awesome-repositories.com/f/artificial-intelligence-ml/model-configuration-managers/model-lifecycle-management.md) — Retrieve information about available models or delete custom model versions. ([source](https://github.com/openai/openai-go/blob/main/api.md))
- [Model Fine-Tuning](https://awesome-repositories.com/f/artificial-intelligence-ml/model-fine-tuning.md) — Provides APIs to improve model performance using reinforcement training and specialized tuning. ([source](https://github.com/openai/openai-go/blob/main/CHANGELOG.md))
- [Multimodal Content Generation](https://awesome-repositories.com/f/artificial-intelligence-ml/multimodal-content-generation.md) — Produces and processes AI-generated images, video, and synthetic speech via API endpoints.
- [Realtime AI Session Managers](https://awesome-repositories.com/f/artificial-intelligence-ml/realtime-ai-session-managers.md) — Establish low-latency, bidirectional communication for voice and text interactions. ([source](https://github.com/openai/openai-go/blob/main/CHANGELOG.md))
- [Text-to-Speech Conversions](https://awesome-repositories.com/f/artificial-intelligence-ml/speech-and-text-conversion/text-to-speech-conversions.md) — Generate spoken audio from text using specified voices, speeds, and formats. ([source](https://github.com/openai/openai-go/blob/main/audiospeech_test.go))
- [Speech and Text Processing](https://awesome-repositories.com/f/artificial-intelligence-ml/speech-and-text-processing.md) — Convert speech to text and text to speech with diarization and real-time sessions. ([source](https://github.com/openai/openai-go/blob/main/CHANGELOG.md))
- [Structured Output Enforcements](https://awesome-repositories.com/f/artificial-intelligence-ml/structured-output-enforcements.md) — Enforces data models and schemas on model outputs to ensure predictable and machine-readable data extraction. ([source](https://github.com/openai/openai-go/tree/main/examples))
- [Text-to-Audio Synthesis](https://awesome-repositories.com/f/artificial-intelligence-ml/text-to-audio-synthesis.md) — Convert input text into spoken audio files or streams using selectable voices. ([source](https://github.com/openai/openai-go/blob/main/audiospeech.go))
- [Text-to-Speech Synthesis](https://awesome-repositories.com/f/artificial-intelligence-ml/text-to-speech-synthesis.md) — Convert written text into spoken audio output. ([source](https://github.com/openai/openai-go/blob/main/api.md))
- [Azure OpenAI Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/vector-embeddings/openai-model-integrations/azure-openai-integrations.md) — Configures specific endpoints and authentication to interact with Azure-hosted OpenAI services. ([source](https://github.com/openai/openai-go/blob/main/README.md))

### Programming Languages & Runtimes

- [Go SDKs](https://awesome-repositories.com/f/programming-languages-runtimes/go-sdks.md) — Implements a type-safe SDK in Go for interacting with OpenAI's large language models and agent orchestration.
- [Exponential Backoff Retries](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/concurrency-models/background-task-management/background-task-retry-policies/asynchronous-task-retries/exponential-backoff-retries.md) — Automatically resends failed network requests using an increasing time delay to improve reliability. ([source](https://github.com/openai/openai-go/blob/main/README.md))
- [Run Lifecycle Controls](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/runtime-management-utilities/run-lifecycle-controls.md) — Provides controls to execute and monitor the lifecycle of specific tasks running on conversation threads. ([source](https://github.com/openai/openai-go/blob/main/api.md))

### Data & Databases

- [LLM Schema Outputs](https://awesome-repositories.com/f/data-databases/data-governance-modeling/data-modeling-schemas/data-schemas/schema-validated-data-structures/schema-enforced-output-parsers/llm-schema-outputs.md) — Constrains model responses to a specific schema to ensure machine-readable and predictable structured output.
- [Vector Stores](https://awesome-repositories.com/f/data-databases/in-memory-data-stores/vector-stores.md) — Enables the creation and organization of vector stores for efficient retrieval of document chunks. ([source](https://github.com/openai/openai-go/blob/main/api.md))

### Development Tools & Productivity

- [Batch Processing Clients](https://awesome-repositories.com/f/development-tools-productivity/api-client-libraries/llm-clients/asynchronous-clients/batch-processing-clients.md) — Ships a specialized client for submitting and monitoring large-scale asynchronous API request batches.
- [Request-Response Middleware](https://awesome-repositories.com/f/development-tools-productivity/execution-middleware/request-response-middleware.md) — Intercept and modify outgoing requests or incoming responses using a custom handler pipeline. ([source](https://github.com/openai/openai-go/blob/main/README.md))

### Graphics & Multimedia

- [Generative Video Editing](https://awesome-repositories.com/f/graphics-multimedia/ai-video-editing-automation/generative-video-editing.md) — Create and modify video content including character edits and high-resolution exports. ([source](https://github.com/openai/openai-go/blob/main/CHANGELOG.md))

### Networking & Communication

- [Chat Session Management](https://awesome-repositories.com/f/networking-communication/chat-session-management.md) — Allows initialization of conversations with defined workflows, rate limits, and file upload settings. ([source](https://github.com/openai/openai-go/blob/main/betachatkitsession_test.go))
- [Server-Sent Events](https://awesome-repositories.com/f/networking-communication/server-sent-events.md) — Delivers model responses incrementally via server-sent events for real-time streaming output.
- [Streaming APIs](https://awesome-repositories.com/f/networking-communication/streaming-apis.md) — Receive output incrementally via server-sent events with dynamic buffer sizing. ([source](https://github.com/openai/openai-go/blob/main/CHANGELOG.md))

### Security & Cryptography

- [Content Moderation](https://awesome-repositories.com/f/security-cryptography/content-moderation.md) — Checks text and images against safety policies to flag prohibited content. ([source](https://github.com/openai/openai-go/blob/main/api.md))
- [Webhook Signature Verifiers](https://awesome-repositories.com/f/security-cryptography/cryptographic-signature-verification/alternative-signature-verifiers/webhook-signature-verifiers.md) — Implements cryptographic signature verification for incoming webhook payloads to ensure request authenticity. ([source](https://github.com/openai/openai-go#readme))
- [Webhook Security](https://awesome-repositories.com/f/security-cryptography/webhook-security.md) — Provides mechanisms for verifying the authenticity and integrity of incoming webhook events. ([source](https://github.com/openai/openai-go/blob/main/api.md))

### System Administration & Monitoring

- [Project Quota Management](https://awesome-repositories.com/f/system-administration-monitoring/usage-limiters/project-quota-management.md) — Retrieve and modify usage limits for specific projects to control costs and consumption. ([source](https://github.com/openai/openai-go/blob/main/adminorganizationprojectratelimit_test.go))

### Web Development

- [Batch Request Execution](https://awesome-repositories.com/f/web-development/api-rate-limiting/batch-request-execution.md) — Execute large groups of API requests from an uploaded file and manage their lifecycle. ([source](https://github.com/openai/openai-go/blob/main/batch.go))
- [Multipart Uploads](https://awesome-repositories.com/f/web-development/form-data-support/multipart-uploads.md) — Send local files or data streams as multipart form requests with custom content types. ([source](https://github.com/openai/openai-go#readme))
