{"openapi":"3.1.0","info":{"title":"Internalize API","version":"1.0.0","description":"Model execution uses durable jobs. Chat Completions waits for the same jobs behind a synchronous or buffered SSE interface. Source knowledge is never injected into subsequent inference requests."},"servers":[{"url":"https://convergingthought.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Project API key. Server-side use only."}}},"paths":{"/v1/chat/completions":{"post":{"operationId":"chatCompletion","tags":["Inference"],"summary":"OpenAI-compatible text and function-call inference","description":"Requires inference scope. Omit subject_id for base inference; use subject_id or X-Internalize-Subject to route to learned weights. Buffered SSE emits only after final validation. Unsupported fields fail with 422. A 409 after admission includes job_id and status_url; inspect that job before retrying.","parameters":[{"name":"X-Internalize-Tenant","in":"header","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$"},"description":"Customer namespace. Must match tenant_id in the body and any tenant restriction on the key. Repeat on job and subject reads. Omission uses the key’s tenant or the separate project namespace."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{7,127}$"},"description":"Scoped to project + tenant. Reuse for exact retries with the same key and namespace. Reusing with changed input returns 409."},{"name":"X-Internalize-Subject","in":"header","schema":{"type":"string"},"description":"Trusted subject ID; must match subject_id when both are supplied."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"model":{"type":"string","const":"glm-5.3"},"messages":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","developer","user","assistant","tool"]},"content":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false}}]},{"type":"null"}]},"name":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$"},"arguments":{"type":"string","maxLength":16000}},"required":["name","arguments"],"additionalProperties":false}},"required":["id","type","function"],"additionalProperties":false}},"tool_call_id":{"type":"string"}},"required":["role"],"additionalProperties":false}},"subject_id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$"},"tenant_id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$"},"adapter_version":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$"},"stream":{"default":false,"type":"boolean"},"stream_options":{"type":"object","properties":{"include_usage":{"type":"boolean"}},"additionalProperties":false},"max_tokens":{"type":"integer","minimum":1,"maximum":4096},"max_completion_tokens":{"type":"integer","minimum":1,"maximum":4096},"temperature":{"default":0,"type":"number","minimum":0,"maximum":1},"n":{"type":"number","const":1},"tools":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$"},"description":{"type":"string","maxLength":8000},"parameters":{"default":{"type":"object","properties":{}},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"strict":{"type":"boolean","const":false}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false}},"tool_choice":{"anyOf":[{"type":"string","enum":["auto","none","required"]},{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$"}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false}]},"parallel_tool_calls":{"type":"boolean"},"response_format":{"type":"object","properties":{"type":{"type":"string","enum":["text","json_object"]}},"required":["type"],"additionalProperties":false}},"required":["model","messages"],"additionalProperties":false}}}},"responses":{"200":{"description":"OpenAI chat completion or buffered SSE chunks. Includes X-Internalize-Job-Id and Idempotency-Key response headers.","content":{"application/json":{"schema":{"type":"object","required":["id","object","created","model","choices","usage"],"properties":{"id":{"type":"string"},"object":{"const":"chat.completion"},"created":{"type":"integer"},"model":{"const":"glm-5.3"},"choices":{"type":"array","items":{"type":"object"}},"usage":{"type":"object"},"internalize":{"type":"object"}}}},"text/event-stream":{"schema":{"type":"string"}}}},"401":{"description":"Invalid or revoked key","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits or spending limit reached","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Insufficient scope, browser key usage, or preview-only execution","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict or expired adapter","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"413":{"description":"Request body exceeds 100,000 bytes","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Unexpected server error; preserve the request ID and operation identity","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Not configured or unavailable","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/inferences":{"post":{"operationId":"createInference","tags":["Inference"],"summary":"Run inference with the subject’s active adapter","description":"Requires inference scope. Up to 64 text/tool messages with a complete user/tool turn. Serialized messages and tools are bounded to 64,000 JavaScript string-length units. Output token usage includes reasoning; reasoning content is never returned. The submitting key can poll its own jobs.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{7,127}$"},"description":"Scoped to project + tenant. Reuse for exact retries with the same key and namespace. Reusing with changed input returns 409."},{"name":"X-Internalize-Tenant","in":"header","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$"},"description":"Customer namespace. Must match tenant_id in the body and any tenant restriction on the key. Repeat on job and subject reads. Omission uses the key’s tenant or the separate project namespace."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"subject_id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$"},"tenant_id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$"},"adapter_version":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$"},"messages":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"type":"string","maxLength":16000},"name":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$"},"tool_calls":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$"},"arguments":{"type":"string","maxLength":16000}},"required":["name","arguments"],"additionalProperties":false}},"required":["id","type","function"],"additionalProperties":false}},"tool_call_id":{"type":"string","minLength":1,"maxLength":128}},"required":["role","content"],"additionalProperties":false}},"tools":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$"},"description":{"type":"string","maxLength":8000},"parameters":{"default":{"type":"object","properties":{}},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"strict":{"type":"boolean","const":false}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false}},"tool_choice":{"anyOf":[{"type":"string","enum":["auto","none","required"]},{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$"}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false}]},"parallel_tool_calls":{"type":"boolean"},"response_format":{"type":"object","properties":{"type":{"type":"string","enum":["text","json_object"]}},"required":["type"],"additionalProperties":false},"max_output_tokens":{"default":2048,"type":"integer","minimum":1,"maximum":4096},"temperature":{"default":0,"type":"number","minimum":0,"maximum":1}},"required":["subject_id","messages"],"additionalProperties":false}}}},"responses":{"200":{"description":"Existing identical request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"status_url":{"type":"string"}},"required":["id","status_url"],"additionalProperties":false}}}},"202":{"description":"Job admitted. Follow status_url.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"status_url":{"type":"string"}},"required":["id","status_url"],"additionalProperties":false}}}},"401":{"description":"Invalid or revoked key","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits or spending limit reached","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Insufficient scope, browser key usage, or preview-only execution","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict or expired adapter","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"413":{"description":"Request body exceeds 100,000 bytes","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Unexpected server error; preserve the request ID and operation identity","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Not configured or unavailable","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/internalizations":{"post":{"operationId":"internalize","tags":["Internalize"],"summary":"Learn knowledge into a managed adapter","description":"Requires internalize scope. A ready candidate is not necessarily active; inspect result.activated and result.activation_conflict. The submitting learning key can poll its own jobs.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{7,127}$"},"description":"Scoped to project + tenant. Reuse for exact retries with the same key and namespace. Reusing with changed input returns 409."},{"name":"X-Internalize-Tenant","in":"header","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$"},"description":"Customer namespace. Must match tenant_id in the body and any tenant restriction on the key. Repeat on job and subject reads. Omission uses the key’s tenant or the separate project namespace."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"subject_id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$"},"tenant_id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$"},"content":{"type":"string","minLength":20,"maxLength":16000},"max_cost_microusd":{"type":"integer","minimum":1000000,"maximum":100000000,"description":"Maximum total charge for learning and initial 24-hour retention. Set by your application, never by model tool arguments."},"activate":{"default":true,"type":"boolean"}},"required":["subject_id","content","max_cost_microusd"],"additionalProperties":false}}}},"responses":{"200":{"description":"Existing identical request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"status_url":{"type":"string"}},"required":["id","status_url"],"additionalProperties":false}}}},"202":{"description":"Learning job admitted. Follow status_url.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"status_url":{"type":"string"}},"required":["id","status_url"],"additionalProperties":false}}}},"401":{"description":"Invalid or revoked key","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits or spending limit reached","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Insufficient scope, browser key usage, or preview-only execution","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict or expired adapter","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"413":{"description":"Request body exceeds 100,000 bytes","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Unexpected server error; preserve the request ID and operation identity","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Not configured or unavailable","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/jobs":{"get":{"operationId":"listJobs","tags":["Jobs"],"parameters":[{"name":"X-Internalize-Tenant","in":"header","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$"},"description":"Customer namespace. Must match tenant_id in the body and any tenant restriction on the key. Repeat on job and subject reads. Omission uses the key’s tenant or the separate project namespace."},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Newest jobs. Pass next_cursor to continue.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tenant_id":{"type":["string","null"]},"kind":{"type":"string","enum":["inference","internalization"]},"status":{"type":"string","enum":["queued","running","succeeded","ready","rejected","failed","reconciliation_required"]},"phase":{"type":"string"},"adapter_version":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","status","phase","adapter_version","created_at"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"Invalid or revoked key","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits or spending limit reached","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Insufficient scope, browser key usage, or preview-only execution","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict or expired adapter","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"413":{"description":"Request body exceeds 100,000 bytes","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Unexpected server error; preserve the request ID and operation identity","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Not configured or unavailable","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/jobs/{id}":{"get":{"operationId":"getJob","tags":["Jobs"],"parameters":[{"name":"X-Internalize-Tenant","in":"header","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$"},"description":"Customer namespace. Must match tenant_id in the body and any tenant restriction on the key. Repeat on job and subject reads. Omission uses the key’s tenant or the separate project namespace."},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Current job, usage, result, and settlement state","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"subject_id":{"type":"string"},"tenant_id":{"type":["string","null"]},"kind":{"type":"string","enum":["inference","internalization"]},"status":{"type":"string","enum":["queued","running","succeeded","ready","rejected","failed","reconciliation_required"]},"phase":{"type":"string"},"adapter_version":{"type":"string"},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cached_input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"training_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["input_tokens","output_tokens","cached_input_tokens","training_tokens"],"additionalProperties":false},"billing":{"type":"object","properties":{"reserved_microusd":{"type":"integer","minimum":0,"maximum":9007199254740991},"charged_microusd":{"type":"integer","minimum":0,"maximum":9007199254740991},"settled":{"type":"boolean"},"pricing_version":{"type":"string"},"compute_microusd":{"type":"integer","minimum":0,"maximum":9007199254740991},"storage_microusd":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reserved_microusd","charged_microusd","settled","pricing_version","compute_microusd","storage_microusd"],"additionalProperties":false},"result":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$"},"arguments":{"type":"string","maxLength":16000}},"required":["name","arguments"],"additionalProperties":false}},"required":["id","type","function"],"additionalProperties":false}},"finish_reason":{"type":"string"},"activated":{"type":"boolean"},"activation_conflict":{"type":"boolean"},"candidate":{"type":"object","properties":{"version_id":{"type":"string"}},"required":["version_id"],"additionalProperties":false},"validation":{"type":"object","properties":{"passed":{"type":"boolean"},"passed_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"total_count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["passed","passed_count","total_count"],"additionalProperties":false}},"additionalProperties":{}},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","retryable"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","subject_id","kind","status","phase","adapter_version","usage","billing","result","error","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Invalid or revoked key","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits or spending limit reached","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Insufficient scope, browser key usage, or preview-only execution","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict or expired adapter","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"413":{"description":"Request body exceeds 100,000 bytes","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Unexpected server error; preserve the request ID and operation identity","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Not configured or unavailable","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/subjects":{"get":{"operationId":"listSubjects","parameters":[{"name":"X-Internalize-Tenant","in":"header","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$"},"description":"Customer namespace. Must match tenant_id in the body and any tenant restriction on the key. Repeat on job and subject reads. Omission uses the key’s tenant or the separate project namespace."}],"tags":["Adapters"],"responses":{"200":{"description":"Up to 100 subjects and 50 recent versions per subject","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tenant_id":{"type":["string","null"]},"active_version":{"type":["string","null"]},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"validation":{"type":"object","properties":{"passed":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["passed","total"],"additionalProperties":false},"source_job":{"type":"string"}},"required":["id","created_at","expires_at","validation","source_job"],"additionalProperties":false}}},"required":["id","active_version","revision","versions"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"401":{"description":"Invalid or revoked key","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits or spending limit reached","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Insufficient scope, browser key usage, or preview-only execution","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict or expired adapter","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"413":{"description":"Request body exceeds 100,000 bytes","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Unexpected server error; preserve the request ID and operation identity","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Not configured or unavailable","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/adapters/activate":{"post":{"operationId":"activateAdapter","parameters":[{"name":"X-Internalize-Tenant","in":"header","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$"},"description":"Customer namespace. Must match tenant_id in the body and any tenant restriction on the key. Repeat on job and subject reads. Omission uses the key’s tenant or the separate project namespace."}],"tags":["Adapters"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tenant_id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$"},"version_id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$"},"expected_version_id":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$"},{"type":"null"}]}},"required":["version_id","expected_version_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Activated if expected_version_id matched","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"version_id":{"type":"string"},"revision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["version_id","revision"],"additionalProperties":false}}}},"401":{"description":"Invalid or revoked key","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits or spending limit reached","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Insufficient scope, browser key usage, or preview-only execution","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict or expired adapter","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"413":{"description":"Request body exceeds 100,000 bytes","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Unexpected server error; preserve the request ID and operation identity","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Not configured or unavailable","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/models":{"get":{"operationId":"listModels","tags":["Models"],"responses":{"200":{"description":"Supported models and retail prices","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pricing":{"type":"object","properties":{"version":{"type":"string"},"input_usd_per_million_tokens":{"type":"number"},"output_usd_per_million_tokens":{"type":"number"},"cached_input_usd_per_million_tokens":{"type":"number"},"training_usd_per_million_tokens":{"type":"number"},"storage_usd_per_gb_month":{"type":"number"},"internalization_fee_usd":{"type":"number"}},"required":["version","input_usd_per_million_tokens","output_usd_per_million_tokens","cached_input_usd_per_million_tokens","training_usd_per_million_tokens","storage_usd_per_gb_month","internalization_fee_usd"],"additionalProperties":false}},"required":["id","pricing"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"401":{"description":"Invalid or revoked key","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits or spending limit reached","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Insufficient scope, browser key usage, or preview-only execution","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict or expired adapter","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"413":{"description":"Request body exceeds 100,000 bytes","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Unexpected server error; preserve the request ID and operation identity","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Not configured or unavailable","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"request_id":{"type":"string"}},"required":["code","retryable","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}}}}