kcode-openai-api 0.2.0

Typed OpenAI transcription, text/tool turns, model metadata, and image operations
Documentation

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 and ordered reference-image editing;
  • stateless Responses API agent turns and model metadata for the intelligence router; 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.