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

# Does APIYI Support the Files API?

> APIYI does not provide the Files API, nor the Batch, Assistants, and similar APIs that depend on it. Calling /v1/files returns "Current group … has no available channels for model". Send images, PDFs, and other files directly in the request as base64 or a URL.

## Short Answer

**No.** APIYI does not provide the Files API, meaning the flow where you upload a file first, get a `file_id`, and then reference it in a request. The APIs that depend on file uploads are not provided either:

| API | Path | Result |
| - | - | - |
| OpenAI Files API | `/v1/files` | 503, "no available channels" for the current group |
| OpenAI Assistants API | `/v1/assistants`, `/v1/threads` | 503, same as above |
| OpenAI Batch API | `/v1/batches` | 404 `Invalid URL` |
| OpenAI Vector Stores, Uploads | `/v1/vector_stores`, `/v1/uploads` | 404 `Invalid URL` |
| Claude Message Batches | `/v1/messages/batches` | 404 `Invalid URL` |
| Gemini Files API | `client.files.upload()`, `/v1beta/files` | Not available |

**What to do instead**: put images, PDFs, and other files **directly into the chat request** as base64 or a URL. Every provider's models support this inline style; see below.

## What the Error Means

Calling `/v1/files` returns:

```json theme={null}
{
  "error": {
    "message": "Current group default has no available channels for model  under billing mode [pay-as-you-go, pay-per-request] (request id: …)",
    "type": "shell_api_error"
  }
}
```

Note that nothing follows `for model`. The platform routes each request to a channel by model name. A file upload request carries no model name, so the platform finds no matching channel and returns this error. What it really means is that **the platform does not provide this API**. It has nothing to do with your group, balance, or token permissions, and switching groups or retrying will not help.

If you reference a `file_id` in a chat request, the error depends on the endpoint, for example:

| Usage | Error |
| - | - |
| `file.file_id` in `/v1/chat/completions` | `Files [file-xxx] were not found` |
| `input_file.file_id` in `/v1/responses` | `Invalid 'input[0].content[0].file_id'` |

> [!NOTE]
>
> If you use the official OpenAI, Anthropic, or Google SDK with `base_url` pointed at APIYI, methods such as `client.files.create()`, `client.files.upload()`, and `client.batches.create()` will fail. Switch to the inline style below.

## Alternative: Put the File Directly in the Request

**OpenAI format**

**Images**: pass a public URL or `data:image/png;base64,...` in `image_url`.

**PDF**: in `/v1/responses`, use `file_data` on `input_file`; in `/v1/chat/completions`, use `file_data` on the `file` type.

```json theme={null}
{
  "model": "gpt-5.4-mini",
  "input": [{
    "role": "user",
    "content": [
      {
        "type": "input_file",
        "filename": "report.pdf",
        "file_data": "data:application/pdf;base64,JVBERi0xLjQK..."
      },
      { "type": "input_text", "text": "Summarize this file" }
    ]
  }]
}
```

**Claude format**

**Images**: an `image` block with `source.type` set to `base64` or `url`.

**PDF**: a `document` block with `source.type` set to `base64`. `source.type = "file"` depends on the Files API and is not available.

```json theme={null}
{
  "model": "claude-haiku-4-5-20251001",
  "max_tokens": 1024,
  "messages": [{
    "role": "user",
    "content": [
      {
        "type": "document",
        "source": {
          "type": "base64",
          "media_type": "application/pdf",
          "data": "JVBERi0xLjQK..."
        }
      },
      { "type": "text", "text": "Summarize this file" }
    ]
  }]
}
```

**Gemini format**

**Images, PDFs, audio and video**: pass base64 in `inline_data`, up to 20MB per file. Images can also be passed as a public URL in `file_data.file_uri`.

```json theme={null}
{
  "contents": [{
    "role": "user",
    "parts": [
      {
        "inline_data": {
          "mime_type": "application/pdf",
          "data": "JVBERi0xLjQK..."
        }
      },
      { "text": "Summarize this file" }
    ]
  }]
}
```

For large videos, see [Video Understanding API](/en/api-capabilities/video-understanding).

All three styles were tested on 2026-10-22: the same PDF was sent through `/v1/responses`, `/v1/chat/completions`, Claude `/v1/messages`, and Gemini `generateContent`, and the model read the file content correctly every time.

> [!TIP]
>
> The cost of the inline style is that every request carries the file again, so request bodies get larger. If you ask many questions about the same file, convert it to text and put that in the prompt, or use each provider's caching to reduce the cost of repeated input; see [Does APIYI Support Cache Billing?](/en/faq/cache-billing).

## What About Batch Processing?

There is no Batch API. For batch jobs, send ordinary requests concurrently from your client; for concurrency limits see [What Are the API Concurrency Limits?](/en/faq/api-concurrency). Ordinary requests are billed at normal prices, without the asynchronous discount of the official Batch API.

## Related Docs

> **[Video Understanding API](/en/api-capabilities/video-understanding)**
>
> How each model accepts video input, and the size limits

> **[How to Configure Base URL? Differences Between /v1, Root Domain, and /v1beta](/en/faq/base-url-config)**
>
> How to fill it in for the OpenAI / Claude / Gemini formats

> **[What Are the API Concurrency Limits?](/en/faq/api-concurrency)**
>
> Send batch jobs concurrently from your client

> **[How Can I Troubleshoot Model API Errors?](/en/faq/model-error-troubleshooting)**
>
> Match the error type step by step


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.