Expand description
OpenAI audio transcription, prompt-driven image analysis, and GPT Image generation.
OpenAi owns an API key and exposes the direct OpenAI API operations
currently needed by Kennedy: gpt-4o-transcribe audio transcription,
gpt-5.6 single-image analysis, and gpt-image-2 image generation. The
crate does not persist credentials, requests, responses, or media.
Structs§
- Agent
Token Usage - Token usage for one OpenAI text/tool turn.
- Agent
Tool - One function available to an OpenAI text turn.
- Agent
Tool Call - One normalized function call returned by OpenAI.
- Agent
Turn Request - One non-streaming OpenAI text/tool turn.
- Agent
Turn Response - Normalized result of one non-streaming OpenAI text/tool turn.
- Audio
Input - One in-memory audio file accepted by
gpt-4o-transcribe. - Generated
Image - One generated image held in memory.
- Image
Analysis - Normalized prompt-driven image-analysis result.
- Image
Analysis Request - One prompt-driven image-analysis request.
- Image
Analysis Usage - Documented Responses API token usage retained for image analysis.
- Image
Edit Request - One GPT Image 2 request that modifies or combines reference images.
- Image
Generation - Normalized single-image GPT Image 2 result.
- Image
Generation Request - One GPT Image 2 text-to-image request.
- Image
Input - One caller-owned in-memory image accepted for image analysis.
- Image
Token Details - Text and image token detail for GPT Image usage.
- Image
Usage - Token usage returned by GPT Image.
- Model
Metadata - Metadata advertised for one exact OpenAI model.
- OpenAi
- Cloneable asynchronous OpenAI client for transcription, image analysis, and image generation.
- Transcription
- Normalized
gpt-4o-transcriberesult. - Transcription
Request - One audio transcription request.
- Transcription
Token Details - Modality detail for token-billed audio transcription input.
- Transcription
Token Usage - Token-billed transcription usage.
Enums§
- Error
- A local validation, transport, provider, or protocol failure.
- Image
Analysis Status - Completion state of a non-streaming image-analysis response.
- Image
Background - Background selection supported by GPT Image 2.
- Image
Detail - OpenAI image-understanding detail level.
- Image
Format - GPT Image output file format.
- Image
Media Type - Stored image media accepted for image analysis.
- Image
Quality - GPT Image rendering quality.
- Image
Size - Generated image dimensions.
- Moderation
- Provider content-moderation level.
- Transcription
Usage - Usage returned for a transcription request.
Constants§
- DEFAULT_
TRANSCRIPTION_ PROMPT - Default transcription guidance preserving Kennedy’s current behavior.
- GPT_
4O_ TRANSCRIBE - OpenAI model used for audio transcription.
- GPT_5_6
- OpenAI model used for prompt-driven image analysis.
- GPT_
IMAGE_ 2 - Latest GPT Image model used for image generation.
Type Aliases§
- Result
- The result type returned by this crate.