> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.beatapi.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.beatapi.io/_mcp/server.

# Qwen Responses

POST https://direct.beatapi.io/v1/responses
Content-Type: application/json

BeatAPI 키 하나로 OpenAI Responses API에서 Qwen3.8 Max와 Qwen3.8 Flash를 호출합니다.- 현재 모든 Qwen 모델이 엔드포인트 `POST /v1/responses` 하나를 사용합니다. `model`만 바꿔 전환하세요.
- 스트리밍과 함수 호출. 두 모델 모두 1,000,000토큰 창 전체에 같은 가격이 적용됩니다.
- OpenAI SDK와 호환됩니다. 기본 URL을 바꾸고 BeatAPI 키를 사용하세요. 기존 Chat Completions 연동은 [Chat Completions](/text-api/qwen/chat-completions)를 참고하세요.
- 대화 상태는 서버에 저장되지 않습니다. 매 턴마다 전체 기록을 `input`에 담아 보내세요.텍스트 요청의 기본 URL로는 `https://direct.beatapi.io`를 사용하세요. Cloudflare의 100초 제한을 받지 않으므로 스트리밍하지 않는 긴 요청도 끊기지 않습니다. `https://api.beatapi.io`도 동작하며, 네트워크에서 `direct.beatapi.io`에 접근할 수 없을 때의 대안입니다. 키, 모델, 가격은 양쪽이 같습니다. 이미지와 영상 API는 `https://api.beatapi.io`만 사용합니다.POST/v1/responses실행해 보기API Explorer에서 이 엔드포인트를 엽니다. BeatAPI API 키를 입력하고 전송하세요. 실제 호출이며 본인 잔액에서 과금됩니다.## 모델`model`에 다음 ID 중 하나를 보내세요. 각각 별개의 모델이며, 서로의 별칭으로 취급하지 마세요.| 모델 ID           | 컨텍스트(토큰)  | 최대 출력(토큰) | 포지셔닝                                                    | 입력, 1M 토큰당 USD | 출력, 1M 토큰당 USD | 참고                                                                                             |
| --------------- | --------- | --------- | ------------------------------------------------------- | -------------- | -------------- | ---------------------------------------------------------------------------------------------- |
| `qwen3.8-max`   | 1,000,000 | 128,000   | 코딩, 전문 업무, 멀티모달 이해, 장기 에이전트 워크플로를 위한 2.4조 파라미터 MoE 플래그십 | \$0.80         | \$2.40         | 코딩, 전문 업무, 멀티모달 이해, 장기 에이전트 워크플로를 위한 2.4조 파라미터 플래그십 MoE 모델. 1,000,000토큰 컨텍스트, 최대 128,000출력 토큰. |
| `qwen3.8-flash` | —         | —         | 시각적 추론, 문서, 에이전트 작업을 위한 Qwen 비전-언어 모델                   | \$0.06         | \$0.188        | 대량 작업을 위한 빠르고 저렴한 등급. 시각적 추론, 문서, 에이전트 작업을 위한 비전-언어 모델입니다.                                     |- 가격은 할인이 적용된 기본 등급입니다. 롱 컨텍스트 등급, 캐시 입력 요금, 캐시 쓰기는 이 표에 없습니다. [가격표](https://beatapi.io/pricing)를 참고하세요.
- `—`는 카탈로그에서 해당 수치를 공개하지 않는다는 뜻입니다.## 빠른 시작서버에 `openai` 패키지를 설치하고 키는 `BEATAPI_API_KEY`에 보관하세요. 브라우저 코드에는 절대 넣지 마세요. `output_text`는 답변 텍스트를 가져오는 SDK 단축 속성입니다. 아래는 요청 예시이며 실제로 기록된 모델 출력이 아닙니다.`output_text`(또는 `output`의 `output_text` 파트)에서 답변을 읽은 다음 `status`와 `usage`를 확인하세요. HTTP 200만으로는 답변이 작업 요구를 충족한다고 볼 수 없으니 애플리케이션에서 검증하세요. 텍스트 요청은 바로 반환되므로 `/v1/tasks`를 폴링하지 마세요.```bash title="cURL"
curl --request POST \
  --url https://direct.beatapi.io/v1/responses \
  --header "Authorization: Bearer $BEATAPI_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "qwen3.8-max",
  "max_output_tokens": 2000,
  "input": "Design a resilient webhook retry strategy for a payments API."
}'
``````python title="Python"
import os
from openai import OpenAI

