# תמלול דיבור

**API:** Model API

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

**Tags:** Audio

שלחו `model` ו־`file` בתור `multipart/form-data`: קובץ PCM WAV מונו שלם, עד 25,000,000 בתים, בהתאם למגבלות קצב הדגימה והמשך של הערוץ. שדות רשות: `language` (שתי אותיות קטנות, למשל `he`) ו־`response_format=json` (הפורמט היחיד וברירת המחדל). תנו ל־curl ליצור boundary. אין תמיכה ב־URL, מזהי קבצים, `prompt`, חותמות זמן או `stream`.

STT משתמש ב־`input_audio_second` או בטוקנים; TTS ב־`input_character`. ב־`speech_billing_unit`, ‏`utf16_code_unit` ו־`unicode_code_point` סופרים emoji אחרת. שמירת הסכום אינה תקרת הוצאה; החיוב עשוי להסתיים אסינכרונית. חוסר ראיות אינו חינם. שני הממשקים מקבלים `X-Felo-Channel` ושולחים פעם אחת לערוץ שנבחר. כבו ניסיונות חוזרים אוטומטיים, גם ב־SDK, לאחר timeout או ניתוק. שמרו `X-Request-Id` ו־`X-Generation-Id` אם קיים. Console Playground עדיין אינו תומך באודיו. `configured_rates` משתמש בתעריפים קבועים ושימוש מאומת; `upstream_cost` משתמש בעלות ספק מאומתת עם התוספת וההנחה שפורסמו.

## Base URL

- `https://openapi.felo.ai` — פרודקשן

## Authentication

- `FeloBearerAuth` (http bearer) — מפתח API של Felo נשלח בכותרת `Authorization: Bearer <key>`.
- `FeloApiKey` (apiKey in header `X-API-Key`) — מפתח API של Felo נשלח בכותרת `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` אופציונלי בשניות או בטוקנים. `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"
          ]
        }
      }
    }
  }
}
```
