{
  "info": {
    "name": "Tovano API",
    "_postman_id": "6a0c1f52-7d3e-4b1a-9c55-0e7b9a2f4d10",
    "description": "Tovano public API (/v1). One API key, one balance and one invoice for image, video, audio and text models.\n\nSet the `apiKey` collection variable to your key (tvn_live_...). All amounts are integer micro-dollars (1 USD = 1000000).\n\nDocs: https://tovano.ai/docs \u00b7 OpenAPI: https://tovano.ai/openapi.json",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.tovano.ai"
    },
    {
      "key": "apiKey",
      "value": "tvn_live_REPLACE_ME"
    },
    {
      "key": "taskId",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Models",
      "item": [
        {
          "name": "List models",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/models",
              "host": ["{{baseUrl}}"],
              "path": ["v1", "models"]
            },
            "description": "Every model with type, unit and price_micro."
          },
          "response": []
        },
        {
          "name": "Get a model",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/models/image/demo-1",
              "host": ["{{baseUrl}}"],
              "path": ["v1", "models", "image", "demo-1"]
            },
            "description": "One model with its input schema (JSON Schema)."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Tasks",
      "item": [
        {
          "name": "Create image task",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Same key and body within 24 hours returns the first result."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/tasks",
              "host": ["{{baseUrl}}"],
              "path": ["v1", "tasks"]
            },
            "description": "$0.020 per image. Returns the task at once with status queued.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"model\": \"image/demo-1\",\n  \"input\": {\n    \"prompt\": \"Product photo of a blue ceramic mug\",\n    \"size\": \"1024x1024\",\n    \"n\": 2\n  },\n  \"customer\": \"client-0482\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Create video task",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Same key and body within 24 hours returns the first result."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/tasks",
              "host": ["{{baseUrl}}"],
              "path": ["v1", "tasks"]
            },
            "description": "$0.100 per second.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"model\": \"video/demo-1\",\n  \"input\": {\n    \"prompt\": \"Slow push-in on a cup of coffee\",\n    \"duration\": 5,\n    \"aspect_ratio\": \"16:9\"\n  },\n  \"customer\": \"client-0482\",\n  \"webhook_url\": \"https://example.com/hooks/tovano\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Create speech task",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Same key and body within 24 hours returns the first result."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/tasks",
              "host": ["{{baseUrl}}"],
              "path": ["v1", "tasks"]
            },
            "description": "$0.030 per 1,000 characters.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"model\": \"audio/demo-tts-1\",\n  \"input\": {\n    \"text\": \"Your order has shipped and will arrive on Thursday.\",\n    \"voice\": \"leo\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Run agent job (Ad Kit)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Same key and body within 24 hours returns the first result."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/tasks",
              "host": ["{{baseUrl}}"],
              "path": ["v1", "tasks"]
            },
            "description": "Two steps (copy, image), each charged on its own.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"model\": \"agent/ad-kit-1\",\n  \"input\": {\n    \"product\": \"Insulated steel water bottle, 750 ml\",\n    \"audience\": \"commuters\",\n    \"tone\": \"plain\"\n  },\n  \"customer\": \"client-0482\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Get a task",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/tasks/{{taskId}}",
              "host": ["{{baseUrl}}"],
              "path": ["v1", "tasks", "{{taskId}}"]
            },
            "description": "Status, output, units and charged_micro. Failed tasks are not charged."
          },
          "response": []
        },
        {
          "name": "List tasks",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/tasks?status=completed&customer=client-0482&limit=20",
              "host": ["{{baseUrl}}"],
              "path": ["v1", "tasks"],
              "query": [
                {
                  "key": "status",
                  "value": "completed"
                },
                {
                  "key": "customer",
                  "value": "client-0482"
                },
                {
                  "key": "limit",
                  "value": "20"
                }
              ]
            },
            "description": "Filter by status, model, customer. Page with cursor."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Chat",
      "item": [
        {
          "name": "Chat completion",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Tovano-Customer",
                "value": "client-0482"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/chat/completions",
              "host": ["{{baseUrl}}"],
              "path": ["v1", "chat", "completions"]
            },
            "description": "Chat completions format. $1.00 / 1M input, $4.00 / 1M output tokens.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"model\": \"text/demo-chat-1\",\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You write short, factual product descriptions.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"Describe an insulated steel water bottle in two sentences.\"\n    }\n  ],\n  \"max_tokens\": 200\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "name": "Chat completion (stream)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/chat/completions",
              "host": ["{{baseUrl}}"],
              "path": ["v1", "chat", "completions"]
            },
            "description": "Server-sent events. The last chunk carries usage and tovano.charged_micro.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"model\": \"text/demo-chat-1\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Three captions for a mug ad\"\n    }\n  ],\n  \"stream\": true,\n  \"stream_options\": {\n    \"include_usage\": true\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Account",
      "item": [
        {
          "name": "Balance",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/balance",
              "host": ["{{baseUrl}}"],
              "path": ["v1", "balance"]
            },
            "description": "balance_micro, reserved_micro, available_micro, spend limit."
          },
          "response": []
        },
        {
          "name": "Usage by customer",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/usage?group_by=customer",
              "host": ["{{baseUrl}}"],
              "path": ["v1", "usage"],
              "query": [
                {
                  "key": "group_by",
                  "value": "customer"
                }
              ]
            },
            "description": "Spend per end customer this month. group_by: model, customer, day, project, key."
          },
          "response": []
        },
        {
          "name": "Usage by model",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/usage?group_by=model&from=2026-11-01&to=2026-11-30",
              "host": ["{{baseUrl}}"],
              "path": ["v1", "usage"],
              "query": [
                {
                  "key": "group_by",
                  "value": "model"
                },
                {
                  "key": "from",
                  "value": "2026-11-01"
                },
                {
                  "key": "to",
                  "value": "2026-11-30"
                }
              ]
            },
            "description": "from and to are inclusive dates."
          },
          "response": []
        }
      ]
    }
  ],
  "event": [
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "exec": [
          "// Keep the last task id for 'Get a task'.",
          "try { const b = pm.response.json(); if (b && typeof b.id === 'string' && b.id.startsWith('tsk_')) pm.collectionVariables.set('taskId', b.id); } catch (e) {}"
        ]
      }
    }
  ]
}
