---
title: File Upload 만들기 | RunAPI
description: 로컬 파일, 원격 HTTPS URL 또는 base64 소스 하나를 업로드하고 임시 URL을 받습니다.
url: https://runapi.ai/ko/docs/api/files/create.md
canonical: https://runapi.ai/ko/docs/api/files/create
locale: ko
---

> HTML 버전: https://runapi.ai/ko/docs/api/files/create
> 에이전트용 사이트 색인: https://runapi.ai/llms.txt

# File Upload 만들기

로컬 파일, 원격 HTTPS URL 또는 base64 소스 하나를 업로드하고 임시 URL을 받습니다.

## 엔드포인트

POST /api/v1/files

Base URL: https://runapi.ai

API 버전: v1

인증: Authorization: Bearer YOUR_API_KEY

## 요청

나열된 요청 위치에만 값을 전송하세요.

### application/json - Base64 source

```json
{
  "file_name": {
    "description": "생성될 파일 업로드의 선택적 파일명.",
    "required": false,
    "type": "string"
  },
  "source": {
    "description": "Base64로 인코딩된 소스 바이트.",
    "properties": {
      "data": {
        "description": "Base64 데이터",
        "required": true,
        "type": "string"
      },
      "type": {
        "description": "base64 소스 표현 방식을 선택합니다.",
        "required": true,
        "type": "string"
      }
    },
    "required": true,
    "type": "object"
  }
}
```

### application/json - URL source

```json
{
  "file_name": {
    "description": "생성될 파일 업로드의 선택적 파일명.",
    "required": false,
    "type": "string"
  },
  "source": {
    "description": "다운로드할 원격 HTTPS 소스.",
    "properties": {
      "type": {
        "description": "URL 소스 표현 방식을 선택합니다.",
        "required": true,
        "type": "string"
      },
      "url": {
        "description": "다운로드할 공개 HTTPS URL.",
        "format": "uri",
        "required": true,
        "type": "string"
      }
    },
    "required": true,
    "type": "object"
  }
}
```

### multipart/form-data

```json
{
  "file": {
    "description": "업로드할 로컬 파일 바이트.",
    "format": "binary",
    "required": true,
    "type": "string"
  },
  "file_name": {
    "description": "생성될 파일 업로드의 선택적 파일명.",
    "required": false,
    "type": "string"
  }
}
```

## 성공 응답

HTTP 201 - POST /api/v1/files

```json
{
  "created_at": "2026-07-27T10:00:00.000Z",
  "expires_at": "2026-07-27T11:00:00.000Z",
  "file_name": "mask.png",
  "mime_type": "image/png",
  "size_bytes": 204800,
  "url": "https://file.runapi.ai/temp/user-uploads/mask.png"
}
```

## 오류 응답 (401)

HTTP 401

### 응답 스키마

```json
{
  "properties": {
    "error": {
      "description": "사람이 읽을 수 있는 오류 메시지.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 응답 예시

```json
{
  "error": "Authentication required"
}
```

## 오류 응답 (403)

HTTP 403

### 응답 스키마

```json
{
  "properties": {
    "error": {
      "description": "사람이 읽을 수 있는 오류 메시지.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 응답 예시

```json
{
  "error": "Standard API key required"
}
```

## 오류 응답 (400)

HTTP 400

### 응답 스키마

```json
{
  "properties": {
    "error": {
      "description": "사람이 읽을 수 있는 오류 메시지.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 응답 예시

```json
{
  "error": "Only HTTPS URLs are allowed"
}
```

## 오류 응답 (408)

HTTP 408

### 응답 스키마

```json
{
  "properties": {
    "error": {
      "description": "사람이 읽을 수 있는 오류 메시지.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 응답 예시

```json
{
  "error": "Download timeout"
}
```

## 오류 응답 (413)

HTTP 413

### 응답 스키마

```json
{
  "properties": {
    "error": {
      "description": "사람이 읽을 수 있는 오류 메시지.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 응답 예시

```json
{
  "error": "File size exceeds the maximum allowed size"
}
```

## 오류 응답 (415)

HTTP 415

### 응답 스키마

```json
{
  "properties": {
    "error": {
      "description": "사람이 읽을 수 있는 오류 메시지.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 응답 예시

```json
{
  "error": "This content type is not supported"
}
```

## 오류 응답 (422)

HTTP 422

### 응답 스키마

```json
{
  "properties": {
    "error": {
      "description": "사람이 읽을 수 있는 오류 메시지.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 응답 예시

```json
{
  "error": "File upload failed. Please try again."
}
```

## 오류 응답 (429)

HTTP 429

### 응답 스키마

```json
{
  "properties": {
    "error": {
      "description": "사람이 읽을 수 있는 오류 메시지.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 응답 예시

```json
{
  "error": "Too many file uploads for this account. Please retry later."
}
```

## cURL 예시



### curl

```curl
curl -X POST https://runapi.ai/api/v1/files \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"source":{"type":"url","url":"https://cdn.runapi.ai/public/samples/mask.png"},"file_name":"mask.png"}'
```

## 관련 참조

- [파일](https://runapi.ai/ko/docs/api/files.md)
- [파일 업로드 객체](https://runapi.ai/ko/docs/api/files/object.md)

---

## RunAPI의 더 많은 정보

- [홈](https://runapi.ai/ko/.md)
- [모델 카탈로그](https://runapi.ai/ko/models.md)
- [요금](https://runapi.ai/ko/pricing.md)
- [제공사](https://runapi.ai/ko/models)
- [문서](https://runapi.ai/ko/docs/guides)
- [SDK](https://runapi.ai/ko/sdk.md)
- [CLI](https://runapi.ai/ko/cli.md)
- [MCP Server](https://runapi.ai/ko/mcp.md)
- [Claude Code와 Cursor](https://runapi.ai/ko/claude-code-vs-cursor.md)
- [Cursor API 설정](https://runapi.ai/ko/cursor-api-setup.md)
- [RunAPI와 OpenRouter 비교](https://runapi.ai/ko/openrouter-alternative.md)
- [엔터프라이즈](https://runapi.ai/ko/contact.md)
- [문의](https://runapi.ai/ko/contact.md)
- [약관](https://runapi.ai/ko/terms.md)
- [개인정보](https://runapi.ai/ko/privacy.md)
- [에이전트용 사이트 색인](https://runapi.ai/llms.txt)

문의: contact@runapi.ai

## 구조화된 데이터

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "ko",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/ko",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/ko/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "ko",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/ko",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/koicon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "ko",
    "@type": "TechArticle",
    "headline": "File Upload 만들기",
    "description": "로컬 파일, 원격 HTTPS URL 또는 base64 소스 하나를 업로드하고 임시 URL을 받습니다.",
    "url": "https://runapi.ai/ko/docs/api/files/create",
    "mainEntityOfPage": "https://runapi.ai/ko/docs/api/files/create"
  }
]
```
