files
Get file cost estimate
Estimate the cost of processing a batch file before creating a batch.
Returns a breakdown by model including estimated input/output tokens and cost. Useful for validating costs before committing to a batch run.
get/files/{file_id}/cost-estimate
Path parameters
file_idstring required
The ID of the file to estimate cost for
Query parameters
completion_windowstring nullable
Completion window (priority) for batch processing (e.g., "24h", "1h", "48h") If not provided, defaults to "24h"
Response
Cost estimate with per-model breakdown.
Example response
{
"file_id": "file-abc123",
"models": [
{
"estimated_cost": "0.75",
"estimated_input_tokens": 50000,
"estimated_output_tokens": 25000,
"model": "Qwen/Qwen3-30B-A3B-FP8",
"request_count": 100
}
],
"total_estimated_cost": "0.75",
"total_estimated_input_tokens": 50000,
"total_estimated_output_tokens": 25000,
"total_requests": 100
}Changes
No recorded changes to this endpoint across all 1 revision of this API.