universal-ai
universal-ai

Create Async Job

Create an async job for long-running AI operations.

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

Supported async features:

  • audio/speech_to_text_async

Request body:

  • model: Model string in format feature/subfeature/provider[/model]
  • input: Feature-specific input parameters
  • fallbacks: Optional list of fallback provider strings (max 3)
  • webhook_receiver: Optional URL to receive job completion notification
  • user_webhook_parameters: Optional custom parameters for webhook payload

Returns 202 Accepted with job info for polling.

post/v3/universal-ai/async

Request

  • Base URL
    https://api.edenai.run
  • Auth
    HTTP bearer

Request body

tagsunknown
modelstring required

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

provider_paramsobject nullable

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.

inputobject 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': '<file ID or URL>', 'language': 'en'}
  • image/generation: {'text': 'prompt', 'resolution': '1024x1024'}
  • translation/document_translation: {'file': '<file ID or URL>', 'target_language': 'fr'}
fallbacksstring[]

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')
show_original_responseboolean nullable

Include raw provider response in the output

output_format'full' | 'compact'

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.

webhook_receiverstring uri nullable

Webhook URL to receive job completion notification

user_webhook_parametersobject nullable

Custom parameters to include in webhook payload

Example request

{
  "tags": {
    "client": "acme",
    "project": "invoices"
  },
  "model": "text/ai_detection/openai/gpt-4",
  "input": {
    "text": "Analyze this text for AI detection"
  }
}

Response

Successful Response

status'success' | 'fail' | 'processing' required

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

coststring required

Cost in credits for this request

providerstring required

Provider name that processed the request

featurestring required

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

subfeaturestring required

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

output_format'full' | 'compact'

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.

outputunknown
errorobject nullable

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

original_responseunknown
public_idstring required

Job ID for polling status

modelstring nullable

Model name if specified in the request

created_atstring date-time required

Job creation timestamp

Changes

No recorded changes to this operation across all 1 revision of this API.