fusionkit
API referencev1

Execute a model-fusion harness task

FusionKit calls this HTTP/JSON seam to ask a harness executor to run a coding task and return persisted JSON Schema audit records.

POST
/v1/harness-executions

Request Body

application/jsonRequired
request_idRequiredstring
task_idRequiredstring
source_repoRequiredstring
base_git_shaRequiredstring
Pattern: "^[0-9a-f]{40}$"
harness_kindRequiredstring
prompt_hashRequiredstring
Pattern: "^sha256:[0-9a-f]{64}$"
allowed_toolsRequiredarray<string>
side_effectsRequiredstring
harness_run_requestRequiredobject

Response Body

Harness execution completed or reached a terminal skipped/failed status.

TypeScript Definitions

Use the response body type in TypeScript.

request_idRequiredstring
result_idRequiredstring
statusRequiredstring
candidate_idsRequiredarray<string>
artifactsarray<object>
harness_run_resultRequiredobject

Invalid request shape or unsupported harness contract.

TypeScript Definitions

Use the response body type in TypeScript.

errorRequiredstring
codestring

Executor is unavailable or missing explicitly requested live credentials.

TypeScript Definitions

Use the response body type in TypeScript.

errorRequiredstring
codestring
curl -X POST "https://example.com/v1/harness-executions" \
  -H "Content-Type: application/json" \
  -d '{
    "request_id": "string",
    "task_id": "string",
    "source_repo": "string",
    "base_git_sha": "string",
    "harness_kind": "string",
    "prompt_hash": "string",
    "allowed_tools": [
      "string"
    ],
    "side_effects": "string",
    "harness_run_request": {
      "schema": "harness-run-request.v1",
      "schema_version": "v1",
      "schema_bundle_hash": "string",
      "persisted_json": {}
    }
  }'
const body = JSON.stringify({
  "request_id": "string",
  "task_id": "string",
  "source_repo": "string",
  "base_git_sha": "string",
  "harness_kind": "string",
  "prompt_hash": "string",
  "allowed_tools": [
    "string"
  ],
  "side_effects": "string",
  "harness_run_request": {
    "schema": "harness-run-request.v1",
    "schema_version": "v1",
    "schema_bundle_hash": "string",
    "persisted_json": {}
  }
})

fetch("https://example.com/v1/harness-executions", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://example.com/v1/harness-executions"
  body := strings.NewReader(`{
    "request_id": "string",
    "task_id": "string",
    "source_repo": "string",
    "base_git_sha": "string",
    "harness_kind": "string",
    "prompt_hash": "string",
    "allowed_tools": [
      "string"
    ],
    "side_effects": "string",
    "harness_run_request": {
      "schema": "harness-run-request.v1",
      "schema_version": "v1",
      "schema_bundle_hash": "string",
      "persisted_json": {}
    }
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/v1/harness-executions"
body = {
  "request_id": "string",
  "task_id": "string",
  "source_repo": "string",
  "base_git_sha": "string",
  "harness_kind": "string",
  "prompt_hash": "string",
  "allowed_tools": [
    "string"
  ],
  "side_effects": "string",
  "harness_run_request": {
    "schema": "harness-run-request.v1",
    "schema_version": "v1",
    "schema_bundle_hash": "string",
    "persisted_json": {}
  }
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
{
  "request_id": "string",
  "result_id": "string",
  "status": "string",
  "candidate_ids": [
    "string"
  ],
  "artifacts": [
    {
      "artifact_id": "string",
      "kind": "string",
      "hash": "string",
      "redaction_status": "synthetic"
    }
  ],
  "harness_run_result": {
    "schema": "harness-run-request.v1",
    "schema_version": "v1",
    "schema_bundle_hash": "string",
    "persisted_json": {}
  }
}
{
  "error": "string",
  "code": "string"
}
{
  "error": "string",
  "code": "string"
}