Skip to main content
POST
/
batches
Create batch
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    input_file_id: '<string>',
    endpoint: '<string>',
    completion_window: '<string>',
    metadata: {},
    debug: {
      enabled: true,
      return_upstream_request: true,
      return_upstream_response: true,
      trace: true,
      trace_level: 'summary'
    },
    provider: {
      order: ['<string>'],
      only: ['<string>'],
      ignore: ['<string>'],
      include_alpha: true
    }
  })
};

fetch('https://api.phaseo.app/v1/batches', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "error": "error_type",
  "ok": false,
  "message": "Human-readable error message",
  "description": "Additional error details."
}
This route is reserved for upcoming batch support.

Authorizations

Authorization
string
header
required

Bearer token authentication

Body

application/json
input_file_id
string
required
endpoint
string
required
completion_window
string
metadata
object
debug
object

Gateway debug controls. These flags are never forwarded upstream.

provider
object

Provider routing preferences for gateway selection.

Response

Unauthorized

error
required
Example:

"error_type"

ok
boolean
Example:

false

message
string
Example:

"Human-readable error message"

description
string
Example:

"Additional error details."

Last modified on February 25, 2026