codai docs
API reference

Resolve API

Execution-verified bug fixes: submit a repo and an issue, accept the quote, get a public attestation.

Base URL https://resolve.codai.ro; the same codai_ key you use on the gateway. Private beta: public github.com repos, Python/pytest verification. No fix, no fee — a charge is written only after the attestation exists, and every money field is USD micros. Attestations are public by URL (the uuid is the capability). The error body here is { "error": "<string>" }, not the gateway envelope.

POST
/v1/resolve/jobs

Authorization

bearerAuth
AuthorizationBearer <token>

An existing codai API key. Jobs are scoped to the key's user; all keys of one user share the same limits and free tier.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Body of POST /v1/resolve/jobs. Provide issue_url or issue_text (at least one).

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/resolve/jobs" \  -H "Content-Type: application/json" \  -d '{    "repo_url": "https://github.com/psf/requests"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "status": "declined",  "decline_reason": "feature request, no testable behavior"}
GET
/v1/resolve/jobs/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

An existing codai API key. Jobs are scoped to the key's user; all keys of one user share the same limits and free tier.

In: header

Path Parameters

id*string

Job UUID returned by POST /v1/resolve/jobs.

Formatuuid

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/resolve/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "status": "triage",  "repo_url": "http://example.com",  "tier": "free",  "quote_micro_usd": 0,  "triage_reason": "string",  "decline_reason": "string",  "fail_reason": "string",  "cost_micro_usd": 0,  "attestation_id": "e21e05b4-d2f4-4bc0-ba2d-fc19366a584b",  "attestation_url": "/v1/resolve/attestations/1f2c1a3e-8d4b-4f8e-9a1b-0c2d3e4f5a6b",  "created_at": "2019-08-24T14:15:22Z",  "completed_at": "2019-08-24T14:15:22Z"}
POST
/v1/resolve/jobs/{id}/accept

Authorization

bearerAuth
AuthorizationBearer <token>

An existing codai API key. Jobs are scoped to the key's user; all keys of one user share the same limits and free tier.

In: header

Path Parameters

id*string

Job UUID returned by POST /v1/resolve/jobs.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/resolve/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08/accept"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "status": "accepted"}
GET
/v1/resolve/attestations/{id}

Path Parameters

id*string

Attestation UUID (from attestation_id on the job).

Formatuuid

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/resolve/attestations/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "kind": "codai.resolve.attestation.v0",  "repo_url": "http://example.com",  "base_commit": "3f1e2d4c5b6a798877665544332211aabbccddee",  "patch": "string",  "repro_test": {    "path": "tests/test_repro_issue_6000.py",    "content": "string"  },  "test_command": "string",  "regression_command": "string",  "test_output_before": "string",  "test_output_after": "string",  "regression_output": "string",  "runner_image_digest": "string",  "started_at": "2019-08-24T14:15:22Z",  "verified_at": "2019-08-24T14:15:22Z"}
GET
/health

Response Body

application/json

curl -X GET "https://example.com/health"
{  "ok": true,  "service": "codai-resolve"}