POST
curl --request POST \
  --url https://aiapi.scope3.com/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "requestId": "124ab1c",
  "caller": "//bigquery.googleapis.com/projects/myproject/jobs/myproject:US.bquxjob_5b4c112c_17961fafeaf",
  "sessionUser": "user@company.com",
  "userDefinedContext": {},
  "calls": [
    [
      "gpt-4-turbo",
      "2024-03-15T10:30:00Z",
      "us-central1",
      "US",
      "CA",
      "text-generation",
      100,
      50,
      null
    ]
  ]
}'
{
  "replies": [
    "<string>"
  ],
  "errorMessage": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
requestId
string
required

Unique identifier for the request

Example:

"124ab1c"

caller
string
required

Full resource name of the BigQuery job

Example:

"//bigquery.googleapis.com/projects/myproject/jobs/myproject:US.bquxjob_5b4c112c_17961fafeaf"

sessionUser
string
required

Email of the user executing the BigQuery query

Example:

"user@company.com"

calls
array
required

Array of function call parameters in this exact order: model_id STRING, model_family STRING, model_name STRING, model_hugging_face_path STRING, request_time TIMESTAMP, node_id STRING, cloud_id STRING, cloud_region STRING, cloud_instance_id STRING, managed_service_id STRING, country STRING, region STRING, task STRING, input_tokens INT64, output_tokens INT64, input_images STRING, output_images STRING, output_video_resolution INT64, output_video_frames INT64, input_audio_seconds INT64, input_steps INT64

userDefinedContext
object

User-defined context from BigQuery

Response

200
application/json
Impact metrics calculated successfully
replies
string[]
required

Array of impact metric results

errorMessage
string