Skip to main content
Glama

create batch

create_batch

Reduce costs for non-urgent workloads by submitting an asynchronous batch of inference requests from an uploaded JSONL file, processed within a chosen completion window.

Instructions

Submit an asynchronous, discounted batch of inference requests from a previously uploaded JSONL file, for workloads that can wait up to the completion window. POST /v1/batches (API-key scope: platform:write). SPENDS MONEY: this starts billable work on the workspace wallet. Returns: 201 with the batch object: { id, nebius_batch_id, endpoint, status, request_total, request_completed, request_failed, completion_window, billed_cost_usd, created_at, output_file_id, error_file_id, error } Notes: MONEY: the wallet must hold at least $0.10 of available runway to submit (402 otherwise); the batch discount and markup are frozen at submit time and the job is billed on completion. OWNER/ADMIN only (403). 400 when input_file_id/endpoint/model is missing or the body is not JSON. 503 when batch creation is temporarily unavailable upstream (the input file stays uploaded; retry later). 404 while the batch feature flag is off.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesA representative model id from the file; it is the billing-rate basis. Must have configured pricing or the call is refused with 400.
endpointYesThe API route every line in the file targets.
input_file_idYesId of a file uploaded via /v1/files with purpose "batch" containing the request JSONL. Must belong to this workspace (or be the input of one of its past batches); otherwise 404 "Input file not found".
completion_windowNoHow long the batch may take, e.g. "24h". Default: "24h".
Install Server

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only say not read-only and not idempotent, but the description adds substantial side-effect information: 'SPENDS MONEY: this starts billable work', wallet runway requirements, pricing freeze at submit, and who can execute. It also discloses return status and several error paths, giving the agent a full behavioral picture.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description front-loads the core purpose and then packs in auth, cost, return shape, and error codes. It is dense and somewhat run-on, but every clause carries information an agent needs to call the tool safely, so the length is justified.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description compensates by listing the returned batch object fields and 201 success status. It covers main error variants, permission requirements, and financial consequences, making it complete for a side-effectful paid API call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already explains every parameter. The tool description adds no extra meaning beyond what the schema provides (e.g., it references input_file_id but the schema already describes the purpose and ownership requirement). Baseline 3 is appropriate when the schema handles parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence states a specific verb ('Submit'), resource ('batch of inference requests'), and key properties ('asynchronous, discounted', 'from a previously uploaded JSONL file'). It clearly distinguishes this creation action from sibling tools like list_batches, get_batch, and cancel_batch.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly names the workload context ('for workloads that can wait up to the completion window') and gives preconditions (previously uploaded JSONL file, wallet runway, owner/admin). It does not name alternative tools or provide explicit when-not-to-use statements, but the context and error conditions make selection clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/omnia-v/errorbar-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server