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

# Translations (ZeroClick)

> Translate speech into English text with whisper-tiny, authenticated by a ZeroClick HMAC signature instead of an API key.

This is the audio translations endpoint (see [Transcriptions](https://docs.herogpu.com/api-reference/audio-transcriptions.md)) behind **ZeroClick**, herogpu's agent-payment layer. Same response bodies, limits, and model as `/v1/audio/translations`; the request is JSON, and authentication, authorization, and metering differ. The request is always served by the configured model (`whisper-tiny`). Send the same fields as a transcription without `language`; the transcript is always English.

* **Body** — ZeroClick's pay host forwards JSON only, so send `application/json` with the audio as base64 in `file` (or a `data:` URL, within ZeroClick's \~7.5 MB body cap) or as an https URL in `file_url` (up to 25 MB), plus the usual fields. A JSON body that cannot be converted (bad base64, unreachable URL, neither or both of `file` / `file_url`) gets a `400` or `413` before any inference and is not billed.
* **Authentication** — no `x-api-key`. A buying agent calls ZeroClick's hosted pay URL; ZeroClick proxies the request and signs the raw request bytes with an HMAC in the `zc-signature` header. A request is authenticated **only** by a valid signature.
* **Authorization** — a ZeroClick allowance check runs before any billable work. It fails *open* on a transient ZeroClick outage (the signature has already verified), but never for a missing or invalid signature.
* **Metering** — billed per audio second. The allowance check asks for a 1-second floor, since the duration is not known until the clip is decoded or generated. On success, `zc-usage` reports `max(1, ceil(x-audio-duration-seconds))` audio seconds. Stripe metering is bypassed; ZeroClick is the sole biller.

```json theme={null}
{
  "file_url": "https://example.com/audio/hello.mp3",
  "model": "whisper-tiny",
  "response_format": "json"
}
```

Handle errors the same way as [API error codes](https://docs.herogpu.com/docs/production-patterns.md#handle-status-codes-explicitly).


## OpenAPI

````yaml api-reference/openapi/zeroclick.openapi.json POST /zeroclick/v1/audio/translations
openapi: 3.1.0
info:
  title: Herogpu Orchestration API — ZeroClick endpoints
  version: 1.0.0
  description: >
    OpenAPI specification for the ZeroClick-authenticated orchestration
    endpoints

    (`/zeroclick/v1/*`).


    ZeroClick sits in front of the herogpu Orchestration API as the

    agent-payment layer. A buying agent calls ZeroClick's hosted pay URL;

    ZeroClick then proxies the request to these endpoints, signing the raw

    request bytes with an HMAC in the `zc-signature` header. From this API's

    perspective, a request is authenticated **only** by a valid `zc-signature`

    — there is no `x-api-key` on these routes.


    These endpoints mirror the standard `/v1/chat/completions`,

    `/v1/responses`, `/v1/embeddings`, `/v1/moderations` and `/v1/audio/*`

    orchestration endpoints (same request/response bodies,

    same model routing), differing only in:
      * **Authentication** — the `zc-signature` HMAC is verified over the raw
        request bytes instead of an API key.
      * **Authorization** — a ZeroClick allowance check runs before any
        billable work. It fails *open* on a transient ZeroClick outage (the
        signature has already verified), but never for a missing/invalid
        signature.
      * **Metering** — actual usage is reported back to ZeroClick via the
        `zc-usage` response header on success: input/output tokens for the
        text endpoints, audio seconds for the audio endpoints. Stripe metering is intentionally
        bypassed; ZeroClick is the sole biller.
      * **Retired model ids** — a retired id is served **and** metered as its
        successor: `deepseek-v4-flash` → `deepseek-v4.1-flash`, `glm-5.2` → `glm-5.3-flash`, `gliner2-base-v1` → `gliner2.5-base-v1`. The response's `model` is the
        successor. `gliner-multi-pii-v1` is not retired: it has its own service.
      * **Audio bodies** — transcriptions and translations also accept
        `application/json`, with the audio as base64 (`file`) or an https URL
        (`file_url`), because ZeroClick's pay host forwards JSON bodies only.
servers:
  - url: https://api.herogpu.com
    description: Production
security: []
tags:
  - name: ZeroClick
    description: ZeroClick agent-payment authenticated orchestration endpoints.
paths:
  /zeroclick/v1/audio/translations:
    post:
      tags:
        - ZeroClick
      summary: Create translation (ZeroClick-authenticated)
      description: >
        OpenAI-style speech-to-text that always returns English. The model is
        the configured `whisper-tiny` rather than one read from the request.
        Billed per audio second: the allowance

        check asks for the 1-second floor, and `zc-usage` reports

        `max(1, ceil(x-audio-duration-seconds))` audio seconds on success.


        Authenticated by verifying the `zc-signature` HMAC over the raw

        request bytes; the same orchestration as `/v1/audio/translations` runs
        behind it.


        **Body**: `application/json`, with the audio as base64 (`file`) or an
        https URL (`file_url`). A body that cannot be read (bad base64,
        unreachable URL, neither or both sources) is answered with `400` or
        `413` before any inference and is not billed.
      operationId: zeroclickCreateTranslation
      parameters:
        - $ref: '#/components/parameters/ZcRequestId'
        - $ref: '#/components/parameters/ZcAgentId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTranslationJsonRequest'
            examples:
              file_url:
                summary: Audio by URL (up to 25 MB)
                value:
                  file_url: https://example.com/audio/hello.mp3
                  model: whisper-tiny
                  response_format: json
              file:
                summary: Inline base64 audio
                value:
                  file: >-
                    data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAABAAEAQB8AAIA+AAACABAAZGF0YQAAAAA=
                  filename: hello.wav
                  model: whisper-tiny
      responses:
        '200':
          description: >-
            The English transcript, in the requested `response_format`. Includes
            the `zc-usage` header settling actual usage with ZeroClick.
          headers:
            zc-usage:
              $ref: '#/components/headers/ZcUsage'
            x-request-id:
              $ref: '#/components/headers/XRequestId'
            x-audio-duration-seconds:
              $ref: '#/components/headers/XAudioDurationSeconds'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TranscriptionResponse'
              examples:
                json:
                  summary: json (default)
                  value:
                    text: Hello, how are you today?
            text/plain:
              schema:
                type: string
              example: |
                Hello, how are you today?
        '400':
          $ref: '#/components/responses/AudioBadRequest'
        '401':
          $ref: '#/components/responses/ZeroClickUnauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '404':
          description: Unknown model (`model_not_found`)
        '413':
          description: >-
            Audio over 25 MB, inline or downloaded from `file_url`
            (`file_too_large`), or audio too long (`audio_too_long`)
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ModelUnavailable'
      security:
        - ZeroClickSignature: []
components:
  parameters:
    ZcRequestId:
      name: zc-request-id
      in: header
      required: false
      description: >-
        ZeroClick request id, echoed in logs for correlation. Set by ZeroClick
        when it proxies the request.
      schema:
        type: string
        example: zcreq_1
    ZcAgentId:
      name: zc-agent-id
      in: header
      required: false
      description: >-
        Identifier of the buying agent. Used to partition logs/analytics by
        agent; becomes the synthesized caller identity.
      schema:
        type: string
        example: agt_1
  schemas:
    CreateTranslationJsonRequest:
      type: object
      description: >-
        A translation request. Exactly one of `file` (base64) or `file_url`
        (https). No `language`: the transcript is always English, and sending
        `language` returns `400`.
      properties:
        file:
          type: string
          contentEncoding: base64
          description: >-
            The audio, base64-encoded, or as a `data:` URL
            (`data:audio/mpeg;base64,…`). URL-safe base64 is accepted. Limited
            by ZeroClick's request body cap (about 7.5 MB of JSON, so about 5.6
            MB of audio); use `file_url` for anything larger.
          example: UklGRiQAAABXQVZFZm10IBAAAAABAAEAQB8AAIA+AAACABAAZGF0YQAAAAA=
        file_url:
          type: string
          format: uri
          description: >-
            An https URL to the audio. Downloaded by herogpu before
            transcription: https only (also at every redirect, at most 3),
            30-second timeout, up to 25 MB.
          example: https://example.com/audio/hello.mp3
        filename:
          type: string
          description: >-
            Name to give the uploaded file. Defaults to the last segment of
            `file_url`, or `audio.<ext>` from the audio's type.
          example: hello.mp3
        model:
          type: string
          enum:
            - whisper-tiny
          default: whisper-tiny
          example: whisper-tiny
          description: Model identifier. The endpoint serves `whisper-tiny`.
        prompt:
          type: string
          maxLength: 4096
          description: Text to guide spelling and style, such as names or jargon.
        response_format:
          type: string
          enum:
            - json
            - text
            - srt
            - verbose_json
            - vtt
          default: json
          description: >-
            `json` and `verbose_json` return `application/json`; `text`, `srt`,
            and `vtt` return `text/plain`.
        temperature:
          type: number
          minimum: 0
          maximum: 1
          default: 0
          description: Sampling temperature.
        timestamp_granularities:
          type: array
          items:
            type: string
            enum:
              - segment
              - word
          description: >-
            `segment` (default), `word`, or both. Requires `verbose_json`.
            `timestamp_granularities[]` is accepted as the key too.
      oneOf:
        - required:
            - file
          not:
            required:
              - file_url
        - required:
            - file_url
          not:
            required:
              - file
    TranscriptionResponse:
      type: object
      description: >-
        `json` returns `{ text }`. `verbose_json` adds `task`, `language`,
        `duration`, and `segments` and/or `words`.
      required:
        - text
      properties:
        text:
          type: string
          description: The transcript.
      additionalProperties: true
    ErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
          properties:
            message:
              type: string
            type:
              type: string
            param:
              type: string
            code:
              type: string
    ZeroClickSignatureError:
      type: object
      required:
        - error
      description: >-
        Returned when the `zc-signature` is missing/invalid or ZeroClick is
        unconfigured.
      properties:
        error:
          type: string
          const: invalid_zeroclick_signature
    PaymentRequiredError:
      type: object
      description: >-
        ZeroClick `payment_required` denial body, produced by the
        `@zeroclickai/sellers` SDK.
      additionalProperties: true
  headers:
    ZcUsage:
      description: >
        Usage report settled with ZeroClick, present on `200` responses. Encodes

        the actual usage metered against the request's ZeroClick service slug

        (the kebab-cased model id served, e.g. `lfm2-5-1-2b-instruct`; for a
        retired

        id, its successor's): `input_tokens`

        and `output_tokens` for chat completions, responses and moderations,

        `input_tokens` only for embeddings, and `audio_seconds` for the audio

        endpoints.
      schema:
        type: string
    XRequestId:
      description: Correlation id for this request, present on every response.
      schema:
        type: string
    XAudioDurationSeconds:
      description: >-
        Audio length in seconds: the uploaded audio for a transcription or
        translation, the generated audio for speech. ZeroClick is billed `max(1,
        ceil(x-audio-duration-seconds))` audio seconds.
      schema:
        type: number
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  responses:
    AudioBadRequest:
      description: >-
        Bad request. On transcriptions and translations: a body that cannot be
        read (`invalid_json`, `invalid_audio_source`, `invalid_base64`,
        `invalid_file_url`, `invalid_field`, `file_url_fetch_failed`,
        `file_url_timeout`). On every audio route: an invalid or missing field
        reported by the upstream model.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            invalid_audio_source:
              summary: JSON body with neither or both of file / file_url
              value:
                error:
                  message: >-
                    Provide exactly one of `file` (base64-encoded audio or a
                    data: URL) or `file_url` (an https URL to the audio).
                  type: invalid_request_error
                  param: file
                  code: invalid_audio_source
    ZeroClickUnauthorized:
      description: >
        The `zc-signature` was missing or invalid, or ZeroClick is not
        configured

        for this environment. Unsigned/unverifiable traffic is treated as

        unauthenticated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ZeroClickSignatureError'
          example:
            error: invalid_zeroclick_signature
    PaymentRequired:
      description: |
        The ZeroClick allowance check denied the request (e.g. insufficient
        allowance or a stale signature timestamp). Body follows ZeroClick's
        `payment_required` schema as returned by the SDK.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PaymentRequiredError'
    RateLimited:
      description: >-
        Rate limit reached. Limits are counted per ZeroClick agent, so one busy
        agent does not throttle the others. Wait at least `retry-after` seconds,
        then retry.
      headers:
        retry-after:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              message: >-
                Rate limit reached for LFM2.5-1.2B-Instruct in organization
                org_123 on requests per min (RPM): Limit 60, Used 60, Requested
                1. Please try again in 1s.
              type: rate_limit_error
              param: null
              code: requests_per_minute_exceeded
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              message: Internal error
              type: internal_error
    ModelUnavailable:
      description: >-
        Model warming up (`model_unavailable`) or every slot busy
        (`server_busy`), forwarded from the upstream with its `retry-after`.
        Retry with backoff.
  securitySchemes:
    ZeroClickSignature:
      type: apiKey
      in: header
      name: zc-signature
      description: |
        HMAC signature minted by ZeroClick over the raw request bytes, of the
        form `t=<unix-seconds>,kid=<key-id>,v1=<hex-hmac>`. Verified by the
        `@zeroclickai/sellers` SDK against the seller's signing secret keyed by
        `kid`. A missing or invalid signature is rejected with `401`
        `invalid_zeroclick_signature`; this is never failed open.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.