#Unable to create pod with GraphQL

3 messages · Page 1 of 1 (latest)

topaz ivy
#

Hi I tried to use following command to create a pod to test.

curl --request POST \
  --url https://api.runpod.io/graphql \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"query":"mutation { podFindAndDeployOnDemand(input: { cloudType: SECURE gpuCount: 1 gpuTypeId: \"NVIDIA A40\" name: \"A40 Pod\" imageName: \"runpod/pytorch\" containerDiskInGb: 40 volumeInGb: 40 }) { id imageName machineId } }"}'

My API_key is with right permissions. I got 500: Internal Server Error. Anyone know why this happens?

topaz ivy
#

turns out Bearer authorization is not supported. should use url?api_key... instead. Shouldn't here be security problems in this approach?

lucid cave
#

use the api_key, i will get eng to support auth header