Skip to main content
POST
/
v1beta
/
models
/
:model:generateContent
generateContent file analysis
curl --request POST \
  --url https://gptproto.com/v1beta/models/:model:generateContent \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "contents": [
    {}
  ]
}'
{
  "error": {
    "message": "Invalid request parameters",
    "type": "invalid_request_error",
    "code": "invalid_parameters"
  }
}

Overview

This endpoint provides generatecontent file analysis functionality.

Authentication

This endpoint requires authentication using a Bearer token.
Authorization
string
required
Your API key in the format: Bearer YOUR_API_KEY

Path Parameters

Query Parameters

Request Body

contents
array
Contents parameter

Request Example

curl -X POST "https://gptproto.com/v1beta/models/:model:generateContent" \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "contents": [
    {
      "parts": [
        {
          "text": "Please summarize the main content of this PDF"
        },
        {
          "file_data": {
            "mime_type": "application/pdf",
            "file_uri": "https://discovery.ucl.ac.uk/id/eprint/10089234/1/343019_3_art_0_py4t4l_convrt.pdf"
          }
        }
      ]
    }
  ]
}'

Response

Success
200
Successful response
{
  "status": "success"
}

Error Responses

{
  "error": {
    "message": "Invalid request parameters",
    "type": "invalid_request_error",
    "code": "invalid_parameters"
  }
}