{
 "openapi": "3.0.3",
 "info": {
  "title": "Dialogue and podcasts (commercial): Dia-1.6B",
  "version": "2026-11-21",
  "description": "Curated ZeroGPU tool from the ZeroGPU lineup catalog. Calls go straight to the upstream Space nari-labs/Dia-1.6B; send your own HF token as a bearer token so the call uses your ZeroGPU quota."
 },
 "servers": [
  {
   "url": "https://nari-labs-dia-1-6b.hf.space"
  }
 ],
 "x-zerogpu": {
  "category": "Speech and voice",
  "slot": "Dialogue and podcasts",
  "need": "Two or more speakers from a script, with laughs and pauses.",
  "role": "commercial",
  "space": "nari-labs/Dia-1.6B",
  "space_url": "https://huggingface.co/spaces/nari-labs/Dia-1.6B",
  "model": "Dia-1.6B",
  "license": "Apache-2.0",
  "license_class": "open",
  "gpu_seconds_booked": "100",
  "notes": "The Apache commercial lane: one call with a plain-text script and non-verbal tags.",
  "caveats": "English only, about 30 s of audio per call. Voices are random unless you give a prompt.",
  "lineup_call": "/generate_audio(text_input=\"[S1] \u2026 [S2] \u2026 (laughs)\", audio_prompt_input=<optional \u226410 s>, max_new_tokens=3072, cfg_scale=3.0, temperature=1.8) \u2192 audio",
  "api_style": "v1"
 },
 "components": {
  "securitySchemes": {
   "hfToken": {
    "type": "http",
    "scheme": "bearer",
    "description": "Your own Hugging Face token (read scope is enough). It is sent only to the upstream Space and bills that call to your account's ZeroGPU quota. Without it the call runs on the small anonymous quota."
   }
  },
  "schemas": {}
 },
 "paths": {
  "/gradio_api/call/generate_audio": {
   "post": {
    "description": "Two or more speakers from a script, with laughs and pauses. Step 1 of 2: returns {\"event_id\"}; then GET /gradio_api/call/generate_audio/{event_id} reads an SSE stream whose `event: complete` data is the JSON output array (`event: error` on failure). Upstream: https://huggingface.co/spaces/nari-labs/Dia-1.6B. License: Apache-2.0. Caveats: English only, about 30 s of audio per call. Voices are random unless you give a prompt. \n\nUpstream description: \nReturns, in order: Generated Audio: filepath",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "data"
        ],
        "properties": {
         "data": {
          "type": "array",
          "minItems": 2,
          "maxItems": 9,
          "items": {},
          "description": "Positional inputs, in this order:\n0. text_input: str (required: the default is demo text, so send your own or \"\")\n1. audio_prompt_input: filepath (required)\n2. transcription_input: str (required)\n3. max_new_tokens: float (default 3072)\n4. cfg_scale: float (default 3.0)\n5. temperature: float (default 1.8)\n6. top_p: float (default 0.95)\n7. cfg_filter_top_k: float (default 45)\n8. speed_factor: float (default 1.0)"
         }
        }
       }
      }
     }
    },
    "x-gradio-parameters": [
     {
      "name": "text_input",
      "schema": {
       "type": "string"
      },
      "required": false,
      "default": "[S1] Dia is an open weights text to dialogue model. \n[S2] You get full control over scripts and voices. \n[S1] Wow. Amazing. (laughs) \n[S2] Try it now on Git hub or Hugging Face."
     },
     {
      "name": "audio_prompt_input",
      "schema": {
       "type": "object",
       "required": [
        "path",
        "meta"
       ],
       "description": "A file. Set path to a public https URL (or a path returned by POST /gradio_api/upload on the same Space) and meta to {\"_type\": \"gradio.FileData\"}.",
       "properties": {
        "path": {
         "type": "string"
        },
        "url": {
         "type": "string"
        },
        "orig_name": {
         "type": "string"
        },
        "meta": {
         "type": "object",
         "properties": {
          "_type": {
           "type": "string",
           "enum": [
            "gradio.FileData"
           ]
          }
         }
        }
       }
      },
      "required": true,
      "default": null
     },
     {
      "name": "transcription_input",
      "schema": {
       "type": "string"
      },
      "required": true,
      "default": null
     },
     {
      "name": "max_new_tokens",
      "schema": {
       "type": "number",
       "description": "numeric value between 860 and 3072"
      },
      "required": false,
      "default": 3072
     },
     {
      "name": "cfg_scale",
      "schema": {
       "type": "number",
       "description": "numeric value between 1.0 and 5.0"
      },
      "required": false,
      "default": 3.0
     },
     {
      "name": "temperature",
      "schema": {
       "type": "number",
       "description": "numeric value between 1.0 and 2.5"
      },
      "required": false,
      "default": 1.8
     },
     {
      "name": "top_p",
      "schema": {
       "type": "number",
       "description": "numeric value between 0.7 and 1.0"
      },
      "required": false,
      "default": 0.95
     },
     {
      "name": "cfg_filter_top_k",
      "schema": {
       "type": "number",
       "description": "numeric value between 15 and 100"
      },
      "required": false,
      "default": 45
     },
     {
      "name": "speed_factor",
      "schema": {
       "type": "number",
       "description": "numeric value between 0.8 and 1.0"
      },
      "required": false,
      "default": 1.0
     }
    ],
    "operationId": "speech_dialogue_and_podcasts_commercial",
    "tags": [
     "Speech and voice"
    ],
    "security": [
     {
      "hfToken": []
     },
     {}
    ],
    "summary": "Dialogue and podcasts (commercial): Dia-1.6B",
    "responses": {
     "200": {
      "description": "Job accepted.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "required": [
          "event_id"
         ],
         "properties": {
          "event_id": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/gradio_api/call/generate_audio/{event_id}": {
   "get": {
    "summary": "Read the result stream for /generate_audio",
    "description": "Server-sent events. The final `event: complete` carries a JSON array of outputs; `event: error` means the call failed.",
    "parameters": [
     {
      "name": "event_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "SSE stream",
      "content": {
       "text/event-stream": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    },
    "operationId": "speech_dialogue_and_podcasts_commercial_result",
    "tags": [
     "Speech and voice"
    ],
    "security": [
     {
      "hfToken": []
     },
     {}
    ]
   }
  }
 }
}