client = OpenAI(api_key=os.environ["BEATAPI_API_KEY"], base_url="https://direct.beatapi.io/v1")
response = client.responses.create(
    model="qwen3.8-max",
    max_output_tokens=2000,
    input="Design a resilient webhook retry strategy for a payments API.",
)
print(response.output_text)
``````javascript title="JavaScript"
import OpenAI from "openai";

const client = new OpenAI({ apiKey: process.env.BEATAPI_API_KEY, baseURL: "https://direct.beatapi.io/v1" });
const response = await client.responses.create({
  "model": "qwen3.8-max",
  "max_output_tokens": 2000,
  "input": "Design a resilient webhook retry strategy for a payments API."
});
console.log(response.output_text);
```## 엔드포인트와 인증`POST https://direct.beatapi.io/v1/responses`Authorization
string
필수`Bearer <BEATAPI_API_KEY>`. 키는 `sk-` 접두사가 있든 없든 동작합니다.## 요청 파라미터표준 OpenAI Responses 필드를 받습니다. 요청 형식이 호환된다고 해서 모든 모델별 옵션이나 호스팅 도구가 지원되는 것은 아니므로, 사용하는 옵션은 직접 테스트하세요.model
string
필수정확한 모델 ID입니다.**허용 값**: `qwen3.8-max`, `qwen3.8-flash`- 각 ID는 별개의 모델이며 다른 모델의 별칭이 아닙니다.
- 키로 `GET /v1/models`를 호출해 사용 가능한 모델을 확인하세요.input
string | object[]
필수프롬프트입니다. 문자열 또는 메시지, 함수 호출과 그 출력 같은 입력 항목의 배열입니다.대화 상태는 서버에 저장되지 않습니다. `previous_response_id`, `conversation`, `prompt`, `context_management`는 지원하지 않으므로 매 턴마다 전체 기록을 `input`에 담아 보내세요.instructions
string
선택`input` 앞에 놓이는 시스템 수준 지시입니다.max_output_tokens
integer
선택생성 토큰의 상한이며, 추론 토큰을 포함합니다.- 게이트웨이는 이 값을 위 표에 있는 모델의 최대 출력과 비교하지 않습니다. 그 값 이하로 설정하세요.
- 이 값은 요청에 필요한 잔액을 추정하는 데도 쓰입니다. 실제 출력이 작더라도 값이 너무 크면 `402 insufficient_credits`로 거부될 수 있습니다. 필요한 만큼만 설정하세요.추론 모델은 추론을 먼저 작성합니다. `max_output_tokens`가 너무 작으면 추론이 한도를 모두 써 버려 답변 텍스트가 비거나 잘릴 수 있습니다. 둘 다 담을 여유를 두고, 그런 경우 값을 높이세요.stream
boolean
선택기본값: false답변을 서버 전송 이벤트로 반환합니다. 아래 스트리밍 섹션을 참고하세요.**기본값**: `false`temperature
number
선택샘플링 온도입니다. 이 값이나 `top_p` 중 하나만 바꾸세요.top_p
number
선택누클리어스 샘플링 임계값입니다.tools
object[]
선택모델이 호출할 수 있는 함수 도구입니다. 모델은 `function_call` 출력 항목으로 답하며, 결과는 같은 `call_id`를 가진 `function_call_output` 입력 항목으로 반환하세요. 호스팅 도구(웹 검색, 파일 검색 등)는 이 목록에 포함되지 않습니다.tool_choice
string | object
선택모델이 도구를 호출할 수 있는지, 반드시 호출해야 하는지, 호출하면 안 되는지 정합니다. 사용할 값은 해당 모델로 테스트하세요.## 응답스트리밍하지 않는 호출은 JSON 객체 하나를 반환합니다. 아래는 축약한 예시입니다.```json
{
  "id": "resp_example",
  "object": "response",
  "model": "qwen3.8-max",
  "status": "completed",
  "output": [
    {
      "type": "message",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "Retry with exponential backoff and jitter, and make every handler idempotent."
        }
      ]
    }
  ],
  "usage": {
    "input_tokens": 19,
    "output_tokens": 16,
    "total_tokens": 35
  }
}
```### 응답 필드| 필드                        | 타입         | 설명                                                                                  |
| ------------------------- | ---------- | ----------------------------------------------------------------------------------- |
| `id`                      | `string`   | 응답 ID입니다. 지원과 과금 감사를 위해 요청 ID와 함께 기록하세요.                                            |
| `model`                   | `string`   | 응답한 모델입니다.                                                                          |
| `status`                  | `string`   | 완료된 답변이면 `completed`입니다.                                                            |
| `output[]`                | `object[]` | 출력 항목: `message`, `reasoning`, `function_call`. SDK의 `output_text`가 텍스트 파트를 합쳐 줍니다. |
| `output[].content[].text` | `string`   | `message` 항목의 답변 텍스트이며, `output_text` 유형 파트에 들어 있습니다.                               |
| `usage`                   | `object`   | 토큰 수입니다. 호출은 실제 토큰 사용량으로 계량됩니다.                                                     |## 스트리밍`"stream": true`를 설정하세요. 스트림은 `response.created`로 시작해 `response.output_text.delta` 이벤트로 답변을 전달하고 `response.completed`로 끝납니다.- 응답은 `text/event-stream`이며, 스트리밍하지 않으면 `application/json`입니다.
- 함수 호출은 별도의 출력 항목으로 도착하며, 인수는 `response.function_call_arguments.delta` 이벤트로 스트리밍됩니다.
- 모델 호출 전에 발생한 실패는 스트림 이벤트가 아니라 HTTP 상태와 함께 일반 JSON 오류로 반환됩니다.
- 명시적인 시간 제한을 설정하고, 스트리밍 응답은 안전하게 다시 연결하세요.```text
event: response.created
data: {"type":"response.created","response":{"id":"resp_example","status":"in_progress"}}

