Skip to main content
POST
Create Async Job

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Universal AI async request body.

Extends UniversalAIBody with webhook parameters for async notifications.

model
string
required

Model in format: feature/subfeature/provider[/model]

Examples:

"text/ai_detection/openai/gpt-4"

"ocr/ocr/amazon"

"image/generation/google/imagen-3"

input
Input · object
required

Feature-specific input fields, nested here rather than at the top level of the body. The fields accepted for the feature/subfeature named in model are its input_schema, served by GET /v3/info/{feature}/{subfeature}. Examples:

  • text/ai_detection: {'text': 'content to analyze'}
  • ocr/ocr: {'file': '', 'language': 'en'}
  • image/generation: {'text': 'prompt', 'resolution': '1024x1024'}
  • translation/document_translation: {'file': '', 'target_language': 'fr'}
Examples:
tags
any

Up to 10 key/value labels recorded with this call, for filtering and grouping usage. Merged with the X-EdenAI-Tags header.

Example:
provider_params
Provider Params · object | null

Native parameters in the provider's own request format, forwarded to the provider alongside input. On some features each provider accepts only an allowlist of parameters, and any other returns 400.

fallbacks
string[]

Fallback providers to try if the primary provider fails, in order. Accepted formats:

  • 'provider' or 'provider/model' (e.g. 'amazon', 'openai/gpt-4')
  • full model id (e.g 'text/moderation/google', 'image/generation/minimax/image-01')
Maximum array length: 3
show_original_response
boolean | null
default:false

Include raw provider response in the output

output_format
enum<string>
default:full

compact trims output for LLM and agent callers: base64-encoded media is dropped wherever it appears (the *_resource_url download link next to it stays), and so is dense position data such as per-word OCR boxes, table cell boxes and face landmarks; one box per detected item stays. Fields the output schema marks required may therefore be absent. original_response is not trimmed. full returns the output unchanged. The response echoes the format. Applies to this response only: an async job keeps its full output, so pass output_format=compact again when fetching it.

Available options:
full,
compact
webhook_receiver
string<uri> | null

Webhook URL to receive job completion notification

Required string length: 1 - 2083
user_webhook_parameters
User Webhook Parameters · object | null

Custom parameters to include in webhook payload

Response

Successful Response

Async response from universal-ai/async endpoint.

Inherits base fields and adds job-specific fields for tracking async operations. Used for both job creation (202 Accepted) and job detail (GET) responses.

status
enum<string>
required

Request status: success, fail, or processing (async only)

Available options:
success,
fail,
processing
cost
string
required

Cost in credits for this request

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
provider
string
required

Provider name that processed the request

feature
string
required

Feature category (e.g., text, ocr, image)

subfeature
string
required

Specific subfeature (e.g., ai_detection, sentiment)

public_id
string
required

Job ID for polling status

created_at
string<date-time>
required

Job creation timestamp

output_format
enum<string>
default:full

Whether output, the normalized output, is whole (full) or trimmed for LLM callers (compact); echoes the request parameter. Unrelated to original_response, the raw provider payload behind show_original_response.

Available options:
full,
compact
output
any | null

Normalized output from the provider

error
Error · object | null

Error details from the provider (only present when status is 'fail')

original_response
any | null

Raw response from the provider (if show_original_response=true)

model
string | null

Model name if specified in the request