Skip to main content
POST
/
v3
/
universal-ai
/
async
Create Async Job
curl --request POST \
  --url https://api.edenai.run/v3/universal-ai/async \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "input": {},
  "provider_params": {},
  "show_original_response": false,
  "webhook_receiver": "<string>",
  "user_webhook_parameters": {}
}
'
{
  "status": "success",
  "cost": "<string>",
  "provider": "<string>",
  "feature": "<string>",
  "subfeature": "<string>",
  "public_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "output": "<unknown>",
  "error": {},
  "original_response": "<unknown>",
  "model": "<string>"
}

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 parameters. Required fields depend on the feature/subfeature specified in provider. Examples:

  • text/ai_detection: {'text': 'content to analyze'}
  • text/embeddings: {'texts': ['text1', 'text2']}
  • ocr/ocr: {'file_id': 'abc123', 'language': 'en'}
  • image/generation: {'text': 'prompt', 'resolution': '1024x1024'}
  • translation/document_translation: {'file_id': 'abc123', 'target_language': 'fr'}
Examples:
{
"text": "Analyze this text for AI detection"
}
{
"dimensions": 512,
"texts": ["text1", "text2"]
}
{ "file_id": "abc123", "language": "en" }
provider_params
Provider Params · object

Provider-specific parameters

show_original_response
boolean | null
default:false

Include raw provider response in the output

webhook_receiver
string<uri> | null

Webhook URL to receive job completion notification

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

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
any | null

Normalized output from the provider

error
Error · object

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