Skip to main content

Prerequisites

Impala will provide these values to you ahead of time:
  • BASE_URL — the hostname of your Impala endpoint
  • JOB_ID — an identifier reserved for your account (required when creating a batch)
  • Create an API key in Settings on app.getimpala.ai, and send it as a bearer token on every request: -H "Authorization: Bearer $IMPALA_API_KEY". (BYOC deployments can disable API keys; if yours is disabled, omit the header.)
Use these values exactly as provided.

Step 1 — Prepare your input file (JSONL)

The input file must be JSONL (one JSON object per line). Each line represents one request to the inference endpoint you want to target (e.g. /v1/chat/completions). Example input.jsonl for chat completions:

Step 2 — Upload the input file

Upload your JSONL file using the OpenAI-compatible Files API:
Response (truncated):
Save the id — you’ll use it as input_file_id in the next step.

Step 3 — Create the batch

Required request fields: The response includes an id for the batch (for example, batch-xyz789).

Step 4 — Poll for status

The batch status will move through: validatingin_progressfinalizingcompleted (or failed / expired) When the batch is completed, the response includes:
  • output_file_id — a file containing successful responses
  • error_file_id — a file containing failed requests (only present if any requests failed)

Step 5 — Download results

The output file is JSONL: one response per line, matched to your input using custom_id.

Using the OpenAI Python SDK

The endpoint is OpenAI-compatible. Point base_url to your Impala endpoint:
Note: job_id is required by Impala. Since the OpenAI SDK doesn’t expose a job_id parameter, pass it via extra_body as shown.

API reference

  • POST /v1/files — upload
  • GET /v1/files/{file_id} — metadata
  • GET /v1/files/{file_id}/content — download
  • POST /v1/batches — create
  • GET /v1/batches/{batch_id} — status
  • GET /v1/batches — list

Need help?

Reach out to your Impala contact directly.