I looked through the entire returned object in the dalle 3 API response using Python.
Is this correct that it isn’t there or is there another way to get it?
The current Dall-E3 documentation describes the response object in a straightforward format as follows:
{
"created": 1589478378,
"data": [
{
"url": "https://..."
},
{
"url": "https://..."
}
]
}
But in reality, the actual response returned from the API includes a key named “revised_prompt”.
As for DALL-E 3, only n=1 is supported, so if you pass “url” as the “response_format” argument when calling the API, the response object looks like this:
{
"created":"********",
"data":[
{
b64_json: None,
revised_prompt: '...',
url: 'https://...'
}
]
}
To access the revised prompt, for example, you would specify it as:
response.data[0].revised_prompt
Here, ‘response’ represents the entire response object.
Please also refer to this:
1 Like