Execute API Tasks
API Doc
Overview
Header parameters
x-api-keystringRequired
API key for authentication.
Body
namespacestringRequired
The namespace of the task.
taskNamestringRequired
The name of the task to be executed.
labelstringOptional
Label of the task.
versioninteger · uint32Optional
Version number of the task.
asyncbooleanRequired
If true, the endpoint will retrieve the executionId; otherwise, it will try to return the execution result only if it completes within 60 seconds.
inputobjectRequired
Input data required for task execution.
executionTimeoutinteger · uint32Required
Timeout for task execution in seconds.
Responses
200
Successful execution
application/json
or
400
Bad request, invalid input.
application/json
401
Not authorized.
application/json
402
Payment required.
application/json
500
Internal server error.
application/json
post/task/api/execute-by-name
POST /task/api/execute-by-name HTTP/1.1
Host: run.truebit.network
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 103
{
"namespace": "namespacetest",
"taskName": "tasktestapi",
"input": {},
"executionTimeout": 10000,
"async": true
}{
"executionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee",
"clearTextSolution": {
"output": {
"data": "{\"args\":{},\"data\":\"\",\"files\":{},\"form\":{},\"headers\":{\"Authorization\":\"Basic *********+\",\"Connection\":\"close\",\"Host\":\"10.1.10.100\",\"X-Service-Name\":\"truebit-api-adapter\"},\"json\":null,\"method\":\"GET\",\"origin\":\"10.2.140.154\",\"url\":\"http://10.1.10.100/anything/2\"}\n",
"executedAt": "2026-01-07T15:14:41.584164",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Origin": "*",
"Connection": "close",
"Content-Length": "278",
"Content-Type": "application/json",
"Date": "Wed, 07 Jan 2026 15:14:42 GMT",
"Server": "gunicorn"
},
"request_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee",
"status": "success",
"statusCode": 200
},
"status": "succeed",
"senderAddress": "0x************************************2266"
},
"status": "Success",
"totalTransferredBytes": {
"request": 194,
"response": 438
}
}Custom Headers
Adding Headers to Your Request
Supported Header Types
Request Structure
Field
Location
Description
Important Notes
Authorization
API KEY
Last updated
Was this helpful?