데이터 구조 참조
다음 요청 / 응답 데이터 구조는 newapi의 OpenAPIOpenAPIREST API를 기술하는 개방형 명세(구 Swagger)입니다. Lurus의 데이터 구조는 게이트웨이 OpenAPI 명세에서 자동 동기화되어 생성됩니다.더 알아보기 → 규격(relay.json)에서 자동 동기화되어 생성되며, 항상 게이트웨이 구현과 일치합니다. 전체 엔드포인트 목록은 API 개요를 참조하고, 호출 예시는 Chat Completions를 참조하세요.
업데이트 방법
이 페이지의 <!-- sync:schemas --> 마커 영역은 bun run sync가 2b-svc-newapi/docs/openapi/relay.json에서 다시 생성합니다. 해당 영역을 수동으로 편집하지 마세요.
총 35개의 데이터 구조(OpenAPI 규격에서 자동 생성).
AudioTranscriptionResponse
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
text | string | — |
ChatCompletionRequest
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
model | string | 예 | 모델 ID |
messages | array<Message> | 예 | 대화 메시지 목록 |
temperature | number | — | 샘플링 온도 |
top_p | number | — | 핵 샘플링 파라미터 |
n | integer | — | 생성 개수 |
stream | boolean | — | 스트리밍 응답 여부 |
stream_options | object | — | |
stop | string | array<string> | — | 중지 시퀀스 |
max_tokens | integer | — | 최대 생성 Token 수 |
max_completion_tokens | integer | — | 최대 보완 Token 수 |
presence_penalty | number | — | |
frequency_penalty | number | — | |
logit_bias | object | — | |
user | string | — | |
tools | array<Tool> | — | |
tool_choice | string (none / auto / required) | object | — | |
response_format | ResponseFormat | — | |
seed | integer | — | |
reasoning_effort | string (low / medium / high) | — | 추론 강도 (추론을 지원하는 모델에 사용) |
modalities | array<string (text / audio)> | — | |
audio | object | — |
ChatCompletionResponse
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
id | string | — | |
object | string | — | |
created | integer | — | |
model | string | — | |
choices | array<object> | — | |
usage | Usage | — | |
system_fingerprint | string | — |
ClaudeMessage
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
role | string (user / assistant) | 예 | |
content | string | array<object> | 예 |
ClaudeRequest
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
model | string | 예 | |
messages | array<ClaudeMessage> | 예 | |
system | string | array<object> | — | |
cache_control | object | — | |
inference_geo | string | — | |
max_tokens | integer | 예 | |
temperature | number | — | |
top_p | number | — | |
top_k | integer | — | |
stream | boolean | — | |
stop_sequences | array<string> | — | |
tools | array<object> | — | |
tool_choice | object | — | |
thinking | object | — | |
context_management | object | — | |
output_config | object | — | |
output_format | object | — | |
container | string | object | — | |
mcp_servers | array<object> | — | |
metadata | object | — | |
speed | string (standard / fast) | — | |
service_tier | string (auto / standard_only) | — |
ClaudeResponse
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
id | string | — | |
type | string | — | |
role | string | — | |
content | array<object> | — | |
model | string | — | |
stop_reason | string (end_turn / max_tokens / stop_sequence / tool_use) | — | |
usage | object | — |
CompletionRequest
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
model | string | 예 | |
prompt | string | array<string> | 예 | |
max_tokens | integer | — | |
temperature | number | — | |
top_p | number | — | |
n | integer | — | |
stream | boolean | — | |
stop | string | array<string> | — | |
suffix | string | — | |
echo | boolean | — |
CompletionResponse
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
id | string | — | |
object | string | — | |
created | integer | — | |
model | string | — | |
choices | array<object> | — | |
usage | Usage | — |
EmbeddingRequest
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
model | string | 예 | |
input | string | array<string> | 예 | 임베딩할 텍스트 |
encoding_format | string (float / base64) | — | |
dimensions | integer | — | 출력 벡터 차원 |
EmbeddingResponse
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
object | string | — | |
data | array<object> | — | |
model | string | — | |
usage | object | — |
GeminiModelsResponse
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
models | array<object> | — |
GeminiResponse
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
candidates | array<object> | — | |
usageMetadata | object | — |
ImageResponse
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
created | integer | — | |
data | array<object> | — |
Message
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
role | string (system / user / assistant / tool / developer) | 예 | 메시지 역할 |
content | string | array<MessageContent> | 예 | 메시지 내용 |
name | string | — | 발신자 이름 |
tool_calls | array<ToolCall> | — | |
tool_call_id | string | — | 도구 호출 ID(tool 역할 메시지에 사용) |
reasoning_content | string | — | 추론 내용 |
MessageContent
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
type | string (text / image_url / input_audio / file / video_url) | — | |
text | string | — | |
image_url | object | — | |
input_audio | object | — | |
file | object | — | |
video_url | object | — |
Model
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
id | string | — | 모델 ID |
object | string | — | 객체 타입 |
created | integer | — | 생성 타임스탬프 |
owned_by | string | — | 모델 소유자 |
ModelsResponse
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
object | string | — | |
data | array<Model> | — |
ModerationRequest
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
input | string | array<string> | 예 | |
model | string | — |
ModerationResponse
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
id | string | — | |
model | string | — | |
results | array<object> | — |
RerankRequest
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
model | string | 예 | |
query | string | 예 | 쿼리 텍스트 |
documents | array<string | object> | 예 | 재정렬할 문서 목록 |
top_n | integer | — | 상위 N개 결과 반환 |
return_documents | boolean | — |
RerankResponse
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
id | string | — | |
results | array<object> | — | |
meta | object | — |
ResponseFormat
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
type | string (text / json_object / json_schema) | — | |
json_schema | object | — | JSON Schema 정의 |
ResponsesCompactionRequest
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
model | string | 예 | |
input | string | array<object> | — | 입력 내용, 문자열 또는 메시지 배열 가능 |
instructions | string | — | |
previous_response_id | string | — |
ResponsesCompactionResponse
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
id | string | — | |
object | string | — | |
created_at | integer | — | |
output | array<object> | — | |
usage | Usage | — | |
error | object | — |
ResponsesRequest
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
model | string | 예 | |
input | string | array<object> | — | 입력 내용, 문자열 또는 메시지 배열 가능 |
instructions | string | — | |
max_output_tokens | integer | — | |
temperature | number | — | |
top_p | number | — | |
stream | boolean | — | |
tools | array<object> | — | |
tool_choice | string | object | — | |
reasoning | object | — | |
previous_response_id | string | — | |
truncation | string (auto / disabled) | — |
ResponsesResponse
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
id | string | — | |
object | string | — | |
created_at | integer | — | |
status | string (completed / failed / in_progress / incomplete) | — | |
model | string | — | |
output | array<object> | — | |
usage | Usage | — |
SpeechRequest
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
model | string | 예 | |
input | string | 예 | 변환할 텍스트 |
voice | string (alloy / echo / fable / onyx / nova / shimmer) | 예 | |
response_format | string (mp3 / opus / aac / flac / wav / pcm) | — | |
speed | number | — |
Tool
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
type | string | — | |
function | object | — |
ToolCall
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
id | string | — | |
type | string | — | |
function | object | — |
Usage
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
prompt_tokens | integer | — | 프롬프트 Token 수 |
completion_tokens | integer | — | 보완 Token 수 |
total_tokens | integer | — | 총 Token 수 |
prompt_tokens_details | object | — | |
completion_tokens_details | object | — |
VideoRequest
비디오 생성 요청
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
model | string | — | 모델/스타일 ID |
prompt | string | — | 텍스트 설명 프롬프트 |
image | string | — | 이미지 입력 (URL 또는 Base64) |
duration | number | — | 비디오 길이(초) |
width | integer | — | 비디오 너비 |
height | integer | — | 비디오 높이 |
fps | integer | — | 비디오 프레임률 |
seed | integer | — | 랜덤 시드 |
n | integer | — | 생성 비디오 개수 |
response_format | string | — | 응답 형식 |
user | string | — | 사용자 식별자 |
metadata | object | — | 확장 파라미터 (예: negative_prompt, style, quality_level 등) |
VideoResponse
비디오 생성 작업 제출 응답
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
task_id | string | — | 작업 ID |
status | string | — | 작업 상태 |
VideoTaskError
비디오 작업 오류 정보
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
code | integer | — | 오류 코드 |
message | string | — | 오류 정보 |
VideoTaskMetadata
비디오 작업 메타데이터
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
duration | number | — | 실제 생성된 비디오 길이 |
fps | integer | — | 실제 프레임률 |
width | integer | — | 실제 너비 |
height | integer | — | 실제 높이 |
seed | integer | — | 사용된 랜덤 시드 |
VideoTaskResponse
비디오 작업 상태 조회 응답
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
task_id | string | — | 작업 ID |
status | string (queued / in_progress / completed / failed) | — | 작업 상태 |
url | string | — | 비디오 리소스 URL(성공 시) |
format | string | — | 비디오 형식 |
metadata | VideoTaskMetadata | — | |
error | VideoTaskError | — |