The Task API may return various warnings and errors during operation. This page documents the possible error types you might encounter when using the API.

Errors

Errors result in a failure to process your request and are returned with appropriate HTTP status codes (4xx or 5xx).

ErrorDescriptionResolution
Invalid JSON SchemaThe JSON schema provided in the task spec for input or output is invalid.Review your schema against JSON Schema specifications and ensure it follows the required format.
Task Spec + Input Too LongThe combined task specification and input exceeds 15,000 characters.Reduce the size of your task spec or input data. Consider splitting into multiple tasks if necessary.
Too-Complex Output SchemaThe output schema exceeds allowed complexity in terms of nesting depth or number of fields.Simplify your output schema by reducing nested levels to 3 or less.

Warnings

Warnings indicate potential issues that don’t prevent the request from being processed but may affect results.

WarningDescriptionResolution
Input Fails ValidationThe provided input does not conform to the input schema.Verify your input against the schema requirements and make necessary adjustments.
Task Spec + Input Over Size LimitThe combined task specification and input exceeds the character limit.Consider optimizing your input or task spec for better performance.
Too Many Output FieldsThe number of requested output fields exceeds the recommended limit.Consider reducing the number of output fields.

Warning Handling

The Task API uses a warning system to provide guidance without blocking execution. Warnings are generated during validation and can be handled in two ways:

Basis Properties Warning

The following properties are provided by default through the task’s run basis and should not be defined in the output schema:

  • citations
  • confidence
  • evidence
  • reasoning
  • source
  • sources
  • source_urls

Including these in your output schema will trigger a warning, as it’s recommended to use FieldBasis in the run output instead.

API Errors

The Task API uses standard HTTP error code format to indicate the result of your request:

Status CodeMeaningDescription
402Payment issueRun could not be completed due to no more credits.
404Not FoundThe requested resource (run ID or processor) was not found.
408Request TimeoutThe synchronous request timed out while waiting for completion.
410CancelledThe task run was cancelled.
422Unprocessable ContentValidation failure in the request.
429Too Many RequestsRate limited or out of credits.
500Internal Server ErrorThe task run failed due to an internal error.