9mo

API key required. Sign up for an Ouro account and create an API key to get started.

  • POST /images/generations/dalle2

    Text to image generation with DALL-E 2

    Request body

    size

    stringDefaults to 1024x1024
      256x256512x5121024x1024

    Controls the resolution of the generated image.

    prompt

    stringRequired

    The text prompt to generate the image from.

    const url = 'https://api.ouro.foundation/routes/mmoderwell/images/generations/dalle2';
    const options = {
      method: 'POST',
      headers: {
        'Authorization': 'ApiKey {your-ouro-api-key}',
        'Content-Type': 'application/json'
      }
    };
     
    const payload = {
      "size": "1024x1024",
      "prompt": "example_string"
    };
    options.body = JSON.stringify(payload);
     
    fetch(url, options)
      .then(response => response.json())
      .then(data => console.log(data))
      .catch(error => console.error('Error:', error));