# (Legacy) Serverless Hosted API

{% hint style="info" %}
우리는 **권장합니다** Serverless Hosted API의 V2를 사용하는 것을. V2 API가 더 빠릅니다.\
\
[새 API를 시작하려면 Serverless Hosted API V2 문서를 참고하세요.](/roboflow/roboflow-ko/deploy/serverless-hosted-api-v2.md)
{% endhint %}

## 모델 지원

다음 모델 유형은 Serverless Hosted API(v1)에서 지원됩니다:

| 작업 유형                                                                                                | Hosted API(v1)에서 지원됨 |
| ---------------------------------------------------------------------------------------------------- | -------------------- |
| [객체 감지](/roboflow/roboflow-ko/deploy/serverless/object-detection.md)                                 | ✅                    |
| [분류](/roboflow/roboflow-ko/deploy/serverless/classification.md)                                      | ✅                    |
| [인스턴스 세그멘테이션](/roboflow/roboflow-ko/deploy/serverless/instance-segmentation.md)                      | ✅                    |
| [시맨틱 세그멘테이션](/roboflow/roboflow-ko/deploy/serverless/instance-segmentation/semantic-segmentation.md) | ✅                    |
| [Keypoint Detection](/roboflow/roboflow-ko/deploy/serverless/keypoint-detection.md)                  | ✅                    |

## 지연 시간 비교(v1 vs v2)

Serverless Hosted API로 전송된 요청의 엔드투엔드 지연 시간은 여러 요인에 따라 달라집니다:

1. 실행 시간에 영향을 미치는 모델 아키텍처
2. 업로드 시간과 실행 중 모델 추론 시간에 영향을 미치는 이미지의 크기와 해상도
3. 요청 업로드 시간과 응답 다운로드 시간에 영향을 미치는 네트워크 지연 시간과 대역폭.
4. 특정 시점의 서비스 구독 상태와 다른 사용자의 사용량으로 인해 대기열 지연이 발생할 수 있음

<figure><img src="/files/bf207d167a2474589dddabd04d1002abddf63647" alt=""><figcaption></figcaption></figure>

아래 표에서는 v1과 v2 Serverless Hosted API의 대표적인 벤치마크를 보여줍니다. 엔드투엔드 지연 시간(E2E)과 실행 시간(Exec) 모두를 보여줍니다. 이 수치는 참고용이며, 사용자가 직접 다음을 사용하여 자체 벤치마크를 수행할 것을 권장합니다. [our inference benchmark tools](https://inference.roboflow.com/inference_helpers/cli_commands/benchmark/) 또는 자체 사용자 정의 벤치마크를 사용해 보세요.

<table><thead><tr><th width="176.14410400390625">모델</th><th>V2(E2E)</th><th>V2(Exec)</th><th>V1(E2E)</th><th>V1(Exec)</th></tr></thead><tbody><tr><td>yolov8x-640</td><td>401 ms</td><td>29 ms</td><td>4084 ms</td><td>821 ms</td></tr><tr><td>yolov8m-640</td><td>757 ms</td><td>21 ms</td><td>572 ms</td><td>265 ms</td></tr><tr><td>yolov8n-640</td><td>384 ms</td><td>17 ms</td><td>312 ms</td><td>63 ms</td></tr><tr><td>yolov8x-1280</td><td>483 ms</td><td>97 ms</td><td>6431 ms</td><td>3032 ms</td></tr><tr><td>yolov8m-1280</td><td>416 ms</td><td>52 ms</td><td>1841 ms</td><td>1006 ms</td></tr><tr><td>yolov8n-1280</td><td>428 ms</td><td>35 ms</td><td>464 ms</td><td>157 ms</td></tr></tbody></table>

사용자 각자의 모델 추론과 워크플로우에 대해 직접 벤치마크를 실행하여 특정 사용 사례에 대한 실제 지표를 얻을 것을 권장합니다.

## 제한 사항

Serverless Hosted API(v1)는 특정 작업 유형과 관계없이 최대 5MB의 파일을 허용합니다. 이 제한에는 이미지 파일 크기와 첨부된 요청 정보가 포함되며 이에 국한되지 않습니다.

{% hint style="info" %}
요청이 너무 큰 경우에는 첨부된 이미지를 축소하는 것을 권장합니다. 이미지는 서버에 수신된 후 모델 아키텍처가 허용하는 입력 크기로 다시 축소되므로, 일반적으로 성능 저하로 이어지지 않습니다.\
\
Python SDK와 같은 일부 SDK는 API로 전송되기 전에 이미지를 자동으로 모델 아키텍처의 입력 크기로 축소합니다.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/roboflow/roboflow-ko/deploy/serverless.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
