curl --request GET \
--url https://api.geekidea.ai/v1/workflow_runs/{id}/quote \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.geekidea.ai/v1/workflow_runs/{id}/quote"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.geekidea.ai/v1/workflow_runs/{id}/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "workflow.quote",
"workflow": "geekidea/drama-episode",
"run_id": "run_0192f1c3a7b87c3e9a4f5b6c7d8e9f01",
"estimated_cost_usd": 1.25,
"model_cost_usd": 1.05,
"fee_usd": 0.2,
"total_cost_usd": 8.4,
"steps": [
{
"key": "story",
"model_cost_usd": 0.06,
"fee_usd": 0.04,
"next_segment": true
}
],
"currency": "USD"
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}Quote the next segment
Returns the amount that will be held when the run is confirmed: the estimated model cost and workflow fee of the steps that will run until the next confirmation (or to the end when auto_continue is on). The hold is settled at the actual cost when the segment ends, and the difference is returned.
curl --request GET \
--url https://api.geekidea.ai/v1/workflow_runs/{id}/quote \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.geekidea.ai/v1/workflow_runs/{id}/quote"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.geekidea.ai/v1/workflow_runs/{id}/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "workflow.quote",
"workflow": "geekidea/drama-episode",
"run_id": "run_0192f1c3a7b87c3e9a4f5b6c7d8e9f01",
"estimated_cost_usd": 1.25,
"model_cost_usd": 1.05,
"fee_usd": 0.2,
"total_cost_usd": 8.4,
"steps": [
{
"key": "story",
"model_cost_usd": 0.06,
"fee_usd": 0.04,
"next_segment": true
}
],
"currency": "USD"
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}Authorizations
Provide your API key in the Authorization header using Bearer auth
Path Parameters
Run ID returned when the workflow was started
Response
OK
Quote of the next segment of a workflow run
Object type, always workflow.quote
"workflow.quote"
Workflow ID
"geekidea/drama-episode"
Run ID
"run_0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
Amount held on confirmation (USD), settled at the actual cost when the segment ends
1.25
Estimated model cost of all steps (USD)
1.05
Workflow fee of all steps (USD)
0.2
Total of all steps (USD)
8.4
Quote of each step
Show child attributes
Show child attributes
Currency
"USD"
