OpenAI is partnering with Hacktron to find vulnerabilities in its systems. Read the announcement.

Skip to content Hacktron Sign in [S]
Hacktron Sign in [S] Customers Docs Contact Sign in

List cost estimations

1 min
, View, ChatGPT, Claude, Perplexity, OpenAPI

Copy page

List cost estimations

View MarkdownOpen in ChatGPTOpen in ClaudeOpen in PerplexityDownload OpenAPI

Returns your organisation’s cost estimations, most recent first. Page through them with offset-based pagination.

Note

Unlike most list endpoints, cost estimations use offset-based pagination (limit and offset) instead of page and limit. Pagination, filtering, and sorting covers the general conventions.

Request

GET /cost-estimations

Send an API key with the read scope in the X-Api-Key header.

Query parameters

ParameterDescription
limit
number
offset
number

Responses

200 OK

FieldDescription
data
array of object, required
data[].id
string, required
Estimation UUID.
data[].organization_id
string, required
Organization UUID.
data[].user_id
string, required
User UUID.
data[].name
string
Friendly name for this estimation.
data[].task_id
string, required
Task identifier.
data[].status
string, required
Estimation status. One of pending, running, completed, partial, or failed.
data[].repos
array of object, required
Input repositories.
data[].repos[].source
string
Source type. One of connected, public, or upload.
data[].repos[].repo_url
string
Repository URL.
data[].repos[].branch
string
Branch name.
data[].repos[].commit_sha
string
Resolved commit SHA.
data[].repos[].archive_id
string
Archive ID (for upload sources).
data[].total_credits
number
Total estimated credits across all repos.
data[].repo_results
array of object
Per-repo estimation results.
data[].repo_results[].repo_url
string, required
Repository URL.
data[].repo_results[].branch
string
Branch name.
data[].repo_results[].commit_sha
string
Commit SHA.
data[].repo_results[].status
string, required
Result status. One of completed or failed.
data[].repo_results[].from_cache
boolean, required
Whether result was served from cache.
data[].repo_results[].applications
array of object
Detected applications.
data[].repo_results[].applications[].app_name
string, required
Application name.
data[].repo_results[].applications[].app_root_path
string, required
Application root path.
data[].repo_results[].applications[].architecture
string
Architecture description.
data[].repo_results[].credits
number
Estimated credits for this repo.
data[].repo_results[].error
string
Error message (when status is failed).
data[].repo_results[].failure_reason
string
Structured failure reason. One of unsupported_language or scope_no_match.
data[].repo_results[].unsupported_languages
array of string
Detected unsupported languages among the top languages.
data[].repo_results[].scoped_file_count
number
Files that matched the repository’s whitebox scope rules, counted on disk before analysis. Absent for unscoped repositories.
data[].repo_results[].lines_of_code
number
Non-blank lines of code in the files the engine indexes.
data[].repo_results[].code_bytes
number
Non-whitespace bytes of code used to calculate the quote.
data[].repo_results[].loc_tree
object
Lines of code and allocated credits per folder.
data[].repo_results[].loc_tree.name
string, required
Folder name.
data[].repo_results[].loc_tree.path
string, required
Folder path from the repository root; surplus subfolders fold into a row whose path ends in an ellipsis.
data[].repo_results[].loc_tree.loc
number, required
Non-blank lines of code in the folder, including subfolders.
data[].repo_results[].loc_tree.code_bytes
number
Non-whitespace bytes of code in the folder, including subfolders.
data[].repo_results[].loc_tree.credits
number
Credits allocated to the folder; subfolders share them by bytes and the folder’s own files keep the rest, so they can add up to less.
data[].repo_results[].loc_tree.children
array of object, required
Subfolders, largest first. Each child has the same fields as loc_tree.
data[].error
string
Error message.
data[].triage_required
boolean, required
Whether human triage is mandatory for a scan of this estimation (large app, above the predicted-cost threshold). The customer cannot opt out when true.
data[].triage_fee_credits
number, required
Triage fee in credits (a percentage of the scan base credits) added when triage is enabled.
data[].created_at
string (date-time), required
Timestamp when estimation was created.
data[].updated_at
string (date-time), required
Timestamp when estimation was last updated.
total
number, required
[↓] [↑] [enter] to visit
Menu
[M]
Next in menu
[J]
Previous in menu
[K]
Find
[F]
Ask
[A]
Sign in
[S]
Copy page
[C]
Listen
[L]
Justification
[R]
Language
[G]
Dark mode
[D]
High contrast
[H]
Shortcuts
[I]
Close
[Esc]