godo.BatchInference.CreateJob()
Generated on 5 Nov 2026
from godo version
v1.236.0
Usage
client.BatchInference.CreateJob(ctx context.Context, createReq *godo.CreateBatchRequest) (*godo.Batch, *godo.Response, error)Description
CreateJob creates a new batch inference job.
This method sends a POST request to /v1/batches.
Parameters
createReq*godo.CreateBatchRequest required
Fields of godo.CreateBatchRequest
CreateBatchRequest represents a request to create a batch inference job.
Provider is always required. Endpoint is required only when Provider is “openai”.
ProviderstringFileIDstringCompletionWindowstringRequestIDstringEndpointstring
Returns
- *godo.Batch
- *godo.Response
The HTTP response, with pagination
Links,Meta, andRatelimit information.- error
Non-nil when the request fails. API errors are returned as
*godo.ErrorResponse.
Fields of godo.Batch
Batch represents a batch inference job returned by the inference proxy.
Timestamps are ISO 8601 strings. Nullable fields use *string.
BatchIDstringProviderstringFileIDstringCompletionWindowstringStatusstringRequestIDstringRequestCounts*godo.BatchRequestCountsResultAvailableboolCancelRequestedAt*stringCreatedAtstringUpdatedAtstringExpiresAt*string
Request Sample
More Information
See POST /v1/batches in the API reference for additional detail on responses, headers, parameters, and more.
See the Go package documentation for the source of this method.