event: response.output_text.delta
data: {"type":"response.output_text.delta","delta":"Retry"}

event: response.output_text.delta
data: {"type":"response.output_text.delta","delta":" with backoff"}

event: response.completed
data: {"type":"response.completed","response":{"id":"resp_example","status":"completed"}}
```## 오류| 오류 또는 증상                                                                          | 원인                                                     | 해결 방법                                             |
| --------------------------------------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------- |
| 답변 텍스트가 비어 있거나 잘림                                                                 | 추론 모델이 `max_output_tokens` 예산을 추론에 모두 썼습니다.            | 모델의 최대 출력 범위 안에서 `max_output_tokens`를 높이세요.       |
| `previous_response_id`, `conversation`, `prompt` 또는 `context_management`를 언급하는 오류 | 이런 상태 저장 필드는 지원하지 않습니다.                                | 해당 필드를 제거하고 전체 기록을 `input`에 담아 보내세요.              |
| `402 insufficient_credits`                                                        | 잔액이 요청 가격보다 적습니다. 대개 `max_output_tokens`가 너무 크기 때문입니다. | 충전하거나 `max_output_tokens`를 낮추세요.                  |
| `403 forbidden`                                                                   | 계정이 무료 크레딧 상태인데 모델이 무료 목록에 없거나, 모델이 키의 그룹 밖에 있습니다.     | 충전하거나, 무료 모델을 쓰거나, 그룹에서 해당 모델에 접근할 수 있는 키를 사용하세요. |
| `404 not_found`                                                                   | 알 수 없는 모델 ID이거나 이 키에서 사용할 수 없습니다.                      | `GET /v1/models`로 사용 가능한 모델을 확인하세요.               |
| `429 rate_limit_exceeded`                                                         | 계정 또는 무료 모델 한도에 도달했습니다.                                | `Retry-After`만큼 기다린 뒤 재시도하세요.                     |### HTTP 오류 요약인증, 라우팅, 요청 속도 제한, 알 수 없는 모델 실패는 모델 호출 전에 BeatAPI 오류 형식(`error.code`, `error.message`, `retryable`, `request_id`)으로 응답합니다. 그 밖의 모든 실패는 OpenAI SDK 형식 `{"error": {"message", "type", "code"}}`를 유지하며, 코드는 `error.code`에 있고 요청 id는 `message`로 끝납니다. [오류](/errors#text-endpoints)를 참고하세요.| HTTP 상태 | 코드                                                         | 조치                                                             |
| ------- | ---------------------------------------------------------- | -------------------------------------------------------------- |
| 400     | `bad_request`, `content_policy_violation`                  | 요청이나 입력을 수정하세요. 그대로 다시 보내지 마세요.                                |
| 401     | `missing_api_key`, `invalid_api_key`                       | 키를 확인하세요. 재시도하지 마세요.                                           |
| 402     | `insufficient_credits`                                     | 충전하거나 키 한도를 높이세요. `max_tokens`가 너무 크면 발생할 수 있습니다.              |
| 403     | `forbidden`                                                | 모델이 키의 그룹이나 IP 허용 목록 밖에 있거나, 무료 크레딧으로 이 모델을 호출할 수 없습니다.        |
| 404     | `not_found`                                                | 알 수 없는 모델입니다. `GET /v1/models`로 사용 가능한 모델 목록을 확인하세요.           |
| 429     | `rate_limit_exceeded`                                      | `Retry-After` 또는 `retry_after_seconds`만큼 기다린 뒤 백오프를 두고 재시도하세요. |
| 500     | `internal_error`, `temporary_error`                        | 백오프를 적용해 한두 번 재시도하세요.                                          |
| 503     | `model_unavailable`, `upstream_timeout`, `temporary_error` | 백오프를 적용해 재시도하거나 다른 모델을 사용하세요.                                  |전체 코드 표와 재시도 정책: [오류](/errors#text-endpoints).## 참고- Qwen 모델은 [Chat Completions](/text-api/qwen/chat-completions)와 [Anthropic Messages](/text-api/qwen/messages)에서도 응답합니다.
- 캐시 입력은 새 입력과 가격이 따로 정해져 있습니다. 반복되는 프롬프트 접두부는 자동으로 캐시 요금으로 과금되며, 호출할 캐시 API는 없으니 `usage`의 캐시 입력 수를 확인하세요.
- API 키는 신뢰할 수 있는 서버에 두고, 응답의 요청 ID를 기록하며, `429`, `500`, `503`만 재시도하세요.

Reference: https://docs.beatapi.io/api-reference/text-api/qwen-responses

## Authentication

- `Authorization` header (bearer token, required) — API 키를 `Authorization: Bearer <BEATAPI_API_KEY>`로 보내세요.

## Servers

- `https://direct.beatapi.io` (Direct, default)
- `https://api.beatapi.io` (API)

