Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-GitHits-Client-Name
string

Optional client attribution: trimmed printable ASCII, at most 80 bytes. Invalid optional values are dropped.

X-GitHits-Client-Version
string

Optional client-version attribution: trimmed printable ASCII, at most 80 bytes. Invalid optional values are dropped.

X-GitHits-Agent
string

Optional agent attribution: trimmed printable ASCII, at most 160 bytes. Invalid optional values are dropped.

X-GitHits-Session-ID
string

Optional session attribution: trimmed printable ASCII, at most 128 bytes. Invalid optional values are dropped; no session is created.

Body

application/json

Generate one full markdown result; unknown or duplicate JSON keys are rejected.

query
string
required

Programming task to demonstrate, such as reading a JSON file in Rust. Must be nonblank and at most 8192 Unicode scalar values; text is preserved exactly.

Required string length: 1 - 8192
Example:

"Read a JSON file in Rust"

language
string | null

Optional nonblank language name or alias; inferred upstream when omitted/null.

Minimum string length: 1
Example:

"rust"

license_mode
enum<string>
default:strict

License policy for source examples: strict (default) applies the strict filter, custom uses your account policy, and yolo disables license filtering.

Available options:
strict,
yolo,
custom

Response

Full markdown with saved solution identity and source evidence completeness.

Unaltered markdown with its saved solution and source-evidence completeness.

result
string
required

Full generated Markdown, including source references, license attribution and the saved-solution link.

search_status
enum<string>
required

Whether the source search was complete or degraded. A degraded search means some source information was unavailable; generation still succeeded.

Available options:
complete,
degraded
solution_id
string<uuid>
required

Identifier of the saved example linked in the Markdown footer. Use this as solution_id with POST /v1/feedback to rate the example.