curl --request POST \
--url https://gateway.apiosk.com/v2/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"api_id": "<string>",
"max_spend": 1
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({api_id: '<string>', max_spend: 1})
};
fetch('https://gateway.apiosk.com/v2/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "requires_approval",
"question": "<string>",
"capability": "<string>",
"normalized_records": [
{
"entity_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entity_refs": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"facts": [
{
"type": "<string>",
"value": "<unknown>",
"observed_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"sources": [
{
"source_id": "<string>",
"result_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_url": "<string>",
"retrieved_at": "2023-11-07T05:31:56Z",
"source_pointer": "<string>"
}
]
}
]
}
],
"plan": {
"quote_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2023-11-07T05:31:56Z",
"steps": [
{
"source_id": "kvk-dutch-business-register",
"operation": "company_registry.search",
"name": "<string>",
"conditional": true,
"estimated_cost": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
}
],
"estimated_total": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
},
"answer": {},
"data": {},
"results": [
{
"result_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": {
"provider": "<string>",
"name": "<string>"
},
"data": {}
}
],
"usage": {
"sources": [
{
"source_id": "<string>",
"operation": "<string>",
"calls": 123,
"cost": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
}
],
"cost": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
},
"held": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
},
"balance": {
"remaining": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
},
"errors": [
{
"code": "<string>",
"message": "<string>"
}
],
"retry_after_ms": 123,
"message": "<string>",
"needs_input": [
{
"label": "<string>",
"schema": {}
}
],
"candidates": [
{}
],
"approval_required_reason": {
"code": "<string>",
"message": "<string>"
},
"metadata": {},
"continuation": {
"state": {
"schema_version": "2",
"state_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": 1,
"expires_at": "2023-11-07T05:31:56Z",
"focus": {
"entity_refs": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"goal_refs": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"state_token": "<string>"
},
"actions": [
{
"action_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "select_entity",
"label": "<string>",
"requires_authorization": false,
"input_schema": {}
}
]
}
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "requires_approval",
"question": "<string>",
"capability": "<string>",
"normalized_records": [
{
"entity_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entity_refs": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"facts": [
{
"type": "<string>",
"value": "<unknown>",
"observed_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"sources": [
{
"source_id": "<string>",
"result_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_url": "<string>",
"retrieved_at": "2023-11-07T05:31:56Z",
"source_pointer": "<string>"
}
]
}
]
}
],
"plan": {
"quote_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2023-11-07T05:31:56Z",
"steps": [
{
"source_id": "kvk-dutch-business-register",
"operation": "company_registry.search",
"name": "<string>",
"conditional": true,
"estimated_cost": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
}
],
"estimated_total": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
},
"answer": {},
"data": {},
"results": [
{
"result_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": {
"provider": "<string>",
"name": "<string>"
},
"data": {}
}
],
"usage": {
"sources": [
{
"source_id": "<string>",
"operation": "<string>",
"calls": 123,
"cost": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
}
],
"cost": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
},
"held": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
},
"balance": {
"remaining": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
},
"errors": [
{
"code": "<string>",
"message": "<string>"
}
],
"retry_after_ms": 123,
"message": "<string>",
"needs_input": [
{
"label": "<string>",
"schema": {}
}
],
"candidates": [
{}
],
"approval_required_reason": {
"code": "<string>",
"message": "<string>"
},
"metadata": {},
"continuation": {
"state": {
"schema_version": "2",
"state_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": 1,
"expires_at": "2023-11-07T05:31:56Z",
"focus": {
"entity_refs": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"goal_refs": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"state_token": "<string>"
},
"actions": [
{
"action_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "select_entity",
"label": "<string>",
"requires_authorization": false,
"input_schema": {}
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Execute the API selected from Ask
Requires sources:execute. Uses the same selected preparation, authorization and balance executor as the App. Reusing the idempotency key with the same selection/input recovers the saved run. The existing signed App/MCP continuation body remains supported separately.
curl --request POST \
--url https://gateway.apiosk.com/v2/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"api_id": "<string>",
"max_spend": 1
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({api_id: '<string>', max_spend: 1})
};
fetch('https://gateway.apiosk.com/v2/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "requires_approval",
"question": "<string>",
"capability": "<string>",
"normalized_records": [
{
"entity_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entity_refs": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"facts": [
{
"type": "<string>",
"value": "<unknown>",
"observed_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"sources": [
{
"source_id": "<string>",
"result_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_url": "<string>",
"retrieved_at": "2023-11-07T05:31:56Z",
"source_pointer": "<string>"
}
]
}
]
}
],
"plan": {
"quote_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2023-11-07T05:31:56Z",
"steps": [
{
"source_id": "kvk-dutch-business-register",
"operation": "company_registry.search",
"name": "<string>",
"conditional": true,
"estimated_cost": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
}
],
"estimated_total": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
},
"answer": {},
"data": {},
"results": [
{
"result_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": {
"provider": "<string>",
"name": "<string>"
},
"data": {}
}
],
"usage": {
"sources": [
{
"source_id": "<string>",
"operation": "<string>",
"calls": 123,
"cost": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
}
],
"cost": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
},
"held": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
},
"balance": {
"remaining": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
},
"errors": [
{
"code": "<string>",
"message": "<string>"
}
],
"retry_after_ms": 123,
"message": "<string>",
"needs_input": [
{
"label": "<string>",
"schema": {}
}
],
"candidates": [
{}
],
"approval_required_reason": {
"code": "<string>",
"message": "<string>"
},
"metadata": {},
"continuation": {
"state": {
"schema_version": "2",
"state_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": 1,
"expires_at": "2023-11-07T05:31:56Z",
"focus": {
"entity_refs": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"goal_refs": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"state_token": "<string>"
},
"actions": [
{
"action_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "select_entity",
"label": "<string>",
"requires_authorization": false,
"input_schema": {}
}
]
}
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "requires_approval",
"question": "<string>",
"capability": "<string>",
"normalized_records": [
{
"entity_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entity_refs": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"facts": [
{
"type": "<string>",
"value": "<unknown>",
"observed_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"sources": [
{
"source_id": "<string>",
"result_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_url": "<string>",
"retrieved_at": "2023-11-07T05:31:56Z",
"source_pointer": "<string>"
}
]
}
]
}
],
"plan": {
"quote_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2023-11-07T05:31:56Z",
"steps": [
{
"source_id": "kvk-dutch-business-register",
"operation": "company_registry.search",
"name": "<string>",
"conditional": true,
"estimated_cost": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
}
],
"estimated_total": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
},
"answer": {},
"data": {},
"results": [
{
"result_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": {
"provider": "<string>",
"name": "<string>"
},
"data": {}
}
],
"usage": {
"sources": [
{
"source_id": "<string>",
"operation": "<string>",
"calls": 123,
"cost": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
}
],
"cost": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
},
"held": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
},
"balance": {
"remaining": {
"amount": 0.023,
"amount_micro_usd": "23000",
"currency": "USD"
}
},
"errors": [
{
"code": "<string>",
"message": "<string>"
}
],
"retry_after_ms": 123,
"message": "<string>",
"needs_input": [
{
"label": "<string>",
"schema": {}
}
],
"candidates": [
{}
],
"approval_required_reason": {
"code": "<string>",
"message": "<string>"
},
"metadata": {},
"continuation": {
"state": {
"schema_version": "2",
"state_ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": 1,
"expires_at": "2023-11-07T05:31:56Z",
"focus": {
"entity_refs": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"goal_refs": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"state_token": "<string>"
},
"actions": [
{
"action_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "select_entity",
"label": "<string>",
"requires_authorization": false,
"input_schema": {}
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
An organisation API key: Authorization: Bearer apk_org_live_…
Headers
1 - 255Body
Explicit approved total in USD; checked before purchase.
x >= 0Registered APIs only; external purchases return asynchronously.
0 <= x <= 551 <= x <= 50Response
Success
- Option 1
- Option 2
requires_approval, running, completed, partial, needs_input, needs_selection, unsupported, cancelled, failed European capability slug for a structured capability plan or run.
Contract-extracted provider facts grouped by subject. Equal facts for one subject are combined with all their source references; absent fields are never invented.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Apiosk's reading of the results, with evidence pointers. Null for a direct call.
The source document, when the run produced exactly one.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Natural-language clarification for needs_input.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Attribution for a single result, when present.
Show child attributes
Show child attributes

