I think the process is
1. Go to console.cloud.google.com
2. Go to model garden
3. Search imagegeneration
4. End up at https://console.cloud.google.com/vertex-ai/publishers/google...
And for whatever reason that is where the documentation is.
Sample request
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://us-central1-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/us-central1/publishers/google/models/imagegeneration@002:predict"
Sample request.json
{
"instances": [
{
"prompt": "TEXT_PROMPT"
}
],
"parameters": {
"sampleCount": IMAGE_COUNT
}
}
Sample response
{
"predictions": [
{
"bytesBase64Encoded": "BASE64_IMG_BYTES",
"mimeType": "image/png"
},
{
"mimeType": "image/png",
"bytesBase64Encoded": "BASE64_IMG_BYTES"
}
],
"deployedModelId": "DEPLOYED_MODEL_ID",
"model": "projects/PROJECT_ID/locations/us-central1/models/MODEL_ID",
"modelDisplayName": "MODEL_DISPLAYNAME",
"modelVersionId": "1"
}
Disclaimer: Haven't actually tried sending a request...