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

# 스트리밍 응답 활성화

> Serverless Inference에서 스트리밍 출력을 활성화하여 모델 응답을 점진적으로 수신하세요.

`stream` 옵션을 `true`로 설정하면 모델의 응답을 청크 스트림으로 점진적으로 반환하므로 전체 응답을 기다리지 않고 도착하는 대로 결과를 표시할 수 있습니다. 모델이 출력을 생성하는 데 시간이 걸리는 경우 유용합니다.

모든 호스팅된 모델은 스트리밍 출력을 지원합니다. 모델이 출력을 생성하기 시작하는 데 오랜 시간이 걸리는 경우 비스트리밍 요청이 시간 초과될 수 있으므로 [추론 모델](https://docs.coreweave.com/ko/products/inference/serverless/response-settings/reasoning.md)에 스트리밍을 권장합니다.

다음 예시는 Chat Completion 요청에 스트리밍을 활성화합니다:

> [tab] Python
>
> ```python theme={"system"}
> import openai
>
> client = openai.OpenAI(
>     base_url='https://api.inference.wandb.ai/v1',
>     api_key="[YOUR-API-KEY]",  # https://forge.coreweave.com/settings 에서 API 키를 생성하세요
> )
>
> stream = client.chat.completions.create(
>     model="openai/gpt-oss-120b",
>     messages=[
>         {"role": "user", "content": "Tell me a rambling joke"}
>     ],
>     stream=True,
> )
>
> for chunk in stream:
>     if chunk.choices:
>         print(chunk.choices[0].delta.content or "", end="", flush=True)
>     else:
>         print(chunk) # Show CompletionUsage object
> ```

> [tab] Bash
>
> ```bash theme={"system"}
> curl https://api.inference.wandb.ai/v1/chat/completions \
>   -H "Content-Type: application/json" \
>   -H "Authorization: Bearer [YOUR-API-KEY]" \
>   -d '{
>     "model": "openai/gpt-oss-120b",
>     "messages": [
>       { "role": "user", "content": "Tell me a rambling joke" }
>     ],
>     "stream": true
>   }'
> ```
