All URIs are relative to https://api.reveng.ai
| Method | HTTP request | Description |
|---|---|---|
| create_ai_decompilation | POST /v3/functions/{function_id}/ai-decompilation | Start AI decompilation |
| delete_ai_decompilation_inline_comment | DELETE /v3/functions/{function_id}/ai-decompilation/inline-comments/{line} | Delete a single inline comment |
| get_ai_decompilation | GET /v3/functions/{function_id}/ai-decompilation | Get AI decompilation result |
| get_ai_decompilation_inline_comments | GET /v3/functions/{function_id}/ai-decompilation/inline-comments | Get AI decompilation inline comments |
| get_ai_decompilation_inline_comments_status | GET /v3/functions/{function_id}/ai-decompilation/inline-comments/status | Get inline comments generation workflow status |
| get_ai_decompilation_rating | GET /v2/functions/{function_id}/ai-decompilation/rating | Get rating for AI decompilation |
| get_ai_decompilation_status | GET /v3/functions/{function_id}/ai-decompilation/status | Get AI decompilation workflow status |
| get_ai_decompilation_summary | GET /v3/functions/{function_id}/ai-decompilation/summary | Get AI decompilation summary |
| get_ai_decompilation_summary_status | GET /v3/functions/{function_id}/ai-decompilation/summary/status | Get summary generation workflow status |
| patch_ai_decompilation_inline_comment | PATCH /v3/functions/{function_id}/ai-decompilation/inline-comments | Update a single inline comment |
| regenerate_ai_decompilation_inline_comments | POST /v3/functions/{function_id}/ai-decompilation/inline-comments | Regenerate AI decompilation inline comments |
| regenerate_ai_decompilation_summary | POST /v3/functions/{function_id}/ai-decompilation/summary | Regenerate AI decompilation summary |
| stream_ai_decompilation | GET /v3/functions/{function_id}/ai-decompilation/events | Stream live AI decompilation output (SSE) |
| upsert_ai_decompilation_rating | PATCH /v2/functions/{function_id}/ai-decompilation/rating | Upsert rating for AI decompilation |
| v3_accept_ai_decompilation_type_suggestions | POST /v3/functions/{function_id}/ai-decompilation/type-suggestions/accept | Accept AI decompilation type suggestions |
| v3_get_ai_decompilation_line_attributions | GET /v3/functions/{function_id}/ai-decompilation/line-attributions | Get AI decompilation line attributions |
| v3_get_ai_decompilation_rating | GET /v3/functions/{function_id}/ai-decompilation/rating | Get AI decompilation rating |
| v3_get_ai_decompilation_tokens | GET /v3/functions/{function_id}/ai-decompilation/tokens | Get AI decompilation tokens and user overrides |
| v3_get_ai_decompilation_type_suggestions | GET /v3/functions/{function_id}/ai-decompilation/type-suggestions | Get AI decompilation type suggestions |
| v3_get_ai_decompilation_type_suggestions_status | GET /v3/functions/{function_id}/ai-decompilation/type-suggestions/status | Get type suggestion workflow status |
| v3_regenerate_ai_decompilation_type_suggestions | POST /v3/functions/{function_id}/ai-decompilation/type-suggestions | Regenerate AI decompilation type suggestions |
| v3_upsert_ai_decompilation_overrides | PATCH /v3/functions/{function_id}/ai-decompilation/overrides | Upsert variable/function name overrides |
| v3_upsert_ai_decompilation_rating | PATCH /v3/functions/{function_id}/ai-decompilation/rating | Upsert AI decompilation rating |
CreateAIDecompOutputBody create_ai_decompilation(function_id, temperature=temperature, type_suggestions=type_suggestions, naming=naming, apply_types=apply_types, repair=repair, refine=refine)
Start AI decompilation
Begins the AI decompilation process for a function. Charges team credits and starts the workflow. Replacing an existing completed decompilation requires write access to the analysis; any caller with read access can decompile a function that has no completed result.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found400BAD_REQUEST— Bad Request409CONFLICT— Conflict402INSUFFICIENT_CREDITS— Insufficient Credits
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.create_ai_decomp_output_body import CreateAIDecompOutputBody
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
temperature = -1 # float | LLM temperature (0.0-1.0). Overrides the server default when set. Omit or set to -1 to use the server default. (optional) (default to -1)
type_suggestions = True # bool | Ask the language model to name the suggested types and their members. Set to false to skip the model call; the statically derived layouts are still computed and stored. Cannot re-enable the pass when the server has it off. (optional) (default to True)
naming = True # bool | Ask the language model to name the placeholder variables. Set to false to skip the model call; the generic names are kept. Cannot re-enable the pass when the server has it off. (optional) (default to True)
apply_types = True # bool | Store the suggested types as data types of this function's analysis, with a source_type of AI_DECOMP. Set to false to leave them as suggestions only. Cannot re-enable the pass when the server has it off. (optional) (default to True)
repair = False # bool | Ask a language model to replace any unmatched placeholders left in the decompilation with grounded code. Off unless requested: the pass spends several model calls on top of the decompilation, and declines outright unless it can ground every placeholder. Runs after the result is stored, so it amends a decompilation you can already read. Cannot enable the pass when the server has it off. (optional) (default to False)
refine = False # bool | Ask a language model to rebuild output the decompiler returned degenerate, truncated or empty, and output a requested repair pass declined. Off unless requested: the pass is a bounded tool loop that can spend a dozen model calls. Runs after the result is stored, so it amends a decompilation you can already read. Cannot enable the pass when the server has it off. (optional) (default to False)
try:
# Start AI decompilation
api_response = api_instance.create_ai_decompilation(function_id, temperature=temperature, type_suggestions=type_suggestions, naming=naming, apply_types=apply_types, repair=repair, refine=refine)
print("The response of FunctionsAIDecompilationApi->create_ai_decompilation:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->create_ai_decompilation: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID | |
| temperature | float | LLM temperature (0.0-1.0). Overrides the server default when set. Omit or set to -1 to use the server default. | [optional] [default to -1] |
| type_suggestions | bool | Ask the language model to name the suggested types and their members. Set to false to skip the model call; the statically derived layouts are still computed and stored. Cannot re-enable the pass when the server has it off. | [optional] [default to True] |
| naming | bool | Ask the language model to name the placeholder variables. Set to false to skip the model call; the generic names are kept. Cannot re-enable the pass when the server has it off. | [optional] [default to True] |
| apply_types | bool | Store the suggested types as data types of this function's analysis, with a source_type of AI_DECOMP. Set to false to leave them as suggestions only. Cannot re-enable the pass when the server has it off. | [optional] [default to True] |
| repair | bool | Ask a language model to replace any unmatched placeholders left in the decompilation with grounded code. Off unless requested: the pass spends several model calls on top of the decompilation, and declines outright unless it can ground every placeholder. Runs after the result is stored, so it amends a decompilation you can already read. Cannot enable the pass when the server has it off. | [optional] [default to False] |
| refine | bool | Ask a language model to rebuild output the decompiler returned degenerate, truncated or empty, and output a requested repair pass declined. Off unless requested: the pass is a bounded tool loop that can spend a dozen model calls. Runs after the result is stored, so it amends a decompilation you can already read. Cannot enable the pass when the server has it off. | [optional] [default to False] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Created | - |
| 400 | Bad Request | - |
| 402 | Payment Required | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 409 | Conflict | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CommentsData delete_ai_decompilation_inline_comment(function_id, line)
Delete a single inline comment
Removes the comment for the given line number. Requires write access to the analysis and comments to have been generated first.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.comments_data import CommentsData
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
line = 56 # int | Line number of the comment to delete
try:
# Delete a single inline comment
api_response = api_instance.delete_ai_decompilation_inline_comment(function_id, line)
print("The response of FunctionsAIDecompilationApi->delete_ai_decompilation_inline_comment:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->delete_ai_decompilation_inline_comment: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID | |
| line | int | Line number of the comment to delete |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DecompilationData get_ai_decompilation(function_id)
Get AI decompilation result
Returns the decompilation source code.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found500INTERNAL_ERROR— Internal Server Error
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.decompilation_data import DecompilationData
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
try:
# Get AI decompilation result
api_response = api_instance.get_ai_decompilation(function_id)
print("The response of FunctionsAIDecompilationApi->get_ai_decompilation:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->get_ai_decompilation: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CommentsData get_ai_decompilation_inline_comments(function_id)
Get AI decompilation inline comments
Returns the commented source if available. Returns pending status if comments are still being generated.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.comments_data import CommentsData
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
try:
# Get AI decompilation inline comments
api_response = api_instance.get_ai_decompilation_inline_comments(function_id)
print("The response of FunctionsAIDecompilationApi->get_ai_decompilation_inline_comments:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->get_ai_decompilation_inline_comments: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkflowProgress get_ai_decompilation_inline_comments_status(function_id)
Get inline comments generation workflow status
Returns fine-grained progress of the inline comments generation workflow.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.workflow_progress import WorkflowProgress
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
try:
# Get inline comments generation workflow status
api_response = api_instance.get_ai_decompilation_inline_comments_status(function_id)
print("The response of FunctionsAIDecompilationApi->get_ai_decompilation_inline_comments_status:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->get_ai_decompilation_inline_comments_status: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BaseResponseUnionGetAiDecompilationRatingResponseNoneType get_ai_decompilation_rating(function_id)
Get rating for AI decompilation
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.base_response_union_get_ai_decompilation_rating_response_none_type import BaseResponseUnionGetAiDecompilationRatingResponseNoneType
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | The ID of the function for which to get the rating
try:
# Get rating for AI decompilation
api_response = api_instance.get_ai_decompilation_rating(function_id)
print("The response of FunctionsAIDecompilationApi->get_ai_decompilation_rating:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->get_ai_decompilation_rating: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | The ID of the function for which to get the rating |
BaseResponseUnionGetAiDecompilationRatingResponseNoneType
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Invalid request parameters | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkflowProgress get_ai_decompilation_status(function_id)
Get AI decompilation workflow status
Returns fine-grained progress of the running workflow including current step, total steps, and messages. Falls back to the database task status when no workflow is running.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.workflow_progress import WorkflowProgress
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
try:
# Get AI decompilation workflow status
api_response = api_instance.get_ai_decompilation_status(function_id)
print("The response of FunctionsAIDecompilationApi->get_ai_decompilation_status:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->get_ai_decompilation_status: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SummaryData get_ai_decompilation_summary(function_id)
Get AI decompilation summary
Returns the summary if available. Returns pending status if summary is still being generated.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.summary_data import SummaryData
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
try:
# Get AI decompilation summary
api_response = api_instance.get_ai_decompilation_summary(function_id)
print("The response of FunctionsAIDecompilationApi->get_ai_decompilation_summary:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->get_ai_decompilation_summary: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkflowProgress get_ai_decompilation_summary_status(function_id)
Get summary generation workflow status
Returns fine-grained progress of the summary generation workflow.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.workflow_progress import WorkflowProgress
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
try:
# Get summary generation workflow status
api_response = api_instance.get_ai_decompilation_summary_status(function_id)
print("The response of FunctionsAIDecompilationApi->get_ai_decompilation_summary_status:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->get_ai_decompilation_summary_status: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CommentsData patch_ai_decompilation_inline_comment(function_id, patch_comment_body)
Update a single inline comment
Merges a single line comment into the existing AI-generated inline comments. Requires write access to the analysis and comments to have been generated first.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.comments_data import CommentsData
from revengai.models.patch_comment_body import PatchCommentBody
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
patch_comment_body = revengai.PatchCommentBody() # PatchCommentBody |
try:
# Update a single inline comment
api_response = api_instance.patch_ai_decompilation_inline_comment(function_id, patch_comment_body)
print("The response of FunctionsAIDecompilationApi->patch_ai_decompilation_inline_comment:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->patch_ai_decompilation_inline_comment: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID | |
| patch_comment_body | PatchCommentBody |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RegenerateOutputBody regenerate_ai_decompilation_inline_comments(function_id)
Regenerate AI decompilation inline comments
Starts a new inline comments generation workflow for the function. Requires write access to the analysis and an existing decompilation with a summary. Rejected while a decompilation is running: its naming and type-suggestion passes are still changing the identifiers the comments would reference. Poll the inline comments status endpoint, which reports PENDING until then.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found400BAD_REQUEST— Bad Request409CONFLICT— Conflict
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.regenerate_output_body import RegenerateOutputBody
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
try:
# Regenerate AI decompilation inline comments
api_response = api_instance.regenerate_ai_decompilation_inline_comments(function_id)
print("The response of FunctionsAIDecompilationApi->regenerate_ai_decompilation_inline_comments:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->regenerate_ai_decompilation_inline_comments: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 202 | Accepted | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 409 | Conflict | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RegenerateOutputBody regenerate_ai_decompilation_summary(function_id)
Regenerate AI decompilation summary
Starts a new summary generation workflow for the function. Requires write access to the analysis and an existing decompilation. Rejected while a decompilation is running: its naming and type-suggestion passes are still changing the identifiers a summary would describe. Poll the summary status endpoint, which reports PENDING until then.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found409CONFLICT— Conflict
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.regenerate_output_body import RegenerateOutputBody
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
try:
# Regenerate AI decompilation summary
api_response = api_instance.regenerate_ai_decompilation_summary(function_id)
print("The response of FunctionsAIDecompilationApi->regenerate_ai_decompilation_summary:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->regenerate_ai_decompilation_summary: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 202 | Accepted | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 409 | Conflict | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[StreamAiDecompilation200ResponseInner] stream_ai_decompilation(function_id)
Stream live AI decompilation output (SSE)
Opens a Server-Sent Events stream of incremental decompilation events for the given function. Each event has a type discriminator (also used as the SSE event: line) and a per-attempt monotonic seq.
Terminal events — the stream closes on these: names_finished (success) and decomp_failed (all retries exhausted). names_finished is published on every success path, including when the naming pass is disabled, produces nothing, or fails, so a successful run always closes.
decomp_finished is NOT terminal. It marks the end of the model call, not the end of the run: entity restore, the result write, the placeholder-naming pass and the type-suggestion pass all follow it, and the last two rewrite the identifiers the source renders with. Reading the decompilation at decomp_finished therefore returns names that are about to change — wait for names_finished. attempt_failed is per-attempt and non-terminal too: Temporal may retry, and clients disambiguate on attempt, which they should treat as a reset signal.
last_event_id is not supported — clients fall back to polling the standard GET endpoint after the stream ends.
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.stream_ai_decompilation200_response_inner import StreamAiDecompilation200ResponseInner
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
try:
# Stream live AI decompilation output (SSE)
api_response = api_instance.stream_ai_decompilation(function_id)
print("The response of FunctionsAIDecompilationApi->stream_ai_decompilation:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->stream_ai_decompilation: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID |
List[StreamAiDecompilation200ResponseInner]
- Content-Type: Not defined
- Accept: text/event-stream, application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BaseResponse upsert_ai_decompilation_rating(function_id, upsert_ai_decomplation_rating_request)
Upsert rating for AI decompilation
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.base_response import BaseResponse
from revengai.models.upsert_ai_decomplation_rating_request import UpsertAiDecomplationRatingRequest
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | The ID of the function being rated
upsert_ai_decomplation_rating_request = revengai.UpsertAiDecomplationRatingRequest() # UpsertAiDecomplationRatingRequest |
try:
# Upsert rating for AI decompilation
api_response = api_instance.upsert_ai_decompilation_rating(function_id, upsert_ai_decomplation_rating_request)
print("The response of FunctionsAIDecompilationApi->upsert_ai_decompilation_rating:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->upsert_ai_decompilation_rating: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | The ID of the function being rated | |
| upsert_ai_decomplation_rating_request | UpsertAiDecomplationRatingRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Successful Response | - |
| 422 | Invalid request parameters | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AcceptTypeSuggestionsOutputBody v3_accept_ai_decompilation_type_suggestions(function_id, accept_type_suggestions_input_body)
Accept AI decompilation type suggestions
Stores the named type suggestions as data types of this function's analysis, with a source_type of AI_DECOMP and this function as their source_function_id.
Each suggestion is stored as the type suggestions endpoint renders it: a STRUCT where members were placed and a TYPEDEF where the suggestion is a name for a scalar. A suggestion nothing gave a shape to is left out, so accepted can be shorter than the keys requested. A member with no offset or width is left out and counted in skipped_members. A type expression a member names is matched against the analysis by name alone and created where nothing matches: char * creates a char BASE type and a POINTER type pointing at it, reusing either where the analysis already holds it. A member naming another suggestion accepted by the same request resolves to it. Only a trailing * is taken apart, so a name like int & stands for one type.
No size is stored: the widths a suggestion carries are lower bounds rather than the type's own. A suggestion the analysis already holds a type of that name and kind for resolves to it, so repeating a request stores nothing further.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found400BAD_REQUEST— Bad Request409CONFLICT— Conflict422VALIDATION_FAILED— Validation Failed500INTERNAL_ERROR— Internal Server Error
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.accept_type_suggestions_input_body import AcceptTypeSuggestionsInputBody
from revengai.models.accept_type_suggestions_output_body import AcceptTypeSuggestionsOutputBody
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
accept_type_suggestions_input_body = revengai.AcceptTypeSuggestionsInputBody() # AcceptTypeSuggestionsInputBody |
try:
# Accept AI decompilation type suggestions
api_response = api_instance.v3_accept_ai_decompilation_type_suggestions(function_id, accept_type_suggestions_input_body)
print("The response of FunctionsAIDecompilationApi->v3_accept_ai_decompilation_type_suggestions:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->v3_accept_ai_decompilation_type_suggestions: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID | |
| accept_type_suggestions_input_body | AcceptTypeSuggestionsInputBody |
AcceptTypeSuggestionsOutputBody
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 409 | Conflict | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LineAttributionsData v3_get_ai_decompilation_line_attributions(function_id)
Get AI decompilation line attributions
Returns the correspondence between the function's disassembly line numbers and its AI-decompilation line numbers, grouped by disassembly line. Both sides are 0-indexed and the correspondence has a many-to-many relationship. The mapping is empty until a completed run has produced one, and is empty for a run that produced none.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found500INTERNAL_ERROR— Internal Server Error
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.line_attributions_data import LineAttributionsData
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
try:
# Get AI decompilation line attributions
api_response = api_instance.v3_get_ai_decompilation_line_attributions(function_id)
print("The response of FunctionsAIDecompilationApi->v3_get_ai_decompilation_line_attributions:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->v3_get_ai_decompilation_line_attributions: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RatingOutputBody v3_get_ai_decompilation_rating(function_id)
Get AI decompilation rating
Returns the caller's rating and reason for a function's AI decompilation, or null fields when they have not rated it yet.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found500INTERNAL_ERROR— Internal Server Error
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.rating_output_body import RatingOutputBody
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
try:
# Get AI decompilation rating
api_response = api_instance.v3_get_ai_decompilation_rating(function_id)
print("The response of FunctionsAIDecompilationApi->v3_get_ai_decompilation_rating:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->v3_get_ai_decompilation_rating: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetTokensResponse v3_get_ai_decompilation_tokens(function_id)
Get AI decompilation tokens and user overrides
Returns the tokenised AI-decompilation source, the value each token resolves to, and the user's overrides as a separate unmerged map. The source is empty and the overrides are null until a run has succeeded.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found500INTERNAL_ERROR— Internal Server Error
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.get_tokens_response import GetTokensResponse
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
try:
# Get AI decompilation tokens and user overrides
api_response = api_instance.v3_get_ai_decompilation_tokens(function_id)
print("The response of FunctionsAIDecompilationApi->v3_get_ai_decompilation_tokens:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->v3_get_ai_decompilation_tokens: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TypeSuggestionsData v3_get_ai_decompilation_type_suggestions(function_id)
Get AI decompilation type suggestions
Returns the aggregate types the AI decompilation inferred for this function: a suggested name for each type and each of its members, the members' offsets and widths, and the gaps between them. Members revealed only by a caller or callee are included and marked by origin, as are members the model placed rather than observed. Nothing here is a data type row — these are proposals, and creating a row from one is the client's call. The list is empty until a run has produced suggestions, which is ordinary and not an error.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found500INTERNAL_ERROR— Internal Server Error
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.type_suggestions_data import TypeSuggestionsData
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
try:
# Get AI decompilation type suggestions
api_response = api_instance.v3_get_ai_decompilation_type_suggestions(function_id)
print("The response of FunctionsAIDecompilationApi->v3_get_ai_decompilation_type_suggestions:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->v3_get_ai_decompilation_type_suggestions: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkflowProgress v3_get_ai_decompilation_type_suggestions_status(function_id)
Get type suggestion workflow status
Returns fine-grained progress of the type suggestion workflow. Reports PENDING while a decompilation is running, because its own type-naming pass produces the same suggestions.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.workflow_progress import WorkflowProgress
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
try:
# Get type suggestion workflow status
api_response = api_instance.v3_get_ai_decompilation_type_suggestions_status(function_id)
print("The response of FunctionsAIDecompilationApi->v3_get_ai_decompilation_type_suggestions_status:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->v3_get_ai_decompilation_type_suggestions_status: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RegenerateOutputBody v3_regenerate_ai_decompilation_type_suggestions(function_id, apply_types=apply_types)
Regenerate AI decompilation type suggestions
Starts a new type suggestion workflow for the function, discarding the suggestions already stored. Requires write access to the analysis and a successful decompilation; it re-runs only the type-naming pass, so it costs no decompilation credit. The regenerated types are stored as data types of the analysis unless apply_types=false; types a previous run stored are not removed. Rejected while a decompilation is running: it runs the same pass itself once its output settles. Poll the type-suggestions status endpoint, which reports PENDING until then, and read the result from the type-suggestions endpoint.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found409CONFLICT— Conflict500INTERNAL_ERROR— Internal Server Error
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.regenerate_output_body import RegenerateOutputBody
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
apply_types = True # bool | Store the regenerated types as data types of this function's analysis, with a source_type of AI_DECOMP. Set to false to leave them as suggestions only. Cannot re-enable the pass when the server has it off. (optional) (default to True)
try:
# Regenerate AI decompilation type suggestions
api_response = api_instance.v3_regenerate_ai_decompilation_type_suggestions(function_id, apply_types=apply_types)
print("The response of FunctionsAIDecompilationApi->v3_regenerate_ai_decompilation_type_suggestions:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->v3_regenerate_ai_decompilation_type_suggestions: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID | |
| apply_types | bool | Store the regenerated types as data types of this function's analysis, with a source_type of AI_DECOMP. Set to false to leave them as suggestions only. Cannot re-enable the pass when the server has it off. | [optional] [default to True] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 202 | Accepted | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 409 | Conflict | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpsertOverridesData v3_upsert_ai_decompilation_overrides(function_id, upsert_overrides_input_body)
Upsert variable/function name overrides
Applies user-provided name overrides to placeholder tokens in the decompilation. Requires write access to the analysis.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found400BAD_REQUEST— Bad Request500INTERNAL_ERROR— Internal Server Error
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.upsert_overrides_data import UpsertOverridesData
from revengai.models.upsert_overrides_input_body import UpsertOverridesInputBody
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
upsert_overrides_input_body = revengai.UpsertOverridesInputBody() # UpsertOverridesInputBody |
try:
# Upsert variable/function name overrides
api_response = api_instance.v3_upsert_ai_decompilation_overrides(function_id, upsert_overrides_input_body)
print("The response of FunctionsAIDecompilationApi->v3_upsert_ai_decompilation_overrides:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->v3_upsert_ai_decompilation_overrides: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID | |
| upsert_overrides_input_body | UpsertOverridesInputBody |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
v3_upsert_ai_decompilation_rating(function_id, upsert_rating_input_body)
Upsert AI decompilation rating
Records the caller's rating and optional reason for a function's AI decompilation, replacing any they recorded before. Requires an existing decompilation.
Error codes:
403ACCESS_DENIED— Access Denied404NOT_FOUND— Not Found500INTERNAL_ERROR— Internal Server Error
- Api Key Authentication (APIKey):
- Bearer Authentication (bearerAuth):
import revengai
from revengai.models.upsert_rating_input_body import UpsertRatingInputBody
from revengai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.reveng.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = revengai.Configuration(
host = "https://api.reveng.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Configure Bearer authorization: bearerAuth
configuration = revengai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with revengai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = revengai.FunctionsAIDecompilationApi(api_client)
function_id = 56 # int | Function ID
upsert_rating_input_body = revengai.UpsertRatingInputBody() # UpsertRatingInputBody |
try:
# Upsert AI decompilation rating
api_instance.v3_upsert_ai_decompilation_rating(function_id, upsert_rating_input_body)
except Exception as e:
print("Exception when calling FunctionsAIDecompilationApi->v3_upsert_ai_decompilation_rating: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| function_id | int | Function ID | |
| upsert_rating_input_body | UpsertRatingInputBody |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | No Content | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Unprocessable Entity | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]