R
RunPod6mo ago
Myron

Can't create pod via graphQL endpoint but works manually

I'm trying to create a new pod using a given template and networkvolume. I can do this using the website just fine however when I try to duplicate the exact same settings using the podRentInterruptable graphQL mutation I'm getting a There are no longer any instances available with the request specifications. Please try again later. error. Here is the mutation:
mutation {
podRentInterruptable(
input: {
volumeInGb: 100
containerDiskInGb: 5
cloudType: SECURE
bidPerGpu: 0.2
gpuCount: 1
gpuTypeId: "NVIDIA RTX 4090"
networkVolumeId: "${networkVolumeID}"
templateId: "${templateID}"
}
) {
id
imageName
env
machineId
machine {
podHostId
}
}
}
mutation {
podRentInterruptable(
input: {
volumeInGb: 100
containerDiskInGb: 5
cloudType: SECURE
bidPerGpu: 0.2
gpuCount: 1
gpuTypeId: "NVIDIA RTX 4090"
networkVolumeId: "${networkVolumeID}"
templateId: "${templateID}"
}
) {
id
imageName
env
machineId
machine {
podHostId
}
}
}
This exact same mutation works with the A6000, while I cannot select the A6000 in the UI. Could someone help explain to me what I'm doing wrong? I tried checking the graphQL docs but they're mostly useless.
38 Replies
nerdylive
nerdylive6mo ago
srry my i can't find any reason that wouldn't work if the capacity is up Maybe try asking runpod support from contact button in the website
Myron
MyronOP6mo ago
Ah, they don't have actual support staff here then? (I appreciate the assist btw)
Marcus
Marcus6mo ago
You have to provide data center id when providing network volume id otherwise it does not work.
Myron
MyronOP6mo ago
That would be US-OR-1 yeah? As in, just the name of the region, they don't have some specific ID somewhere? If so, no difference sadly
nerdylive
nerdylive6mo ago
They do, but mainly they respond from the website Oh ya try that No I'm not sure if that's the datacenter id I think you have to query somewhere else, but if not then try that first
Myron
MyronOP6mo ago
US-OR-1 didn't change anything I'll try querying for the datacenters, see what it outputs
Marcus
Marcus6mo ago
Your bid price is also too low, minimum is 0.39
Myron
MyronOP6mo ago
I even tried 15 haha
Marcus
Marcus6mo ago
$15 ?
Myron
MyronOP6mo ago
Just to test, yeah, just got the same message
Marcus
Marcus6mo ago
image id may also be required
Myron
MyronOP6mo ago
Should be in the template no? I just queried and the dataCenterId is 'US-OR-1'
Marcus
Marcus6mo ago
One would think, but probably a bug where you have to provide it
Myron
MyronOP6mo ago
You're referring to the imageName field yeah? No difference :/
mutation {
podRentInterruptable(
input: {
volumeInGb: 100
containerDiskInGb: 5
cloudType: SECURE
bidPerGpu: 0.5
gpuCount: 1
gpuTypeId: "NVIDIA RTX 4090"
dataCenterId: "US-OR-1"
imageName: "MY_IMAGE"
networkVolumeId: "${networkVolumeID}"
templateId: "${templateID}"
}
) {
id
imageName
env
machineId
machine {
podHostId
}
}
}
mutation {
podRentInterruptable(
input: {
volumeInGb: 100
containerDiskInGb: 5
cloudType: SECURE
bidPerGpu: 0.5
gpuCount: 1
gpuTypeId: "NVIDIA RTX 4090"
dataCenterId: "US-OR-1"
imageName: "MY_IMAGE"
networkVolumeId: "${networkVolumeID}"
templateId: "${templateID}"
}
) {
id
imageName
env
machineId
machine {
podHostId
}
}
}
Marcus
Marcus6mo ago
Try add volume mount path
nerdylive
nerdylive6mo ago
Ends up with all the fields inputted hahaha Yeah well worth trying
Marcus
Marcus6mo ago
Error messages from the API could be better, its like trying to find a needle in a haystack when there is an error
Myron
MyronOP6mo ago
Aye, the docs themselves aswell, almost 0 explanation about what certain fields do Still no diff with the mountpath added
Marcus
Marcus6mo ago
I guess just keep trying to add fields until it works
Myron
MyronOP6mo ago
How would making it more specific fix it?
Marcus
Marcus6mo ago
Some fields are required but the error doesn't tell you, so you have to discover it by trial and error
Myron
MyronOP6mo ago
Wow, okay haha I'm starting to wonder if I made a mistake lmao Thanks for the assist in any case
Marcus
Marcus6mo ago
Could be possible that you made a mistake if template id is wrong
Myron
MyronOP6mo ago
No the IDs are correct It works with the A6000 somehow
Marcus
Marcus6mo ago
Also network volume id is the id not the name
Myron
MyronOP6mo ago
Aye
Marcus
Marcus6mo ago
Oh I see, thats strange then
Myron
MyronOP6mo ago
They both use the actual ID
Marcus
Marcus6mo ago
Ok good
Myron
MyronOP6mo ago
The weirdest thing is that it works with the A6000, like I see it linked to the network volume and template. But I can't do that manually Like when I try that the A6000 is greyed out
Marcus
Marcus6mo ago
Yeah thats bizarre
nerdylive
nerdylive6mo ago
Ikr, but graphql..
Myron
MyronOP6mo ago
I was excited when I saw a JS SDK but then I fell back into despair when it only worked for endpoints lmao
nerdylive
nerdylive6mo ago
They're working on graphql apis too last time I heard Yeah I'm not really using it so.. Sorry can't help much
Myron
MyronOP6mo ago
Honestly, I want a normal API I can just POST to, not be forced into graphQL or a SDK if I dont' want to but yeah I had to implement graphQL in my project specifically for this haha
nerdylive
nerdylive6mo ago
Hmm feel free to write it on #🧐|feedback Like a rest api?
Myron
MyronOP6mo ago
Aye
Want results from more Discord servers?
Add your server