Skip to main content
Code for each endpoint: Chat Completions, Responses, Messages.

Rules

  • Check what the model accepts. architecture.input_modalities in /v1/models lists text, image, audio and file. Sending another type fails with 400 unsupported_modality before the request reaches a provider.
  • Size. One inline image, file or audio part can be up to 20 MiB, and the whole request up to 32 MiB.
  • Files by value or by link. Send files as base64 or as an https link. NagaAI has no Files API, so a file_id fails with 400 file_id_unsupported. Models without native file input receive the text of the file.
  • Audio formats. input_audio.data is raw base64. A data: prefix fails with 400. format is one of wav, mp3, aiff, aac, ogg, flac, m4a, pcm16, pcm24.
  • Messages documents. NagaAI drops a document with a content source. Use base64, url or text.