Skip to content
Hayonix

API reference · Schema

CreateBatchRequest

  • input_file_idstringrequired

    A file uploaded with purpose `batch`

    ID with prefix file_

  • endpointstringrequired

    The route every request goes to: /v1/chat/completions, /v1/completions, /v1/embeddings, /v1/responses

    up to 64 characters

  • completion_windowstringrequired

    Time allowed to run every request: 24h

    up to 16 characters

  • metadataobject | null

    Up to 16 string pairs (keys ≤ 64, values ≤ 512 characters)

  • output_expires_afterobject

    How long the output and error files are kept after they are written (3600–2592000 s; default 2592000 s)

    Show 2 fields of output_expires_after
    • anchorstringrequired

      Must be `created_at`: the time counts from when each result file is created

      up to 32 characters

    • secondsintegerrequired

      Seconds the result files are kept before they are deleted

Example
{
  "input_file_id": "file_01jz8x3y4z5a6b7c8d9e0f1g2h",
  "endpoint": "/v1/chat/completions",
  "completion_window": "24h"
}

Used by