kcode-openai-api 0.1.2

OpenAI transcription, image analysis, and GPT Image generation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# kcode-openai-api

An isolated Rust client for Kennedy's direct OpenAI API surface:

- `gpt-4o-transcribe` audio transcription with the existing faithful-transcript prompt;
- `gpt-image-2` single-image generation with flexible size, quality, format,
  compression, background, and moderation controls; and
- typed response normalization, bounded response handling, sanitized errors,
  and provider request IDs.

`OpenAi::open(api_key)` takes ownership of an API key and returns a cloneable
asynchronous client. The library does not persist credentials, audio, prompts,
transcripts, generated images, usage, or any other state.

The API key is retained in redacted, zeroizing memory and sent only in a
sensitive `Authorization` header to fixed OpenAI HTTPS endpoints. See
`Documentation.md` for the integration API and `Specification.md` for exact
behavior and limitations.