# 음성 인식

**API:** Model API

**Endpoint:** `POST /api/v1/audio/transcriptions`

**Tags:** Audio

`model`과 `file`을 `multipart/form-data`로 전송하세요. 완전한 모노 PCM WAV만 지원하며 최대 25,000,000바이트입니다. 채널별 샘플링 속도와 길이 제한도 적용됩니다. 선택 필드는 `language`(소문자 두 글자, 예: `ko`), `response_format=json`(유일한 형식이자 기본값)입니다. boundary는 curl이 생성하게 하세요. URL, 파일 ID, `prompt`, 타임스탬프, `stream`은 지원하지 않습니다.

STT는 `input_audio_second` 또는 token, TTS는 `input_character`로 과금합니다. `speech_billing_unit`의 `utf16_code_unit`과 `unicode_code_point`는 emoji 계산이 다릅니다. 사전 예약액은 비용 상한이 아니며 정산은 비동기일 수 있습니다. 증거 부족은 무료가 아닙니다. 두 API는 `X-Felo-Channel`을 지원하며 선택 채널에 한 번만 전송합니다. 타임아웃·연결 끊김 후 SDK를 포함한 자동 재시도를 끄고 `X-Request-Id`와 제공된 `X-Generation-Id`를 보관하세요. Console Playground는 오디오 호출을 아직 지원하지 않습니다. `configured_rates`는 고정 요율과 확인된 사용량, `upstream_cost`는 검증된 공급자 비용과 게시된 가산율·할인으로 정산합니다.

## Base URL

- `https://openapi.felo.ai` — 프로덕션

## Authentication

- `FeloBearerAuth` (http bearer) — Felo API 키를 `Authorization: Bearer <key>` 형식으로 전송합니다.
- `FeloApiKey` (apiKey in header `X-API-Key`) — Felo API 키를 `X-API-Key: <key>` 형식으로 전송합니다.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `X-Felo-Channel` | header | no | string, default: "default" | Ordered comma-separated public channel codes. Omit this header to use default; default must be used alone. In wallet mode, default scans the model's effective public channel order in reverse, skips unpublished or unavailable channels, and uses the first eligible channel. Explicit codes follow the supplied order. For stateless Chat Completions, Messages and Responses, the server may try another selected channel or provider group after a confirmed upstream rejection. A single explicit channel limits routing to that channel. Legacy provider headers cannot override channel routing. |

## Request body

Required: **yes**

### multipart/form-data

Schema:

```json
{
  "type": "object",
  "required": [
    "model",
    "file"
  ],
  "additionalProperties": false,
  "properties": {
    "model": {
      "type": "string",
      "example": "grok-stt-2.0"
    },
    "file": {
      "type": "string",
      "format": "binary",
      "description": "A mono PCM WAV file, up to 25,000,000 bytes. The selected endpoint may impose additional sample rate or duration limits."
    },
    "language": {
      "type": "string",
      "pattern": "^[a-z]{2}$"
    },
    "response_format": {
      "type": "string",
      "enum": [
        "json"
      ],
      "default": "json"
    }
  }
}
```

## Responses

### 200 — 동기 JSON 응답에는 `text`가 있으며 선택적 `usage`에는 초 또는 token 사용량이 있습니다. `usage.cost`는 공급자 비용이며 최종 Felo 청구액이 아닙니다. 작업 폴링은 필요 없습니다.

**application/json**

Schema: object

```json
{
  "type": "object",
  "required": [
    "text"
  ],
  "properties": {
    "text": {
      "type": "string"
    },
    "usage": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "seconds": {
          "type": "number",
          "minimum": 0,
          "description": "Duration reported by the selected channel."
        },
        "type": {
          "type": "string",
          "enum": [
            "duration",
            "tokens"
          ]
        },
        "input_tokens": {
          "type": "integer",
          "minimum": 0
        },
        "output_tokens": {
          "type": "integer",
          "minimum": 0
        },
        "total_tokens": {
          "type": "integer",
          "minimum": 0
        },
        "input_token_details": {
          "type": "object",
          "properties": {
            "text_tokens": {
              "type": "integer",
              "minimum": 0
            },
            "audio_tokens": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "cost": {
          "type": "number",
          "minimum": 0,
          "description": "Reported upstream cost in USD."
        }
      }
    }
  }
}
```

### 400 — Upload, wallet or upstream error

**application/json**

Schema: object

```json
{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}
```

### 402 — Upload, wallet or upstream error

**application/json**

Schema: object

```json
{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}
```

### 413 — Upload, wallet or upstream error

**application/json**

Schema: object

```json
{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}
```

### 415 — Upload, wallet or upstream error

**application/json**

Schema: object

```json
{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}
```

### 429 — Upload, wallet or upstream error

**application/json**

Schema: object

```json
{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}
```

### 500 — Upload, wallet or upstream error

**application/json**

Schema: object

```json
{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}
```

### 502 — Upload, wallet or upstream error

**application/json**

Schema: object

```json
{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}
```

### 503 — Upload, wallet or upstream error

**application/json**

Schema: object

```json
{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}
```

### 504 — Upload, wallet or upstream error

**application/json**

Schema: object

```json
{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}
```
