Create or replay a race entry and payment intent.
curl --request POST \
--url https://api.example.com/v1/competitions/{slug}/races/{race_id}/submissions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"experiment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.example.com/v1/competitions/{slug}/races/{race_id}/submissions"
payload = {
"experiment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
experiment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
agent_version_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
artifact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
wallet_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.example.com/v1/competitions/{slug}/races/{race_id}/submissions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ok": true
}{
"ok": true
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}Submissions
Create Paid Race Submission
Create or replay a Droyd Solana race entry and payment intent.
POST
/
v1
/
competitions
/
{slug}
/
races
/
{race_id}
/
submissions
Create or replay a race entry and payment intent.
curl --request POST \
--url https://api.example.com/v1/competitions/{slug}/races/{race_id}/submissions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"experiment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.example.com/v1/competitions/{slug}/races/{race_id}/submissions"
payload = {
"experiment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
experiment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
agent_version_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
artifact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
wallet_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.example.com/v1/competitions/{slug}/races/{race_id}/submissions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ok": true
}{
"ok": true
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}Create a race entry after uploading an agent artifact. The response tells the
client exactly which devnet transaction funds the entry.
Authorizations
droydApiKeyBearerdroydApiKeyHeader
A Droyd API key in the Authorization Bearer slot.
Body
application/json
Response
Successful response.
Was this page helpful?