## Request

### Body (application/json)

This endpoint expects an object.

- `model` (enum, required) — 정확한 모델 ID입니다. 각 ID는 별개의 모델이며 다른 모델의 별칭이 아닙니다. 키로 `GET /v1/models`를 호출해 사용 가능한 모델을 확인하세요. `qwen3.8-max`, `qwen3.8-flash`
  - Allowed values: `qwen3.8-max`, `qwen3.8-flash`
- `input` (V1ResponsesPostRequestBodyContentApplicationJsonSchemaInput, required) — 프롬프트입니다. 문자열 또는 메시지, 함수 호출과 그 출력 같은 입력 항목의 배열입니다. 대화 상태는 서버에 저장되지 않습니다. `previous_response_id`, `conversation`, `prompt`, `context_management`는 지원하지 않으므로 매 턴마다 전체 기록을 `input`에 담아 보내세요.
- `instructions` (string, optional) — `input` 앞에 놓이는 시스템 수준 지시입니다.
- `max_output_tokens` (integer, optional) — 생성 토큰의 상한이며, 추론 토큰을 포함합니다. 게이트웨이는 이 값을 위 표에 있는 모델의 최대 출력과 비교하지 않습니다. 그 값 이하로 설정하세요. 이 값은 요청에 필요한 잔액을 추정하는 데도 쓰입니다. 실제 출력이 작더라도 값이 너무 크면 `402 insufficient_credits`로 거부될 수 있습니다. 필요한 만큼만 설정하세요. 추론 모델은 추론을 먼저 작성합니다. `max_output_tokens`가 너무 작으면 추론이 한도를 모두 써 버려 답변 텍스트가 비거나 잘릴 수 있습니다. 둘 다 담을 여유를 두고, 그런 경우 값을 높이세요.
- `stream` (boolean, optional, default: false) — 답변을 서버 전송 이벤트로 반환합니다. 아래 스트리밍 섹션을 참고하세요.
- `temperature` (double, optional) — 샘플링 온도입니다. 이 값이나 `top_p` 중 하나만 바꾸세요.
- `top_p` (double, optional) — 누클리어스 샘플링 임계값입니다.
- `tools` (list of V1ResponsesPostRequestBodyContentApplicationJsonSchemaToolsItems, optional) — 모델이 호출할 수 있는 함수 도구입니다. 모델은 `function_call` 출력 항목으로 답하며, 결과는 같은 `call_id`를 가진 `function_call_output` 입력 항목으로 반환하세요. 호스팅 도구(웹 검색, 파일 검색 등)는 이 목록에 포함되지 않습니다.
- `tool_choice` (V1ResponsesPostRequestBodyContentApplicationJsonSchemaToolChoice, optional) — 모델이 도구를 호출할 수 있는지, 반드시 호출해야 하는지, 호출하면 안 되는지 정합니다. 사용할 값은 해당 모델로 테스트하세요.

