Skip to main content
The provider_params field lets you pass provider-specific parameters that aren’t part of Eden AI’s unified schema. This gives you access to advanced or niche options offered by individual providers without breaking the standard request format.

How It Works

Add a provider_params object to any Universal AI request. The contents are forwarded directly to the provider alongside the standard input fields.
{
  "model": "{feature}/{subfeature}/{provider}[/{model}]",
  "input": {
    // Standard unified parameters
  },
  "provider_params": {
    // Provider-specific parameters passed through as-is
  }
}

Basic Example

import requests

url = "https://api.edenai.run/v3/universal-ai"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}

payload = {
    "model": "image/generation/openai/dall-e-3",
    "input": {
        "text": "A futuristic city at sunset, cyberpunk style"
    },
    "provider_params": {
        "quality": "hd",
        "style": "vivid"
    }
}

response = requests.post(url, headers=headers, json=payload)
result = response.json()
print(result)

Common Use Cases

Image Generation — Style and Quality

Control output style and quality for image generation:
import requests
import base64
from PIL import Image
from io import BytesIO

url = "https://api.edenai.run/v3/universal-ai"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}

payload = {
    "model": "image/generation/openai/dall-e-3",
    "input": {
        "num_images": 1,
        "text": "A watercolor painting of a mountain landscape",
        "resolution": "1792x1024"
    },
    "provider_params": {
        "style": "vivid",
        "quality": "hd" #Default is standard
    }
}
response = requests.post(url, headers=headers, json=payload)
data = response.json()

img_url = data["output"]["items"][0]["image_resource_url"]
img_response = requests.get(img_url)
img = Image.open(BytesIO(img_response.content))
img.save('image.png')
img.show()

Text to Speech — Voice Settings

Pass provider-specific voice parameters:
import requests

url = "https://api.edenai.run/v3/universal-ai"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}

payload = {
    "model": "audio/tts/google/gemini-2.5-flash-tts",
    "input": {
      "voice": "achernar",
      "text": "Bonjour, j'adore la tourte.",
      "audio_format": "mp3"
    },
    "provider_params": {
      "language_code": "fr-FR",
      "prompt": "say this while crying"
    }
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())

Important Notes

  • provider_params are not validated by Eden AI — they are passed directly to the provider. Invalid parameters may cause provider-side errors.
  • Available parameters vary by provider and feature. Refer to the provider’s own documentation for supported options.
  • provider_params only apply to the specific provider in the model string. If you switch providers, you may need to update the parameters.

Next Steps