> ## Documentation Index
> Fetch the complete documentation index at: https://docs.naga.ac/llms.txt
> Use this file to discover all available pages before exploring further.

# Multimodal Inputs

> Send text, images, audio, and files through the Responses input model.

`Responses API` accepts either a plain string `input` or an array of typed input items. For multimodal requests, use `message` items whose `content` array contains typed parts.

Use this page when your prompt needs more than plain text, such as screenshots, PDFs, or audio clips.

## Supported Input Parts

| Part type     | Main fields                                                 | Notes                                               |
| ------------- | ----------------------------------------------------------- | --------------------------------------------------- |
| `input_text`  | `text`                                                      | Plain text input                                    |
| `input_image` | `image_url`, optional `detail`                              | `image_url` accepts `http`, `https`, or `data` URLs |
| `input_audio` | `input_audio` object                                        | Common payload uses `data` plus `format`            |
| `input_file`  | `filename`, `file_data`, `file_url`, or nested `input_file` | Use inline URL or data payloads                     |

## Image Example

<CodeGroup>
  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      base_url="https://api.naga.ac/v1",
      api_key="YOUR_API_KEY",
  )

  response = client.responses.create(
      model="gpt-4.1",
      input=[
          {
              "type": "message",
              "role": "user",
              "content": [
                  {"type": "input_text", "text": "Summarize this receipt."},
                  {
                      "type": "input_image",
                      "image_url": "https://example.com/receipt.png",
                      "detail": "high",
                  },
              ],
          }
      ],
  )

  print(response.output_text)
  ```

  ```javascript Node.js theme={null}
  import OpenAI from 'openai';

  const client = new OpenAI({
    baseURL: 'https://api.naga.ac/v1',
    apiKey: 'YOUR_API_KEY',
  });

  const response = await client.responses.create({
    model: 'gpt-4.1',
    input: [
      {
        type: 'message',
        role: 'user',
        content: [
          { type: 'input_text', text: 'Summarize this receipt.' },
          {
            type: 'input_image',
            image_url: 'https://example.com/receipt.png',
            detail: 'high',
          },
        ],
      },
    ],
  });

  console.log(response.output_text);
  ```

  ```bash cURL theme={null}
  curl https://api.naga.ac/v1/responses \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "gpt-4.1",
      "input": [
        {
          "type": "message",
          "role": "user",
          "content": [
            { "type": "input_text", "text": "Summarize this receipt." },
            { "type": "input_image", "image_url": "https://example.com/receipt.png", "detail": "high" }
          ]
        }
      ]
    }'
  ```
</CodeGroup>

## File And PDF Inputs

Use inline file payloads that the gateway can forward through its chat-style pipeline.

<CodeGroup>
  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      base_url="https://api.naga.ac/v1",
      api_key="YOUR_API_KEY",
  )

  response = client.responses.create(
      model="gpt-4.1",
      input=[
          {
              "type": "message",
              "role": "user",
              "content": [
                  {
                      "type": "input_text",
                      "text": "Read this PDF and list the main obligations.",
                  },
                  {
                      "type": "input_file",
                      "filename": "policy.pdf",
                      "file_data": "https://example.com/policy.pdf",
                  },
              ],
          }
      ],
  )

  print(response.output_text)
  ```

  ```javascript Node.js theme={null}
  import OpenAI from 'openai';

  const client = new OpenAI({
    baseURL: 'https://api.naga.ac/v1',
    apiKey: 'YOUR_API_KEY',
  });

  const response = await client.responses.create({
    model: 'gpt-4.1',
    input: [
      {
        type: 'message',
        role: 'user',
        content: [
          {
            type: 'input_text',
            text: 'Read this PDF and list the main obligations.',
          },
          {
            type: 'input_file',
            filename: 'policy.pdf',
            file_data: 'https://example.com/policy.pdf',
          },
        ],
      },
    ],
  });

  console.log(response.output_text);
  ```

  ```bash cURL theme={null}
  curl https://api.naga.ac/v1/responses \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "gpt-4.1",
      "input": [
        {
          "type": "message",
          "role": "user",
          "content": [
            { "type": "input_text", "text": "Read this PDF and list the main obligations." },
            { "type": "input_file", "filename": "policy.pdf", "file_data": "https://example.com/policy.pdf" }
          ]
        }
      ]
    }'
  ```
</CodeGroup>

Supported file patterns include:

* `{"type":"input_file","filename":"policy.pdf","file_data":"https://example.com/policy.pdf"}`
* `{"type":"input_file","filename":"policy.pdf","file_data":"data:application/pdf;base64,..."}`
* `{"type":"input_file","input_file":{"filename":"policy.pdf","file_data":"https://example.com/policy.pdf"}}`

`file_id` is not supported on this public gateway path.

## Audio Inputs

For multimodal audio understanding, send an `input_audio` part. A common payload shape is:

```json theme={null}
{
  "type": "input_audio",
  "input_audio": {
    "data": "UklGRiQAAABXQVZFZm10IBAAAAABAAEAIlYAAESsAAACABAAZGF0YQAAAAA=",
    "format": "wav"
  }
}
```

Use the direct [Audio API](/api/audio) instead when the job is transcription, translation, or text-to-speech.

## Input Validation

Model and capability validation happens centrally. If a chosen model does not support one of your requested input types, the request can fail before generation begins.

## Common mistakes

* using a plain string `input` when the request actually needs typed multimodal parts
* trying to send `file_id` references on this gateway path
* choosing a model that does not support the input type you are sending
* using `Responses` multimodal input for workflows that should really use the dedicated `Audio API` or `Images API`

## Related Docs

* [Capability-level Multimodal Inputs](/build/multimodal-inputs)
* [Responses API](/api/responses)
* [Create response reference](/api-reference/endpoints/responses/create)