## Response

### 200

스트리밍하지 않는 호출은 JSON 객체 하나를 반환합니다. 아래는 축약한 예시입니다.

- `id` (string, optional) — 응답 ID입니다. 지원과 과금 감사를 위해 요청 ID와 함께 기록하세요.
- `model` (string, optional) — 응답한 모델입니다.
- `status` (string, optional) — 완료된 답변이면 `completed`입니다.
- `output` (list of V1ResponsesPostResponsesContentApplicationJsonSchemaOutputItems, optional) — 출력 항목: `message`, `reasoning`, `function_call`. SDK의 `output_text`가 텍스트 파트를 합쳐 줍니다.
- `usage` (V1ResponsesPostResponsesContentApplicationJsonSchemaUsage, optional) — 토큰 수입니다. 호출은 실제 토큰 사용량으로 계량됩니다.

## Errors

### 400 Bad Request Error

`bad_request`, `content_policy_violation` 요청이나 입력을 수정하세요. 그대로 다시 보내지 마세요. 인증, 라우팅, 요청 속도 제한, 알 수 없는 모델 실패는 모델 호출 전에 BeatAPI 오류 형식(`error.code`, `error.message`, `retryable`, `request_id`)으로 응답합니다. 그 밖의 모든 실패는 OpenAI SDK 형식 `{"error": {"message", "type", "code"}}`를 유지하며, 코드는 `error.code`에 있고 요청 id는 `message`로 끝납니다. [오류](/errors#text-endpoints)를 참고하세요.

- `map from string to any`

### 401 Unauthorized Error

`missing_api_key`, `invalid_api_key` 키를 확인하세요. 재시도하지 마세요. 인증, 라우팅, 요청 속도 제한, 알 수 없는 모델 실패는 모델 호출 전에 BeatAPI 오류 형식(`error.code`, `error.message`, `retryable`, `request_id`)으로 응답합니다. 그 밖의 모든 실패는 OpenAI SDK 형식 `{"error": {"message", "type", "code"}}`를 유지하며, 코드는 `error.code`에 있고 요청 id는 `message`로 끝납니다. [오류](/errors#text-endpoints)를 참고하세요.

- `map from string to any`

### 402 Payment Required Error

`insufficient_credits` 충전하거나 키 한도를 높이세요. `max_tokens`가 너무 크면 발생할 수 있습니다. 인증, 라우팅, 요청 속도 제한, 알 수 없는 모델 실패는 모델 호출 전에 BeatAPI 오류 형식(`error.code`, `error.message`, `retryable`, `request_id`)으로 응답합니다. 그 밖의 모든 실패는 OpenAI SDK 형식 `{"error": {"message", "type", "code"}}`를 유지하며, 코드는 `error.code`에 있고 요청 id는 `message`로 끝납니다. [오류](/errors#text-endpoints)를 참고하세요.

- `map from string to any`

### 403 Forbidden Error

`forbidden` 모델이 키의 그룹이나 IP 허용 목록 밖에 있거나, 무료 크레딧으로 이 모델을 호출할 수 없습니다. 인증, 라우팅, 요청 속도 제한, 알 수 없는 모델 실패는 모델 호출 전에 BeatAPI 오류 형식(`error.code`, `error.message`, `retryable`, `request_id`)으로 응답합니다. 그 밖의 모든 실패는 OpenAI SDK 형식 `{"error": {"message", "type", "code"}}`를 유지하며, 코드는 `error.code`에 있고 요청 id는 `message`로 끝납니다. [오류](/errors#text-endpoints)를 참고하세요.

- `map from string to any`

### 404 Not Found Error

`not_found` 알 수 없는 모델입니다. `GET /v1/models`로 사용 가능한 모델 목록을 확인하세요. 인증, 라우팅, 요청 속도 제한, 알 수 없는 모델 실패는 모델 호출 전에 BeatAPI 오류 형식(`error.code`, `error.message`, `retryable`, `request_id`)으로 응답합니다. 그 밖의 모든 실패는 OpenAI SDK 형식 `{"error": {"message", "type", "code"}}`를 유지하며, 코드는 `error.code`에 있고 요청 id는 `message`로 끝납니다. [오류](/errors#text-endpoints)를 참고하세요.

- `map from string to any`

### 429 Too Many Requests Error

`rate_limit_exceeded` `Retry-After` 또는 `retry_after_seconds`만큼 기다린 뒤 백오프를 두고 재시도하세요. 인증, 라우팅, 요청 속도 제한, 알 수 없는 모델 실패는 모델 호출 전에 BeatAPI 오류 형식(`error.code`, `error.message`, `retryable`, `request_id`)으로 응답합니다. 그 밖의 모든 실패는 OpenAI SDK 형식 `{"error": {"message", "type", "code"}}`를 유지하며, 코드는 `error.code`에 있고 요청 id는 `message`로 끝납니다. [오류](/errors#text-endpoints)를 참고하세요.

- `map from string to any`

### 500 Internal Server Error

`internal_error`, `temporary_error` 백오프를 적용해 한두 번 재시도하세요. 인증, 라우팅, 요청 속도 제한, 알 수 없는 모델 실패는 모델 호출 전에 BeatAPI 오류 형식(`error.code`, `error.message`, `retryable`, `request_id`)으로 응답합니다. 그 밖의 모든 실패는 OpenAI SDK 형식 `{"error": {"message", "type", "code"}}`를 유지하며, 코드는 `error.code`에 있고 요청 id는 `message`로 끝납니다. [오류](/errors#text-endpoints)를 참고하세요.

- `map from string to any`

### 503 Service Unavailable Error

`model_unavailable`, `upstream_timeout`, `temporary_error` 백오프를 적용해 재시도하거나 다른 모델을 사용하세요. 인증, 라우팅, 요청 속도 제한, 알 수 없는 모델 실패는 모델 호출 전에 BeatAPI 오류 형식(`error.code`, `error.message`, `retryable`, `request_id`)으로 응답합니다. 그 밖의 모든 실패는 OpenAI SDK 형식 `{"error": {"message", "type", "code"}}`를 유지하며, 코드는 `error.code`에 있고 요청 id는 `message`로 끝납니다. [오류](/errors#text-endpoints)를 참고하세요.

- `map from string to any`

## Types

### V1ResponsesPostRequestBodyContentApplicationJsonSchemaInput

프롬프트입니다. 문자열 또는 메시지, 함수 호출과 그 출력 같은 입력 항목의 배열입니다. 대화 상태는 서버에 저장되지 않습니다. `previous_response_id`, `conversation`, `prompt`, `context_management`는 지원하지 않으므로 매 턴마다 전체 기록을 `input`에 담아 보내세요.

- string
- list of V1ResponsesPostRequestBodyContentApplicationJsonSchemaInputOneOf1Items

### V1ResponsesPostRequestBodyContentApplicationJsonSchemaToolsItems

### V1ResponsesPostRequestBodyContentApplicationJsonSchemaToolChoice

모델이 도구를 호출할 수 있는지, 반드시 호출해야 하는지, 호출하면 안 되는지 정합니다. 사용할 값은 해당 모델로 테스트하세요.

- string
- map from string to any

### V1ResponsesPostResponsesContentApplicationJsonSchemaOutputItems

- `content` (list of V1ResponsesPostResponsesContentApplicationJsonSchemaOutputItemsContentItems, optional)

### V1ResponsesPostResponsesContentApplicationJsonSchemaUsage

토큰 수입니다. 호출은 실제 토큰 사용량으로 계량됩니다.

### V1ResponsesPostRequestBodyContentApplicationJsonSchemaInputOneOf1Items

- `type` (string, optional)
- `role` (string, optional)
- `content` (V1ResponsesPostRequestBodyContentApplicationJsonSchemaInputOneOf1ItemsContent, optional)

### V1ResponsesPostResponsesContentApplicationJsonSchemaOutputItemsContentItems

- `text` (string, optional) — `message` 항목의 답변 텍스트이며, `output_text` 유형 파트에 들어 있습니다.

### V1ResponsesPostRequestBodyContentApplicationJsonSchemaInputOneOf1ItemsContent

- string
- list of V1ResponsesPostRequestBodyContentApplicationJsonSchemaInputOneOf1ItemsContentOneOf1Items

### V1ResponsesPostRequestBodyContentApplicationJsonSchemaInputOneOf1ItemsContentOneOf1Items

- `type` (string, optional)
- `text` (string, optional)
- `image_url` (V1ResponsesPostRequestBodyContentApplicationJsonSchemaInputOneOf1ItemsContentOneOf1ItemsImageUrl, optional)
- `source` (V1ResponsesPostRequestBodyContentApplicationJsonSchemaInputOneOf1ItemsContentOneOf1ItemsSource, optional)

### V1ResponsesPostRequestBodyContentApplicationJsonSchemaInputOneOf1ItemsContentOneOf1ItemsImageUrl

- string
- V1ResponsesPostRequestBodyContentApplicationJsonSchemaInputOneOf1ItemsContentOneOf1ItemsImageUrl1

### V1ResponsesPostRequestBodyContentApplicationJsonSchemaInputOneOf1ItemsContentOneOf1ItemsSource

- `type` (string, optional)
- `media_type` (string, optional)
- `data` (string, optional)
- `url` (string, optional)

### V1ResponsesPostRequestBodyContentApplicationJsonSchemaInputOneOf1ItemsContentOneOf1ItemsImageUrl1

- `url` (string, optional)
- `detail` (string, optional)

## Examples

**Request**

```json
{
  "model": "qwen3.8-max",
  "input": "Design a resilient webhook retry strategy for a payments API.",
  "max_output_tokens": 2000
}
```

**Response**

```json
{
  "id": "resp_example",
  "model": "qwen3.8-max",
  "status": "completed",
  "output": [
    {
      "content": [
        {
          "text": "Retry with exponential backoff and jitter, and make every handler idempotent.",
          "type": "output_text"
        }
      ],
      "role": "assistant",
      "type": "message"
    }
  ],
  "usage": {
    "input_tokens": 19,
    "output_tokens": 16,
    "total_tokens": 35
  },
  "object": "response"
}
```

**SDK Code**

```python 빠른 시작
import requests

url = "https://direct.beatapi.io/v1/responses"

payload = {
    "model": "qwen3.8-max",
    "input": "Design a resilient webhook retry strategy for a payments API.",
    "max_output_tokens": 2000
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript 빠른 시작
const url = 'https://direct.beatapi.io/v1/responses';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"model":"qwen3.8-max","input":"Design a resilient webhook retry strategy for a payments API.","max_output_tokens":2000}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 빠른 시작
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://direct.beatapi.io/v1/responses"

	payload := strings.NewReader("{\n  \"model\": \"qwen3.8-max\",\n  \"input\": \"Design a resilient webhook retry strategy for a payments API.\",\n  \"max_output_tokens\": 2000\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby 빠른 시작
require 'uri'
require 'net/http'

url = URI("https://direct.beatapi.io/v1/responses")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"model\": \"qwen3.8-max\",\n  \"input\": \"Design a resilient webhook retry strategy for a payments API.\",\n  \"max_output_tokens\": 2000\n}"

response = http.request(request)
puts response.read_body
```

```java 빠른 시작
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://direct.beatapi.io/v1/responses")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"model\": \"qwen3.8-max\",\n  \"input\": \"Design a resilient webhook retry strategy for a payments API.\",\n  \"max_output_tokens\": 2000\n}")
  .asString();
```

```php 빠른 시작
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://direct.beatapi.io/v1/responses', [
  'body' => '{
  "model": "qwen3.8-max",
  "input": "Design a resilient webhook retry strategy for a payments API.",
  "max_output_tokens": 2000
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp 빠른 시작
using RestSharp;

var client = new RestClient("https://direct.beatapi.io/v1/responses");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"model\": \"qwen3.8-max\",\n  \"input\": \"Design a resilient webhook retry strategy for a payments API.\",\n  \"max_output_tokens\": 2000\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift 빠른 시작
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "model": "qwen3.8-max",
  "input": "Design a resilient webhook retry strategy for a payments API.",
  "max_output_tokens": 2000
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://direct.beatapi.io/v1/responses")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```