// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import MiniSearch from 'minisearch'; import * as fs from 'node:fs/promises'; import * as path from 'node:path'; import { getLogger } from './logger'; type PerLanguageData = { method?: string; example?: string; }; type MethodEntry = { name: string; endpoint: string; httpMethod: string; summary: string; description: string; stainlessPath: string; qualified: string; params?: string[]; response?: string; markdown?: string; perLanguage?: Record; }; type ProseChunk = { content: string; tag: string; sectionContext?: string; source?: string; }; type MiniSearchDocument = { id: string; kind: 'http_method' | 'prose'; name?: string; endpoint?: string; summary?: string; description?: string; qualified?: string; stainlessPath?: string; content?: string; sectionContext?: string; _original: Record; }; type SearchResult = { results: (string | Record)[]; }; const EMBEDDED_METHODS: MethodEntry[] = [ { name: 'create', endpoint: '/v5/responses', httpMethod: 'post', summary: 'Responses', description: 'Responses', stainlessPath: '(resource) responses > (method) create', qualified: 'client.responses.create', params: [ "input: string | { content: string | { text: string; type: 'input_text'; } | { detail: 'low' | 'high' | 'auto'; type: 'input_image'; file_id?: string; image_url?: string; } | { type: 'input_file'; file_data?: string; file_id?: string; file_url?: string; filename?: string; }[]; role: 'user' | 'assistant' | 'system' | 'developer'; type?: 'message'; } | { content: { text: string; type: 'input_text'; } | { detail: 'low' | 'high' | 'auto'; type: 'input_image'; file_id?: string; image_url?: string; } | { type: 'input_file'; file_data?: string; file_id?: string; file_url?: string; filename?: string; }[]; role: 'user' | 'system' | 'developer'; status?: 'in_progress' | 'completed' | 'incomplete'; type?: 'message'; } | { id: string; content: { annotations: { file_id: string; filename: string; index: number; type: 'file_citation'; } | { end_index: number; start_index: number; title: string; type: 'url_citation'; url: string; } | { container_id: string; end_index: number; file_id: string; filename: string; start_index: number; type: 'container_file_citation'; } | { file_id: string; index: number; type: 'file_path'; }[]; text: string; type: 'output_text'; logprobs?: { token: string; bytes: number[]; logprob: number; top_logprobs: { token: string; bytes: number[]; logprob: number; }[]; }[]; } | { refusal: string; type: 'refusal'; }[]; role: 'assistant'; status: 'in_progress' | 'completed' | 'incomplete'; type: 'message'; } | { id: string; queries: string[]; status: 'in_progress' | 'searching' | 'completed' | 'incomplete' | 'failed'; type: 'file_search_call'; results?: { attributes?: object; file_id?: string; filename?: string; score?: number; text?: string; }[]; } | { id: string; action: { button: 'left' | 'right' | 'wheel' | 'back' | 'forward'; type: 'click'; x: number; y: number; } | { type: 'double_click'; x: number; y: number; } | { path: { x: number; y: number; }[]; type: 'drag'; } | { keys: string[]; type: 'keypress'; } | { type: 'move'; x: number; y: number; } | { type: 'screenshot'; } | { scroll_x: number; scroll_y: number; type: 'scroll'; x: number; y: number; } | { text: string; type: 'type'; } | { type: 'wait'; }; call_id: string; pending_safety_checks: { id: string; code: string; message: string; }[]; status: 'in_progress' | 'completed' | 'incomplete'; type: 'computer_call'; } | { call_id: string; output: { type: 'computer_screenshot'; file_id?: string; image_url?: string; }; type: 'computer_call_output'; id?: string; acknowledged_safety_checks?: { id: string; code?: string; message?: string; }[]; status?: 'in_progress' | 'completed' | 'incomplete'; } | { id: string; action: { query: string; type: 'search'; } | { type: 'open_page'; url: string; } | { pattern: string; type: 'find'; url: string; }; status: 'in_progress' | 'searching' | 'completed' | 'failed'; type: 'web_search_call'; } | { arguments: string; call_id: string; name: string; type: 'function_call'; id?: string; status?: 'in_progress' | 'completed' | 'incomplete'; } | { call_id: string; output: string; type: 'function_call_output'; id?: string; status?: 'in_progress' | 'completed' | 'incomplete'; } | { id: string; summary: { text: string; type: 'summary_text'; }[]; type: 'reasoning'; content?: { text: string; type: 'reasoning_text'; }[]; encrypted_content?: string; status?: 'in_progress' | 'completed' | 'incomplete'; } | { id: string; result: string; status: 'in_progress' | 'completed' | 'generating' | 'failed'; type: 'image_generation_call'; } | { id: string; code: string; container_id: string; outputs: { logs: string; type: 'logs'; } | { type: 'image'; url: string; }[]; status: 'in_progress' | 'completed' | 'incomplete' | 'interpreting' | 'failed'; type: 'code_interpreter_call'; } | { id: string; action: { command: string[]; env: object; type: 'exec'; timeout_ms?: number; user?: string; working_directory?: string; }; call_id: string; status: 'in_progress' | 'completed' | 'incomplete'; type: 'local_shell_call'; } | { id: string; output: string; type: 'local_shell_call_output'; status?: 'in_progress' | 'completed' | 'incomplete'; } | { id: string; server_label: string; tools: { input_schema: object; name: string; annotations?: object; description?: string; }[]; type: 'mcp_list_tools'; error?: string; } | { id: string; arguments: string; name: string; server_label: string; type: 'mcp_approval_request'; } | { approval_request_id: string; approve: boolean; type: 'mcp_approval_response'; id?: string; reason?: string; } | { id: string; arguments: string; name: string; server_label: string; type: 'mcp_call'; error?: string; output?: string; } | { call_id: string; output: string; type: 'custom_tool_call_output'; id?: string; } | { call_id: string; input: string; name: string; type: 'custom_tool_call'; id?: string; } | { id: string; type?: 'item_reference'; }[];", 'model: string;', 'include?: string[];', 'instructions?: string;', 'max_output_tokens?: number;', 'metadata?: object;', 'parallel_tool_calls?: boolean;', 'previous_response_id?: string;', 'reasoning?: object;', 'store?: boolean;', 'stream?: boolean;', 'temperature?: number;', 'text?: object;', 'tool_choice?: string | object;', 'tools?: object[];', 'top_p?: number;', "truncation?: 'auto' | 'disabled';", ], response: 'openai_response | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object', markdown: "## create\n\n`client.responses.create(input: string | { content: string | object | object | object[]; role: 'user' | 'assistant' | 'system' | 'developer'; type?: 'message'; } | { content: object | object | object[]; role: 'user' | 'system' | 'developer'; status?: 'in_progress' | 'completed' | 'incomplete'; type?: 'message'; } | { id: string; content: { annotations: object | object | object | object[]; text: string; type: 'output_text'; logprobs?: object[]; } | { refusal: string; type: 'refusal'; }[]; role: 'assistant'; status: 'in_progress' | 'completed' | 'incomplete'; type: 'message'; } | { id: string; queries: string[]; status: 'in_progress' | 'searching' | 'completed' | 'incomplete' | 'failed'; type: 'file_search_call'; results?: { attributes?: object; file_id?: string; filename?: string; score?: number; text?: string; }[]; } | { id: string; action: { button: 'left' | 'right' | 'wheel' | 'back' | 'forward'; type: 'click'; x: number; y: number; } | { type: 'double_click'; x: number; y: number; } | { path: object[]; type: 'drag'; } | { keys: string[]; type: 'keypress'; } | { type: 'move'; x: number; y: number; } | { type: 'screenshot'; } | { scroll_x: number; scroll_y: number; type: 'scroll'; x: number; y: number; } | { text: string; type: 'type'; } | { type: 'wait'; }; call_id: string; pending_safety_checks: { id: string; code: string; message: string; }[]; status: 'in_progress' | 'completed' | 'incomplete'; type: 'computer_call'; } | { call_id: string; output: { type: 'computer_screenshot'; file_id?: string; image_url?: string; }; type: 'computer_call_output'; id?: string; acknowledged_safety_checks?: { id: string; code?: string; message?: string; }[]; status?: 'in_progress' | 'completed' | 'incomplete'; } | { id: string; action: { query: string; type: 'search'; } | { type: 'open_page'; url: string; } | { pattern: string; type: 'find'; url: string; }; status: 'in_progress' | 'searching' | 'completed' | 'failed'; type: 'web_search_call'; } | { arguments: string; call_id: string; name: string; type: 'function_call'; id?: string; status?: 'in_progress' | 'completed' | 'incomplete'; } | { call_id: string; output: string; type: 'function_call_output'; id?: string; status?: 'in_progress' | 'completed' | 'incomplete'; } | { id: string; summary: { text: string; type: 'summary_text'; }[]; type: 'reasoning'; content?: { text: string; type: 'reasoning_text'; }[]; encrypted_content?: string; status?: 'in_progress' | 'completed' | 'incomplete'; } | { id: string; result: string; status: 'in_progress' | 'completed' | 'generating' | 'failed'; type: 'image_generation_call'; } | { id: string; code: string; container_id: string; outputs: { logs: string; type: 'logs'; } | { type: 'image'; url: string; }[]; status: 'in_progress' | 'completed' | 'incomplete' | 'interpreting' | 'failed'; type: 'code_interpreter_call'; } | { id: string; action: { command: string[]; env: object; type: 'exec'; timeout_ms?: number; user?: string; working_directory?: string; }; call_id: string; status: 'in_progress' | 'completed' | 'incomplete'; type: 'local_shell_call'; } | { id: string; output: string; type: 'local_shell_call_output'; status?: 'in_progress' | 'completed' | 'incomplete'; } | { id: string; server_label: string; tools: { input_schema: object; name: string; annotations?: object; description?: string; }[]; type: 'mcp_list_tools'; error?: string; } | { id: string; arguments: string; name: string; server_label: string; type: 'mcp_approval_request'; } | { approval_request_id: string; approve: boolean; type: 'mcp_approval_response'; id?: string; reason?: string; } | { id: string; arguments: string; name: string; server_label: string; type: 'mcp_call'; error?: string; output?: string; } | { call_id: string; output: string; type: 'custom_tool_call_output'; id?: string; } | { call_id: string; input: string; name: string; type: 'custom_tool_call'; id?: string; } | { id: string; type?: 'item_reference'; }[], model: string, include?: string[], instructions?: string, max_output_tokens?: number, metadata?: object, parallel_tool_calls?: boolean, previous_response_id?: string, reasoning?: object, store?: boolean, stream?: boolean, temperature?: number, text?: object, tool_choice?: string | object, tools?: object[], top_p?: number, truncation?: 'auto' | 'disabled'): object | { delta: string; sequence_number: number; type: 'response.audio.delta'; } | { sequence_number: number; type: 'response.audio.done'; } | { delta: string; sequence_number: number; type: 'response.audio.transcript.delta'; } | { sequence_number: number; type: 'response.audio.transcript.done'; } | { delta: string; item_id: string; output_index: number; sequence_number: number; type: 'response.code_interpreter_call_code.delta'; } | { code: string; item_id: string; output_index: number; sequence_number: number; type: 'response.code_interpreter_call_code.done'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.code_interpreter_call.completed'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.code_interpreter_call.in_progress'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.code_interpreter_call.interpreting'; } | { response: openai_response; sequence_number: number; type: 'response.completed'; } | { content_index: number; item_id: string; output_index: number; part: openai_response_output_text | openai_response_output_refusal; sequence_number: number; type: 'response.content_part.added'; } | { content_index: number; item_id: string; output_index: number; part: openai_response_output_text | openai_response_output_refusal; sequence_number: number; type: 'response.content_part.done'; } | { response: openai_response; sequence_number: number; type: 'response.created'; } | { message: string; sequence_number: number; type: 'error'; code?: string; param?: string; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.file_search_call.completed'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.file_search_call.in_progress'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.file_search_call.searching'; } | { delta: string; item_id: string; output_index: number; sequence_number: number; type: 'response.function_call_arguments.delta'; } | { arguments: string; item_id: string; output_index: number; sequence_number: number; type: 'response.function_call_arguments.done'; } | { response: openai_response; sequence_number: number; type: 'response.in_progress'; } | { response: openai_response; sequence_number: number; type: 'response.failed'; } | { response: openai_response; sequence_number: number; type: 'response.incomplete'; } | { item: openai_response_output_message | openai_response_file_search_tool_call | openai_response_function_tool_call | openai_response_function_web_search | openai_response_computer_tool_call | openai_response_reasoning_item | openai_types_responses_response_output_item_image_generation_call | openai_response_code_interpreter_tool_call | openai_types_responses_response_output_item_local_shell_call | openai_types_responses_response_output_item_mcp_call | openai_types_responses_response_output_item_mcp_list_tools | openai_types_responses_response_output_item_mcp_approval_request | openai_response_custom_tool_call; output_index: number; sequence_number: number; type: 'response.output_item.added'; } | { item: openai_response_output_message | openai_response_file_search_tool_call | openai_response_function_tool_call | openai_response_function_web_search | openai_response_computer_tool_call | openai_response_reasoning_item | openai_types_responses_response_output_item_image_generation_call | openai_response_code_interpreter_tool_call | openai_types_responses_response_output_item_local_shell_call | openai_types_responses_response_output_item_mcp_call | openai_types_responses_response_output_item_mcp_list_tools | openai_types_responses_response_output_item_mcp_approval_request | openai_response_custom_tool_call; output_index: number; sequence_number: number; type: 'response.output_item.done'; } | { item_id: string; output_index: number; part: part; sequence_number: number; summary_index: number; type: 'response.reasoning_summary_part.added'; } | { item_id: string; output_index: number; part: part; sequence_number: number; summary_index: number; type: 'response.reasoning_summary_part.done'; } | { delta: string; item_id: string; output_index: number; sequence_number: number; summary_index: number; type: 'response.reasoning_summary_text.delta'; } | { item_id: string; output_index: number; sequence_number: number; summary_index: number; text: string; type: 'response.reasoning_summary_text.done'; } | { content_index: number; delta: string; item_id: string; output_index: number; sequence_number: number; type: 'response.reasoning_text.delta'; } | { content_index: number; item_id: string; output_index: number; sequence_number: number; text: string; type: 'response.reasoning_text.done'; } | { content_index: number; delta: string; item_id: string; output_index: number; sequence_number: number; type: 'response.refusal.delta'; } | { content_index: number; item_id: string; output_index: number; refusal: string; sequence_number: number; type: 'response.refusal.done'; } | { content_index: number; delta: string; item_id: string; logprobs: object[]; output_index: number; sequence_number: number; type: 'response.output_text.delta'; } | { content_index: number; item_id: string; logprobs: object[]; output_index: number; sequence_number: number; text: string; type: 'response.output_text.done'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.web_search_call.completed'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.web_search_call.in_progress'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.web_search_call.searching'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.image_generation_call.completed'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.image_generation_call.generating'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.image_generation_call.in_progress'; } | { item_id: string; output_index: number; partial_image_b64: string; partial_image_index: number; sequence_number: number; type: 'response.image_generation_call.partial_image'; } | { delta: string; item_id: string; output_index: number; sequence_number: number; type: 'response.mcp_call_arguments.delta'; } | { arguments: string; item_id: string; output_index: number; sequence_number: number; type: 'response.mcp_call_arguments.done'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.mcp_call.completed'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.mcp_call.failed'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.mcp_call.in_progress'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.mcp_list_tools.completed'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.mcp_list_tools.failed'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.mcp_list_tools.in_progress'; } | { annotation: object; annotation_index: number; content_index: number; item_id: string; output_index: number; sequence_number: number; type: 'response.output_text.annotation.added'; } | { response: openai_response; sequence_number: number; type: 'response.queued'; } | { delta: string; item_id: string; output_index: number; sequence_number: number; type: 'response.custom_tool_call_input.delta'; } | { input: string; item_id: string; output_index: number; sequence_number: number; type: 'response.custom_tool_call_input.done'; } | { type: string; }`\n\n**post** `/v5/responses`\n\nResponses\n\n### Parameters\n\n- `input: string | { content: string | { text: string; type: 'input_text'; } | { detail: 'low' | 'high' | 'auto'; type: 'input_image'; file_id?: string; image_url?: string; } | { type: 'input_file'; file_data?: string; file_id?: string; file_url?: string; filename?: string; }[]; role: 'user' | 'assistant' | 'system' | 'developer'; type?: 'message'; } | { content: { text: string; type: 'input_text'; } | { detail: 'low' | 'high' | 'auto'; type: 'input_image'; file_id?: string; image_url?: string; } | { type: 'input_file'; file_data?: string; file_id?: string; file_url?: string; filename?: string; }[]; role: 'user' | 'system' | 'developer'; status?: 'in_progress' | 'completed' | 'incomplete'; type?: 'message'; } | { id: string; content: { annotations: { file_id: string; filename: string; index: number; type: 'file_citation'; } | { end_index: number; start_index: number; title: string; type: 'url_citation'; url: string; } | { container_id: string; end_index: number; file_id: string; filename: string; start_index: number; type: 'container_file_citation'; } | { file_id: string; index: number; type: 'file_path'; }[]; text: string; type: 'output_text'; logprobs?: { token: string; bytes: number[]; logprob: number; top_logprobs: { token: string; bytes: number[]; logprob: number; }[]; }[]; } | { refusal: string; type: 'refusal'; }[]; role: 'assistant'; status: 'in_progress' | 'completed' | 'incomplete'; type: 'message'; } | { id: string; queries: string[]; status: 'in_progress' | 'searching' | 'completed' | 'incomplete' | 'failed'; type: 'file_search_call'; results?: { attributes?: object; file_id?: string; filename?: string; score?: number; text?: string; }[]; } | { id: string; action: { button: 'left' | 'right' | 'wheel' | 'back' | 'forward'; type: 'click'; x: number; y: number; } | { type: 'double_click'; x: number; y: number; } | { path: { x: number; y: number; }[]; type: 'drag'; } | { keys: string[]; type: 'keypress'; } | { type: 'move'; x: number; y: number; } | { type: 'screenshot'; } | { scroll_x: number; scroll_y: number; type: 'scroll'; x: number; y: number; } | { text: string; type: 'type'; } | { type: 'wait'; }; call_id: string; pending_safety_checks: { id: string; code: string; message: string; }[]; status: 'in_progress' | 'completed' | 'incomplete'; type: 'computer_call'; } | { call_id: string; output: { type: 'computer_screenshot'; file_id?: string; image_url?: string; }; type: 'computer_call_output'; id?: string; acknowledged_safety_checks?: { id: string; code?: string; message?: string; }[]; status?: 'in_progress' | 'completed' | 'incomplete'; } | { id: string; action: { query: string; type: 'search'; } | { type: 'open_page'; url: string; } | { pattern: string; type: 'find'; url: string; }; status: 'in_progress' | 'searching' | 'completed' | 'failed'; type: 'web_search_call'; } | { arguments: string; call_id: string; name: string; type: 'function_call'; id?: string; status?: 'in_progress' | 'completed' | 'incomplete'; } | { call_id: string; output: string; type: 'function_call_output'; id?: string; status?: 'in_progress' | 'completed' | 'incomplete'; } | { id: string; summary: { text: string; type: 'summary_text'; }[]; type: 'reasoning'; content?: { text: string; type: 'reasoning_text'; }[]; encrypted_content?: string; status?: 'in_progress' | 'completed' | 'incomplete'; } | { id: string; result: string; status: 'in_progress' | 'completed' | 'generating' | 'failed'; type: 'image_generation_call'; } | { id: string; code: string; container_id: string; outputs: { logs: string; type: 'logs'; } | { type: 'image'; url: string; }[]; status: 'in_progress' | 'completed' | 'incomplete' | 'interpreting' | 'failed'; type: 'code_interpreter_call'; } | { id: string; action: { command: string[]; env: object; type: 'exec'; timeout_ms?: number; user?: string; working_directory?: string; }; call_id: string; status: 'in_progress' | 'completed' | 'incomplete'; type: 'local_shell_call'; } | { id: string; output: string; type: 'local_shell_call_output'; status?: 'in_progress' | 'completed' | 'incomplete'; } | { id: string; server_label: string; tools: { input_schema: object; name: string; annotations?: object; description?: string; }[]; type: 'mcp_list_tools'; error?: string; } | { id: string; arguments: string; name: string; server_label: string; type: 'mcp_approval_request'; } | { approval_request_id: string; approve: boolean; type: 'mcp_approval_response'; id?: string; reason?: string; } | { id: string; arguments: string; name: string; server_label: string; type: 'mcp_call'; error?: string; output?: string; } | { call_id: string; output: string; type: 'custom_tool_call_output'; id?: string; } | { call_id: string; input: string; name: string; type: 'custom_tool_call'; id?: string; } | { id: string; type?: 'item_reference'; }[]`\n\n- `model: string`\n model specified as `model_vendor/model`, for example `openai/gpt-4o`\n\n- `include?: string[]`\n Which fields to include in the response\n\n- `instructions?: string`\n Instructions for the response generation\n\n- `max_output_tokens?: number`\n Maximum number of output tokens\n\n- `metadata?: object`\n Metadata for the response\n\n- `parallel_tool_calls?: boolean`\n Whether to enable parallel tool calls\n\n- `previous_response_id?: string`\n ID of the previous response for chaining\n\n- `reasoning?: object`\n Reasoning configuration for the response\n\n- `store?: boolean`\n Whether to store the response\n\n- `stream?: boolean`\n Whether to stream the response\n\n- `temperature?: number`\n Sampling temperature for randomness control\n\n- `text?: object`\n Text configuration parameters\n\n- `tool_choice?: string | object`\n Tool choice configuration\n\n- `tools?: object[]`\n Tools available for the response\n\n- `top_p?: number`\n Top-p sampling parameter\n\n- `truncation?: 'auto' | 'disabled'`\n Truncation configuration\n\n### Returns\n\n- `{ id: string; created_at: number; model: string | string; object: 'response'; output: object | object | object | object | object | object | object | object | object | object | object | object | object[]; parallel_tool_calls: boolean; tool_choice: 'none' | 'auto' | 'required' | object | object | object | object | object; tools: object | object | object | object | object | object | object | object | object[]; background?: boolean; error?: object; incomplete_details?: object; instructions?: string | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object[]; max_output_tokens?: number; max_tool_calls?: number; metadata?: object; previous_response_id?: string; prompt?: object; prompt_cache_key?: string; reasoning?: object; safety_identifier?: string; service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority'; status?: 'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete'; temperature?: number; text?: object; top_logprobs?: number; top_p?: number; truncation?: 'auto' | 'disabled'; usage?: object; user?: string; } | { delta: string; sequence_number: number; type: 'response.audio.delta'; } | { sequence_number: number; type: 'response.audio.done'; } | { delta: string; sequence_number: number; type: 'response.audio.transcript.delta'; } | { sequence_number: number; type: 'response.audio.transcript.done'; } | { delta: string; item_id: string; output_index: number; sequence_number: number; type: 'response.code_interpreter_call_code.delta'; } | { code: string; item_id: string; output_index: number; sequence_number: number; type: 'response.code_interpreter_call_code.done'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.code_interpreter_call.completed'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.code_interpreter_call.in_progress'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.code_interpreter_call.interpreting'; } | { response: { id: string; created_at: number; model: string | string; object: 'response'; output: openai_response_output_message | openai_response_file_search_tool_call | openai_response_function_tool_call | openai_response_function_web_search | openai_response_computer_tool_call | openai_response_reasoning_item | openai_types_responses_response_output_item_image_generation_call | openai_response_code_interpreter_tool_call | openai_types_responses_response_output_item_local_shell_call | openai_types_responses_response_output_item_mcp_call | openai_types_responses_response_output_item_mcp_list_tools | openai_types_responses_response_output_item_mcp_approval_request | openai_response_custom_tool_call[]; parallel_tool_calls: boolean; tool_choice: 'none' | 'auto' | 'required' | tool_choice_allowed | tool_choice_types | tool_choice_function | tool_choice_mcp | tool_choice_custom; tools: function_tool | file_search_tool | web_search_tool | computer_tool | mcp | code_interpreter | image_generation | local_shell | custom_tool[]; background?: boolean; error?: openai_response_error; incomplete_details?: incomplete_details; instructions?: string | easy_input_message | openai_types_responses_response_input_item_message | openai_response_output_message | openai_response_file_search_tool_call | openai_response_computer_tool_call | openai_types_responses_response_input_item_computer_call_output | openai_response_function_web_search | openai_response_function_tool_call | openai_types_responses_response_input_item_function_call_output | openai_response_reasoning_item | openai_types_responses_response_input_item_image_generation_call | openai_response_code_interpreter_tool_call | openai_types_responses_response_input_item_local_shell_call | openai_types_responses_response_input_item_local_shell_call_output | openai_types_responses_response_input_item_mcp_list_tools | openai_types_responses_response_input_item_mcp_approval_request | openai_types_responses_response_input_item_mcp_approval_response | openai_types_responses_response_input_item_mcp_call | openai_response_custom_tool_call_output | openai_response_custom_tool_call | openai_types_responses_response_input_item_item_reference[]; max_output_tokens?: number; max_tool_calls?: number; metadata?: object; previous_response_id?: string; prompt?: openai_response_prompt; prompt_cache_key?: string; reasoning?: reasoning; safety_identifier?: string; service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority'; status?: 'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete'; temperature?: number; text?: openai_response_text_config; top_logprobs?: number; top_p?: number; truncation?: 'auto' | 'disabled'; usage?: openai_response_usage; user?: string; }; sequence_number: number; type: 'response.completed'; } | { content_index: number; item_id: string; output_index: number; part: { annotations: object | object | object | object[]; text: string; type: 'output_text'; logprobs?: object[]; } | { refusal: string; type: 'refusal'; }; sequence_number: number; type: 'response.content_part.added'; } | { content_index: number; item_id: string; output_index: number; part: { annotations: object | object | object | object[]; text: string; type: 'output_text'; logprobs?: object[]; } | { refusal: string; type: 'refusal'; }; sequence_number: number; type: 'response.content_part.done'; } | { response: { id: string; created_at: number; model: string | string; object: 'response'; output: openai_response_output_message | openai_response_file_search_tool_call | openai_response_function_tool_call | openai_response_function_web_search | openai_response_computer_tool_call | openai_response_reasoning_item | openai_types_responses_response_output_item_image_generation_call | openai_response_code_interpreter_tool_call | openai_types_responses_response_output_item_local_shell_call | openai_types_responses_response_output_item_mcp_call | openai_types_responses_response_output_item_mcp_list_tools | openai_types_responses_response_output_item_mcp_approval_request | openai_response_custom_tool_call[]; parallel_tool_calls: boolean; tool_choice: 'none' | 'auto' | 'required' | tool_choice_allowed | tool_choice_types | tool_choice_function | tool_choice_mcp | tool_choice_custom; tools: function_tool | file_search_tool | web_search_tool | computer_tool | mcp | code_interpreter | image_generation | local_shell | custom_tool[]; background?: boolean; error?: openai_response_error; incomplete_details?: incomplete_details; instructions?: string | easy_input_message | openai_types_responses_response_input_item_message | openai_response_output_message | openai_response_file_search_tool_call | openai_response_computer_tool_call | openai_types_responses_response_input_item_computer_call_output | openai_response_function_web_search | openai_response_function_tool_call | openai_types_responses_response_input_item_function_call_output | openai_response_reasoning_item | openai_types_responses_response_input_item_image_generation_call | openai_response_code_interpreter_tool_call | openai_types_responses_response_input_item_local_shell_call | openai_types_responses_response_input_item_local_shell_call_output | openai_types_responses_response_input_item_mcp_list_tools | openai_types_responses_response_input_item_mcp_approval_request | openai_types_responses_response_input_item_mcp_approval_response | openai_types_responses_response_input_item_mcp_call | openai_response_custom_tool_call_output | openai_response_custom_tool_call | openai_types_responses_response_input_item_item_reference[]; max_output_tokens?: number; max_tool_calls?: number; metadata?: object; previous_response_id?: string; prompt?: openai_response_prompt; prompt_cache_key?: string; reasoning?: reasoning; safety_identifier?: string; service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority'; status?: 'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete'; temperature?: number; text?: openai_response_text_config; top_logprobs?: number; top_p?: number; truncation?: 'auto' | 'disabled'; usage?: openai_response_usage; user?: string; }; sequence_number: number; type: 'response.created'; } | { message: string; sequence_number: number; type: 'error'; code?: string; param?: string; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.file_search_call.completed'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.file_search_call.in_progress'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.file_search_call.searching'; } | { delta: string; item_id: string; output_index: number; sequence_number: number; type: 'response.function_call_arguments.delta'; } | { arguments: string; item_id: string; output_index: number; sequence_number: number; type: 'response.function_call_arguments.done'; } | { response: { id: string; created_at: number; model: string | string; object: 'response'; output: openai_response_output_message | openai_response_file_search_tool_call | openai_response_function_tool_call | openai_response_function_web_search | openai_response_computer_tool_call | openai_response_reasoning_item | openai_types_responses_response_output_item_image_generation_call | openai_response_code_interpreter_tool_call | openai_types_responses_response_output_item_local_shell_call | openai_types_responses_response_output_item_mcp_call | openai_types_responses_response_output_item_mcp_list_tools | openai_types_responses_response_output_item_mcp_approval_request | openai_response_custom_tool_call[]; parallel_tool_calls: boolean; tool_choice: 'none' | 'auto' | 'required' | tool_choice_allowed | tool_choice_types | tool_choice_function | tool_choice_mcp | tool_choice_custom; tools: function_tool | file_search_tool | web_search_tool | computer_tool | mcp | code_interpreter | image_generation | local_shell | custom_tool[]; background?: boolean; error?: openai_response_error; incomplete_details?: incomplete_details; instructions?: string | easy_input_message | openai_types_responses_response_input_item_message | openai_response_output_message | openai_response_file_search_tool_call | openai_response_computer_tool_call | openai_types_responses_response_input_item_computer_call_output | openai_response_function_web_search | openai_response_function_tool_call | openai_types_responses_response_input_item_function_call_output | openai_response_reasoning_item | openai_types_responses_response_input_item_image_generation_call | openai_response_code_interpreter_tool_call | openai_types_responses_response_input_item_local_shell_call | openai_types_responses_response_input_item_local_shell_call_output | openai_types_responses_response_input_item_mcp_list_tools | openai_types_responses_response_input_item_mcp_approval_request | openai_types_responses_response_input_item_mcp_approval_response | openai_types_responses_response_input_item_mcp_call | openai_response_custom_tool_call_output | openai_response_custom_tool_call | openai_types_responses_response_input_item_item_reference[]; max_output_tokens?: number; max_tool_calls?: number; metadata?: object; previous_response_id?: string; prompt?: openai_response_prompt; prompt_cache_key?: string; reasoning?: reasoning; safety_identifier?: string; service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority'; status?: 'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete'; temperature?: number; text?: openai_response_text_config; top_logprobs?: number; top_p?: number; truncation?: 'auto' | 'disabled'; usage?: openai_response_usage; user?: string; }; sequence_number: number; type: 'response.in_progress'; } | { response: { id: string; created_at: number; model: string | string; object: 'response'; output: openai_response_output_message | openai_response_file_search_tool_call | openai_response_function_tool_call | openai_response_function_web_search | openai_response_computer_tool_call | openai_response_reasoning_item | openai_types_responses_response_output_item_image_generation_call | openai_response_code_interpreter_tool_call | openai_types_responses_response_output_item_local_shell_call | openai_types_responses_response_output_item_mcp_call | openai_types_responses_response_output_item_mcp_list_tools | openai_types_responses_response_output_item_mcp_approval_request | openai_response_custom_tool_call[]; parallel_tool_calls: boolean; tool_choice: 'none' | 'auto' | 'required' | tool_choice_allowed | tool_choice_types | tool_choice_function | tool_choice_mcp | tool_choice_custom; tools: function_tool | file_search_tool | web_search_tool | computer_tool | mcp | code_interpreter | image_generation | local_shell | custom_tool[]; background?: boolean; error?: openai_response_error; incomplete_details?: incomplete_details; instructions?: string | easy_input_message | openai_types_responses_response_input_item_message | openai_response_output_message | openai_response_file_search_tool_call | openai_response_computer_tool_call | openai_types_responses_response_input_item_computer_call_output | openai_response_function_web_search | openai_response_function_tool_call | openai_types_responses_response_input_item_function_call_output | openai_response_reasoning_item | openai_types_responses_response_input_item_image_generation_call | openai_response_code_interpreter_tool_call | openai_types_responses_response_input_item_local_shell_call | openai_types_responses_response_input_item_local_shell_call_output | openai_types_responses_response_input_item_mcp_list_tools | openai_types_responses_response_input_item_mcp_approval_request | openai_types_responses_response_input_item_mcp_approval_response | openai_types_responses_response_input_item_mcp_call | openai_response_custom_tool_call_output | openai_response_custom_tool_call | openai_types_responses_response_input_item_item_reference[]; max_output_tokens?: number; max_tool_calls?: number; metadata?: object; previous_response_id?: string; prompt?: openai_response_prompt; prompt_cache_key?: string; reasoning?: reasoning; safety_identifier?: string; service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority'; status?: 'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete'; temperature?: number; text?: openai_response_text_config; top_logprobs?: number; top_p?: number; truncation?: 'auto' | 'disabled'; usage?: openai_response_usage; user?: string; }; sequence_number: number; type: 'response.failed'; } | { response: { id: string; created_at: number; model: string | string; object: 'response'; output: openai_response_output_message | openai_response_file_search_tool_call | openai_response_function_tool_call | openai_response_function_web_search | openai_response_computer_tool_call | openai_response_reasoning_item | openai_types_responses_response_output_item_image_generation_call | openai_response_code_interpreter_tool_call | openai_types_responses_response_output_item_local_shell_call | openai_types_responses_response_output_item_mcp_call | openai_types_responses_response_output_item_mcp_list_tools | openai_types_responses_response_output_item_mcp_approval_request | openai_response_custom_tool_call[]; parallel_tool_calls: boolean; tool_choice: 'none' | 'auto' | 'required' | tool_choice_allowed | tool_choice_types | tool_choice_function | tool_choice_mcp | tool_choice_custom; tools: function_tool | file_search_tool | web_search_tool | computer_tool | mcp | code_interpreter | image_generation | local_shell | custom_tool[]; background?: boolean; error?: openai_response_error; incomplete_details?: incomplete_details; instructions?: string | easy_input_message | openai_types_responses_response_input_item_message | openai_response_output_message | openai_response_file_search_tool_call | openai_response_computer_tool_call | openai_types_responses_response_input_item_computer_call_output | openai_response_function_web_search | openai_response_function_tool_call | openai_types_responses_response_input_item_function_call_output | openai_response_reasoning_item | openai_types_responses_response_input_item_image_generation_call | openai_response_code_interpreter_tool_call | openai_types_responses_response_input_item_local_shell_call | openai_types_responses_response_input_item_local_shell_call_output | openai_types_responses_response_input_item_mcp_list_tools | openai_types_responses_response_input_item_mcp_approval_request | openai_types_responses_response_input_item_mcp_approval_response | openai_types_responses_response_input_item_mcp_call | openai_response_custom_tool_call_output | openai_response_custom_tool_call | openai_types_responses_response_input_item_item_reference[]; max_output_tokens?: number; max_tool_calls?: number; metadata?: object; previous_response_id?: string; prompt?: openai_response_prompt; prompt_cache_key?: string; reasoning?: reasoning; safety_identifier?: string; service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority'; status?: 'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete'; temperature?: number; text?: openai_response_text_config; top_logprobs?: number; top_p?: number; truncation?: 'auto' | 'disabled'; usage?: openai_response_usage; user?: string; }; sequence_number: number; type: 'response.incomplete'; } | { item: { id: string; content: openai_response_output_text | openai_response_output_refusal[]; role: 'assistant'; status: 'in_progress' | 'completed' | 'incomplete'; type: 'message'; } | { id: string; queries: string[]; status: 'in_progress' | 'searching' | 'completed' | 'incomplete' | 'failed'; type: 'file_search_call'; results?: object[]; } | { arguments: string; call_id: string; name: string; type: 'function_call'; id?: string; status?: 'in_progress' | 'completed' | 'incomplete'; } | { id: string; action: object | object | object; status: 'in_progress' | 'searching' | 'completed' | 'failed'; type: 'web_search_call'; } | { id: string; action: object | object | object | object | object | object | object | object | object; call_id: string; pending_safety_checks: object[]; status: 'in_progress' | 'completed' | 'incomplete'; type: 'computer_call'; } | { id: string; summary: object[]; type: 'reasoning'; content?: object[]; encrypted_content?: string; status?: 'in_progress' | 'completed' | 'incomplete'; } | { id: string; status: 'in_progress' | 'completed' | 'generating' | 'failed'; type: 'image_generation_call'; result?: string; } | { id: string; container_id: string; status: 'in_progress' | 'completed' | 'incomplete' | 'interpreting' | 'failed'; type: 'code_interpreter_call'; code?: string; outputs?: object | object[]; } | { id: string; action: object; call_id: string; status: 'in_progress' | 'completed' | 'incomplete'; type: 'local_shell_call'; } | { id: string; arguments: string; name: string; server_label: string; type: 'mcp_call'; error?: string; output?: string; } | { id: string; server_label: string; tools: object[]; type: 'mcp_list_tools'; error?: string; } | { id: string; arguments: string; name: string; server_label: string; type: 'mcp_approval_request'; } | { call_id: string; input: string; name: string; type: 'custom_tool_call'; id?: string; }; output_index: number; sequence_number: number; type: 'response.output_item.added'; } | { item: { id: string; content: openai_response_output_text | openai_response_output_refusal[]; role: 'assistant'; status: 'in_progress' | 'completed' | 'incomplete'; type: 'message'; } | { id: string; queries: string[]; status: 'in_progress' | 'searching' | 'completed' | 'incomplete' | 'failed'; type: 'file_search_call'; results?: object[]; } | { arguments: string; call_id: string; name: string; type: 'function_call'; id?: string; status?: 'in_progress' | 'completed' | 'incomplete'; } | { id: string; action: object | object | object; status: 'in_progress' | 'searching' | 'completed' | 'failed'; type: 'web_search_call'; } | { id: string; action: object | object | object | object | object | object | object | object | object; call_id: string; pending_safety_checks: object[]; status: 'in_progress' | 'completed' | 'incomplete'; type: 'computer_call'; } | { id: string; summary: object[]; type: 'reasoning'; content?: object[]; encrypted_content?: string; status?: 'in_progress' | 'completed' | 'incomplete'; } | { id: string; status: 'in_progress' | 'completed' | 'generating' | 'failed'; type: 'image_generation_call'; result?: string; } | { id: string; container_id: string; status: 'in_progress' | 'completed' | 'incomplete' | 'interpreting' | 'failed'; type: 'code_interpreter_call'; code?: string; outputs?: object | object[]; } | { id: string; action: object; call_id: string; status: 'in_progress' | 'completed' | 'incomplete'; type: 'local_shell_call'; } | { id: string; arguments: string; name: string; server_label: string; type: 'mcp_call'; error?: string; output?: string; } | { id: string; server_label: string; tools: object[]; type: 'mcp_list_tools'; error?: string; } | { id: string; arguments: string; name: string; server_label: string; type: 'mcp_approval_request'; } | { call_id: string; input: string; name: string; type: 'custom_tool_call'; id?: string; }; output_index: number; sequence_number: number; type: 'response.output_item.done'; } | { item_id: string; output_index: number; part: { text: string; type: 'summary_text'; }; sequence_number: number; summary_index: number; type: 'response.reasoning_summary_part.added'; } | { item_id: string; output_index: number; part: { text: string; type: 'summary_text'; }; sequence_number: number; summary_index: number; type: 'response.reasoning_summary_part.done'; } | { delta: string; item_id: string; output_index: number; sequence_number: number; summary_index: number; type: 'response.reasoning_summary_text.delta'; } | { item_id: string; output_index: number; sequence_number: number; summary_index: number; text: string; type: 'response.reasoning_summary_text.done'; } | { content_index: number; delta: string; item_id: string; output_index: number; sequence_number: number; type: 'response.reasoning_text.delta'; } | { content_index: number; item_id: string; output_index: number; sequence_number: number; text: string; type: 'response.reasoning_text.done'; } | { content_index: number; delta: string; item_id: string; output_index: number; sequence_number: number; type: 'response.refusal.delta'; } | { content_index: number; item_id: string; output_index: number; refusal: string; sequence_number: number; type: 'response.refusal.done'; } | { content_index: number; delta: string; item_id: string; logprobs: { token: string; logprob: number; top_logprobs?: { token?: string; logprob?: number; }[]; }[]; output_index: number; sequence_number: number; type: 'response.output_text.delta'; } | { content_index: number; item_id: string; logprobs: { token: string; logprob: number; top_logprobs?: { token?: string; logprob?: number; }[]; }[]; output_index: number; sequence_number: number; text: string; type: 'response.output_text.done'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.web_search_call.completed'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.web_search_call.in_progress'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.web_search_call.searching'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.image_generation_call.completed'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.image_generation_call.generating'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.image_generation_call.in_progress'; } | { item_id: string; output_index: number; partial_image_b64: string; partial_image_index: number; sequence_number: number; type: 'response.image_generation_call.partial_image'; } | { delta: string; item_id: string; output_index: number; sequence_number: number; type: 'response.mcp_call_arguments.delta'; } | { arguments: string; item_id: string; output_index: number; sequence_number: number; type: 'response.mcp_call_arguments.done'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.mcp_call.completed'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.mcp_call.failed'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.mcp_call.in_progress'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.mcp_list_tools.completed'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.mcp_list_tools.failed'; } | { item_id: string; output_index: number; sequence_number: number; type: 'response.mcp_list_tools.in_progress'; } | { annotation: object; annotation_index: number; content_index: number; item_id: string; output_index: number; sequence_number: number; type: 'response.output_text.annotation.added'; } | { response: { id: string; created_at: number; model: string | string; object: 'response'; output: openai_response_output_message | openai_response_file_search_tool_call | openai_response_function_tool_call | openai_response_function_web_search | openai_response_computer_tool_call | openai_response_reasoning_item | openai_types_responses_response_output_item_image_generation_call | openai_response_code_interpreter_tool_call | openai_types_responses_response_output_item_local_shell_call | openai_types_responses_response_output_item_mcp_call | openai_types_responses_response_output_item_mcp_list_tools | openai_types_responses_response_output_item_mcp_approval_request | openai_response_custom_tool_call[]; parallel_tool_calls: boolean; tool_choice: 'none' | 'auto' | 'required' | tool_choice_allowed | tool_choice_types | tool_choice_function | tool_choice_mcp | tool_choice_custom; tools: function_tool | file_search_tool | web_search_tool | computer_tool | mcp | code_interpreter | image_generation | local_shell | custom_tool[]; background?: boolean; error?: openai_response_error; incomplete_details?: incomplete_details; instructions?: string | easy_input_message | openai_types_responses_response_input_item_message | openai_response_output_message | openai_response_file_search_tool_call | openai_response_computer_tool_call | openai_types_responses_response_input_item_computer_call_output | openai_response_function_web_search | openai_response_function_tool_call | openai_types_responses_response_input_item_function_call_output | openai_response_reasoning_item | openai_types_responses_response_input_item_image_generation_call | openai_response_code_interpreter_tool_call | openai_types_responses_response_input_item_local_shell_call | openai_types_responses_response_input_item_local_shell_call_output | openai_types_responses_response_input_item_mcp_list_tools | openai_types_responses_response_input_item_mcp_approval_request | openai_types_responses_response_input_item_mcp_approval_response | openai_types_responses_response_input_item_mcp_call | openai_response_custom_tool_call_output | openai_response_custom_tool_call | openai_types_responses_response_input_item_item_reference[]; max_output_tokens?: number; max_tool_calls?: number; metadata?: object; previous_response_id?: string; prompt?: openai_response_prompt; prompt_cache_key?: string; reasoning?: reasoning; safety_identifier?: string; service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority'; status?: 'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete'; temperature?: number; text?: openai_response_text_config; top_logprobs?: number; top_p?: number; truncation?: 'auto' | 'disabled'; usage?: openai_response_usage; user?: string; }; sequence_number: number; type: 'response.queued'; } | { delta: string; item_id: string; output_index: number; sequence_number: number; type: 'response.custom_tool_call_input.delta'; } | { input: string; item_id: string; output_index: number; sequence_number: number; type: 'response.custom_tool_call_input.done'; } | { type: string; }`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst response = await client.responses.create({ input: 'string', model: 'model' });\n\nconsole.log(response);\n```", perLanguage: { go: { method: 'client.Responses.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tresponse, err := client.Responses.New(context.TODO(), sgpdev.ResponseNewParams{\n\t\tInput: sgpdev.ResponseNewParamsInputUnion{\n\t\t\tOfString: sgpdev.String("string"),\n\t\t},\n\t\tModel: "model",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/responses \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "input": "string",\n "model": "model"\n }\'', }, python: { method: 'responses.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.responses.create(\n input="string",\n model="model",\n)\nprint(response)', }, typescript: { method: 'client.responses.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.responses.create({ input: 'string', model: 'model' });\n\nconsole.log(response);", }, }, }, { name: 'create', endpoint: '/v5/completions', httpMethod: 'post', summary: 'Completions', description: 'Completions', stainlessPath: '(resource) completions > (method) create', qualified: 'client.completions.create', params: [ 'model: string;', 'prompt: string | string[];', 'best_of?: number;', 'echo?: boolean;', 'frequency_penalty?: number;', 'logit_bias?: object;', 'logprobs?: number;', 'max_tokens?: number;', 'n?: number;', 'presence_penalty?: number;', 'seed?: number;', 'stop?: string | string[];', 'stream?: boolean;', 'stream_options?: object;', 'suffix?: string;', 'temperature?: number;', 'top_p?: number;', 'user?: string;', ], response: "{ id: string; choices: { finish_reason: 'stop' | 'length' | 'content_filter'; index: number; text: string; logprobs?: { text_offset?: number[]; token_logprobs?: number[]; tokens?: string[]; top_logprobs?: object[]; }; }[]; created: number; model: string; object?: 'text_completion'; system_fingerprint?: string; usage?: { completion_tokens: number; prompt_tokens: number; total_tokens: number; completion_tokens_details?: object; prompt_tokens_details?: object; }; }", markdown: "## create\n\n`client.completions.create(model: string, prompt: string | string[], best_of?: number, echo?: boolean, frequency_penalty?: number, logit_bias?: object, logprobs?: number, max_tokens?: number, n?: number, presence_penalty?: number, seed?: number, stop?: string | string[], stream?: boolean, stream_options?: object, suffix?: string, temperature?: number, top_p?: number, user?: string): { id: string; choices: object[]; created: number; model: string; object?: 'text_completion'; system_fingerprint?: string; usage?: completion_usage; }`\n\n**post** `/v5/completions`\n\nCompletions\n\n### Parameters\n\n- `model: string`\n model specified as `model_vendor/model`, for example `openai/gpt-4o`\n\n- `prompt: string | string[]`\n The prompt to generate completions for, encoded as a string\n\n- `best_of?: number`\n Generates best_of completions server-side and returns the best one. Must be greater than n when used together.\n\n- `echo?: boolean`\n Echo back the prompt in addition to the completion\n\n- `frequency_penalty?: number`\n Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text.\n\n- `logit_bias?: object`\n Modify the likelihood of specified tokens appearing in the completion. Maps tokens to bias values from -100 to 100.\n\n- `logprobs?: number`\n Include log probabilities of the most likely tokens. Maximum value is 5.\n\n- `max_tokens?: number`\n The maximum number of tokens that can be generated in the completion.\n\n- `n?: number`\n How many completions to generate for each prompt.\n\n- `presence_penalty?: number`\n Number between -2.0 and 2.0. Positive values penalize new tokens based on their presence in the text so far.\n\n- `seed?: number`\n If specified, attempts to generate deterministic samples. Determinism is not guaranteed.\n\n- `stop?: string | string[]`\n Up to 4 sequences where the API will stop generating further tokens.\n\n- `stream?: boolean`\n Whether to stream back partial progress. If set, tokens will be sent as data-only server-sent events.\n\n- `stream_options?: object`\n Options for streaming response. Only set this when stream is True.\n\n- `suffix?: string`\n The suffix that comes after a completion of inserted text. Only supported for gpt-3.5-turbo-instruct.\n\n- `temperature?: number`\n Sampling temperature between 0 and 2. Higher values make output more random, lower more focused.\n\n- `top_p?: number`\n Alternative to temperature. Consider only tokens with top_p probability mass. Range 0-1.\n\n- `user?: string`\n A unique identifier representing your end-user, which can help OpenAI monitor and detect abuse.\n\n### Returns\n\n- `{ id: string; choices: { finish_reason: 'stop' | 'length' | 'content_filter'; index: number; text: string; logprobs?: { text_offset?: number[]; token_logprobs?: number[]; tokens?: string[]; top_logprobs?: object[]; }; }[]; created: number; model: string; object?: 'text_completion'; system_fingerprint?: string; usage?: { completion_tokens: number; prompt_tokens: number; total_tokens: number; completion_tokens_details?: object; prompt_tokens_details?: object; }; }`\n\n - `id: string`\n - `choices: { finish_reason: 'stop' | 'length' | 'content_filter'; index: number; text: string; logprobs?: { text_offset?: number[]; token_logprobs?: number[]; tokens?: string[]; top_logprobs?: object[]; }; }[]`\n - `created: number`\n - `model: string`\n - `object?: 'text_completion'`\n - `system_fingerprint?: string`\n - `usage?: { completion_tokens: number; prompt_tokens: number; total_tokens: number; completion_tokens_details?: { accepted_prediction_tokens?: number; audio_tokens?: number; reasoning_tokens?: number; rejected_prediction_tokens?: number; }; prompt_tokens_details?: { audio_tokens?: number; cached_tokens?: number; }; }`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst stream = await client.completions.create({ model: 'model', prompt: 'string' });\nfor await (const completion of stream) {\n console.log(completion);\n}\n```", perLanguage: { go: { method: 'client.Completions.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tcompletion, err := client.Completions.New(context.TODO(), sgpdev.CompletionNewParams{\n\t\tModel: "model",\n\t\tPrompt: sgpdev.CompletionNewParamsPromptUnion{\n\t\t\tOfString: sgpdev.String("string"),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", completion.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/completions \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "model": "model",\n "prompt": "string"\n }\'', }, python: { method: 'completions.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nfor completion in client.completions.create(\n model="model",\n prompt="string",\n):\n print(completion)', }, typescript: { method: 'client.completions.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst completion = await client.completions.create({ model: 'model', prompt: 'string' });\n\nconsole.log(completion.id);", }, }, }, { name: 'models', endpoint: '/v5/chat/completions/models', httpMethod: 'get', summary: 'List Chat Completion Models', description: 'List Chat Completion Models', stainlessPath: '(resource) chat.completions > (method) models', qualified: 'client.chat.completions.models', params: [ 'cursor?: string;', 'ending_before?: string;', 'limit?: number;', 'model_vendor?: string;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', ], response: "{ items: { model_name: string; model_type: 'generic' | 'completion' | 'chat_completion'; model_vendor: string; model_availability?: 'unknown' | 'available' | 'unavailable'; }[]; object?: 'list'; }", markdown: "## models\n\n`client.chat.completions.models(cursor?: string, ending_before?: string, limit?: number, model_vendor?: string, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string): { items: model_definition[]; object?: 'list'; }`\n\n**get** `/v5/chat/completions/models`\n\nList Chat Completion Models\n\n### Parameters\n\n- `cursor?: string`\n\n- `ending_before?: string`\n\n- `limit?: number`\n\n- `model_vendor?: string`\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n### Returns\n\n- `{ items: { model_name: string; model_type: 'generic' | 'completion' | 'chat_completion'; model_vendor: string; model_availability?: 'unknown' | 'available' | 'unavailable'; }[]; object?: 'list'; }`\n\n - `items: { model_name: string; model_type: 'generic' | 'completion' | 'chat_completion'; model_vendor: string; model_availability?: 'unknown' | 'available' | 'unavailable'; }[]`\n - `object?: 'list'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst response = await client.chat.completions.models();\n\nconsole.log(response);\n```", perLanguage: { go: { method: 'client.Chat.Completions.Models', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tresponse, err := client.Chat.Completions.Models(context.TODO(), sgpdev.ChatCompletionModelsParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Items)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/chat/completions/models \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'chat.completions.models', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.chat.completions.models()\nprint(response.items)', }, typescript: { method: 'client.chat.completions.models', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.chat.completions.models();\n\nconsole.log(response.items);", }, }, }, { name: 'create', endpoint: '/v5/chat/completions', httpMethod: 'post', summary: 'Chat Completions', description: 'Chat Completions', stainlessPath: '(resource) chat.completions > (method) create', qualified: 'client.chat.completions.create', params: [ 'messages: object[];', 'model: string;', 'audio?: object;', 'frequency_penalty?: number;', 'function_call?: object;', 'functions?: object[];', 'logit_bias?: object;', 'logprobs?: boolean;', 'max_completion_tokens?: number;', 'max_tokens?: number;', 'metadata?: object;', 'modalities?: string[];', 'n?: number;', 'parallel_tool_calls?: boolean;', 'prediction?: object;', 'presence_penalty?: number;', 'reasoning_effort?: string;', 'response_format?: object;', 'seed?: number;', 'stop?: string | string[];', 'store?: boolean;', 'stream?: boolean;', 'stream_options?: object;', 'temperature?: number;', 'tool_choice?: string | object;', 'tools?: object[];', 'top_k?: number;', 'top_logprobs?: number;', 'top_p?: number;', 'x-openai-api-key?: string;', ], response: "{ id: string; choices: { finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call'; index: number; message: object; logprobs?: choice_logprobs; }[]; created: number; model: string; object?: 'chat.completion'; service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority'; system_fingerprint?: string; usage?: object; } | { id: string; choices: { delta: object; index: number; finish_reason?: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call'; logprobs?: choice_logprobs; }[]; created: number; model: string; object?: 'chat.completion.chunk'; service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority'; system_fingerprint?: string; usage?: object; }", markdown: "## create\n\n`client.chat.completions.create(messages: object[], model: string, audio?: object, frequency_penalty?: number, function_call?: object, functions?: object[], logit_bias?: object, logprobs?: boolean, max_completion_tokens?: number, max_tokens?: number, metadata?: object, modalities?: string[], n?: number, parallel_tool_calls?: boolean, prediction?: object, presence_penalty?: number, reasoning_effort?: string, response_format?: object, seed?: number, stop?: string | string[], store?: boolean, stream?: boolean, stream_options?: object, temperature?: number, tool_choice?: string | object, tools?: object[], top_k?: number, top_logprobs?: number, top_p?: number, x-openai-api-key?: string): object | object`\n\n**post** `/v5/chat/completions`\n\nChat Completions\n\n### Parameters\n\n- `messages: object[]`\n openai standard message format\n\n- `model: string`\n model specified as `model_vendor/model`, for example `openai/gpt-4o`\n\n- `audio?: object`\n Parameters for audio output. Required when audio output is requested with modalities: ['audio'].\n\n- `frequency_penalty?: number`\n Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far.\n\n- `function_call?: object`\n Deprecated in favor of tool_choice. Controls which function is called by the model.\n\n- `functions?: object[]`\n Deprecated in favor of tools. A list of functions the model may generate JSON inputs for.\n\n- `logit_bias?: object`\n Modify the likelihood of specified tokens appearing in the completion. Maps tokens to bias values from -100 to 100.\n\n- `logprobs?: boolean`\n Whether to return log probabilities of the output tokens or not.\n\n- `max_completion_tokens?: number`\n An upper bound for the number of tokens that can be generated, including visible output tokens and reasoning tokens.\n\n- `max_tokens?: number`\n Deprecated in favor of max_completion_tokens. The maximum number of tokens to generate.\n\n- `metadata?: object`\n Developer-defined tags and values used for filtering completions in the dashboard.\n\n- `modalities?: string[]`\n Output types that you would like the model to generate for this request.\n\n- `n?: number`\n How many chat completion choices to generate for each input message.\n\n- `parallel_tool_calls?: boolean`\n Whether to enable parallel function calling during tool use.\n\n- `prediction?: object`\n Static predicted output content, such as the content of a text file being regenerated.\n\n- `presence_penalty?: number`\n Number between -2.0 and 2.0. Positive values penalize tokens based on whether they appear in the text so far.\n\n- `reasoning_effort?: string`\n For o1 models only. Constrains effort on reasoning. Values: low, medium, high.\n\n- `response_format?: object`\n An object specifying the format that the model must output.\n\n- `seed?: number`\n If specified, system will attempt to sample deterministically for repeated requests with same seed.\n\n- `stop?: string | string[]`\n Up to 4 sequences where the API will stop generating further tokens.\n\n- `store?: boolean`\n Whether to store the output for use in model distillation or evals products.\n\n- `stream?: boolean`\n If true, partial message deltas will be sent as server-sent events.\n\n- `stream_options?: object`\n Options for streaming response. Only set this when stream is true.\n\n- `temperature?: number`\n What sampling temperature to use. Higher values make output more random, lower more focused.\n\n- `tool_choice?: string | object`\n Controls which tool is called by the model. Values: none, auto, required, or specific tool.\n\n- `tools?: object[]`\n A list of tools the model may call. Currently, only functions are supported. Max 128 functions.\n\n- `top_k?: number`\n Only sample from the top K options for each subsequent token\n\n- `top_logprobs?: number`\n Number of most likely tokens to return at each position, with associated log probability.\n\n- `top_p?: number`\n Alternative to temperature. Only tokens comprising top_p probability mass are considered.\n\n- `x-openai-api-key?: string`\n\n### Returns\n\n- `{ id: string; choices: { finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call'; index: number; message: object; logprobs?: choice_logprobs; }[]; created: number; model: string; object?: 'chat.completion'; service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority'; system_fingerprint?: string; usage?: object; } | { id: string; choices: { delta: object; index: number; finish_reason?: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call'; logprobs?: choice_logprobs; }[]; created: number; model: string; object?: 'chat.completion.chunk'; service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority'; system_fingerprint?: string; usage?: object; }`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst stream = await client.chat.completions.create({ messages: [{ foo: 'bar' }], model: 'model' });\nfor await (const chatCompletionChunk of stream) {\n console.log(chatCompletionChunk);\n}\n```", perLanguage: { go: { method: 'client.Chat.Completions.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tcompletion, err := client.Chat.Completions.New(context.TODO(), sgpdev.ChatCompletionNewParams{\n\t\tMessages: []map[string]any{{\n\t\t\t"foo": "bar",\n\t\t}},\n\t\tModel: "model",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", completion)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/chat/completions \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "messages": [\n {\n "foo": "bar"\n }\n ],\n "model": "model"\n }\'', }, python: { method: 'chat.completions.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nfor completion in client.chat.completions.create(\n messages=[{\n "foo": "bar"\n }],\n model="model",\n):\n print(completion)', }, typescript: { method: 'client.chat.completions.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst completion = await client.chat.completions.create({\n messages: [{ foo: 'bar' }],\n model: 'model',\n});\n\nconsole.log(completion);", }, }, }, { name: 'create', endpoint: '/v5/inference', httpMethod: 'post', summary: 'Generic Inference', description: 'Generic Inference', stainlessPath: '(resource) inference > (method) create', qualified: 'client.inference.create', params: [ 'model: string;', 'args?: object;', 'inference_configuration?: { num_retries?: number; timeout_seconds?: number; };', ], response: "{ response: object | object[] | string | number | boolean; object?: 'generic_inference'; } | { response: object | object[] | string | number | boolean; object?: 'generic_inference.chunk'; }", markdown: "## create\n\n`client.inference.create(model: string, args?: object, inference_configuration?: { num_retries?: number; timeout_seconds?: number; }): object | object`\n\n**post** `/v5/inference`\n\nGeneric Inference\n\n### Parameters\n\n- `model: string`\n model specified as `vendor/name` (ex. openai/gpt-5)\n\n- `args?: object`\n Arguments passed into model\n\n- `inference_configuration?: { num_retries?: number; timeout_seconds?: number; }`\n Vendor specific configuration\n - `num_retries?: number`\n - `timeout_seconds?: number`\n\n### Returns\n\n- `{ response: object | object[] | string | number | boolean; object?: 'generic_inference'; } | { response: object | object[] | string | number | boolean; object?: 'generic_inference.chunk'; }`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst inference = await client.inference.create({ model: 'model' });\n\nconsole.log(inference);\n```", perLanguage: { go: { method: 'client.Inference.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tinference, err := client.Inference.New(context.TODO(), sgpdev.InferenceNewParams{\n\t\tModel: "model",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", inference)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/inference \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "model": "model"\n }\'', }, python: { method: 'inference.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\ninference = client.inference.create(\n model="model",\n)\nprint(inference)', }, typescript: { method: 'client.inference.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst inference = await client.inference.create({ model: 'model' });\n\nconsole.log(inference);", }, }, }, { name: 'create', endpoint: '/v5/questions', httpMethod: 'post', summary: 'Create Question', description: 'Create Question', stainlessPath: '(resource) questions > (method) create', qualified: 'client.questions.create', params: [ "question: { configuration: { choices: string[]; dropdown?: boolean; multi?: boolean; }; name: string; prompt: string; conditions?: object[]; question_type?: 'categorical'; } | { configuration: { max_label: string; min_label: string; steps: number; }; name: string; prompt: string; conditions?: object[]; question_type?: 'rating'; } | { name: string; prompt: string; conditions?: object[]; configuration?: { max?: number; min?: number; }; question_type?: 'number'; } | { name: string; prompt: string; conditions?: object[]; configuration?: { max_length?: number; min_length?: number; }; question_type?: 'free_text'; } | { configuration: { form_schema: object; }; name: string; prompt: string; conditions?: object[]; question_type?: 'form'; } | { name: string; prompt: string; conditions?: object[]; configuration?: { multi?: boolean; }; question_type?: 'timestamp'; };", ], response: 'object | object | object | object | object | object', markdown: "## create\n\n`client.questions.create(question: { configuration: object; name: string; prompt: string; conditions?: object[]; question_type?: 'categorical'; } | { configuration: object; name: string; prompt: string; conditions?: object[]; question_type?: 'rating'; } | { name: string; prompt: string; conditions?: object[]; configuration?: object; question_type?: 'number'; } | { name: string; prompt: string; conditions?: object[]; configuration?: object; question_type?: 'free_text'; } | { configuration: object; name: string; prompt: string; conditions?: object[]; question_type?: 'form'; } | { name: string; prompt: string; conditions?: object[]; configuration?: object; question_type?: 'timestamp'; }): object | object | object | object | object | object`\n\n**post** `/v5/questions`\n\nCreate Question\n\n### Parameters\n\n- `question: { configuration: { choices: string[]; dropdown?: boolean; multi?: boolean; }; name: string; prompt: string; conditions?: object[]; question_type?: 'categorical'; } | { configuration: { max_label: string; min_label: string; steps: number; }; name: string; prompt: string; conditions?: object[]; question_type?: 'rating'; } | { name: string; prompt: string; conditions?: object[]; configuration?: { max?: number; min?: number; }; question_type?: 'number'; } | { name: string; prompt: string; conditions?: object[]; configuration?: { max_length?: number; min_length?: number; }; question_type?: 'free_text'; } | { configuration: { form_schema: object; }; name: string; prompt: string; conditions?: object[]; question_type?: 'form'; } | { name: string; prompt: string; conditions?: object[]; configuration?: { multi?: boolean; }; question_type?: 'timestamp'; }`\n\n### Returns\n\n- `{ id: string; configuration: object; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; object?: 'question'; question_type?: 'categorical'; } | { id: string; configuration: object; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; object?: 'question'; question_type?: 'rating'; } | { id: string; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; configuration?: object; object?: 'question'; question_type?: 'number'; } | { id: string; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; configuration?: object; object?: 'question'; question_type?: 'free_text'; } | { id: string; configuration: object; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; object?: 'question'; question_type?: 'form'; } | { id: string; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; configuration?: object; object?: 'question'; question_type?: 'timestamp'; }`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst question = await client.questions.create({ question: {\n configuration: { choices: ['string'] },\n name: 'name',\n prompt: 'prompt',\n question_type: 'categorical',\n} });\n\nconsole.log(question);\n```", perLanguage: { go: { method: 'client.Questions.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tquestion, err := client.Questions.New(context.TODO(), sgpdev.QuestionNewParams{\n\t\tOfCategorical: &sgpdev.QuestionNewParamsQuestionCategorical{\n\t\t\tConfiguration: sgpdev.CategoricalQuestionConfigurationParam{\n\t\t\t\tChoices: []string{"string"},\n\t\t\t},\n\t\t\tName: "name",\n\t\t\tPrompt: "prompt",\n\t\t\tQuestionType: "categorical",\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", question)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/questions \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "configuration": {\n "choices": [\n "string"\n ],\n "dropdown": true,\n "multi": true\n },\n "name": "name",\n "prompt": "prompt",\n "conditions": [\n {\n "foo": "bar"\n }\n ],\n "question_type": "categorical"\n }\'', }, python: { method: 'questions.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nquestion = client.questions.create(\n question={\n "configuration": {\n "choices": ["string"]\n },\n "name": "name",\n "prompt": "prompt",\n "question_type": "categorical",\n },\n)\nprint(question)', }, typescript: { method: 'client.questions.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst question = await client.questions.create({\n question: {\n configuration: { choices: ['string'] },\n name: 'name',\n prompt: 'prompt',\n question_type: 'categorical',\n },\n});\n\nconsole.log(question);", }, }, }, { name: 'list', endpoint: '/v5/questions', httpMethod: 'get', summary: 'List Questions', description: 'List Questions', stainlessPath: '(resource) questions > (method) list', qualified: 'client.questions.list', params: [ 'cursor?: string;', 'ending_before?: string;', 'include_archived?: boolean;', 'limit?: number;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', ], response: 'object | object | object | object | object | object', markdown: "## list\n\n`client.questions.list(cursor?: string, ending_before?: string, include_archived?: boolean, limit?: number, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string): object | object | object | object | object | object`\n\n**get** `/v5/questions`\n\nList Questions\n\n### Parameters\n\n- `cursor?: string`\n\n- `ending_before?: string`\n\n- `include_archived?: boolean`\n\n- `limit?: number`\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n### Returns\n\n- `{ id: string; configuration: object; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; object?: 'question'; question_type?: 'categorical'; } | { id: string; configuration: object; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; object?: 'question'; question_type?: 'rating'; } | { id: string; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; configuration?: object; object?: 'question'; question_type?: 'number'; } | { id: string; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; configuration?: object; object?: 'question'; question_type?: 'free_text'; } | { id: string; configuration: object; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; object?: 'question'; question_type?: 'form'; } | { id: string; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; configuration?: object; object?: 'question'; question_type?: 'timestamp'; }`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\n// Automatically fetches more pages as needed.\nfor await (const question of client.questions.list()) {\n console.log(question);\n}\n```", perLanguage: { go: { method: 'client.Questions.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tpage, err := client.Questions.List(context.TODO(), sgpdev.QuestionListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/questions \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'questions.list', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\npage = client.questions.list()\npage = page.items[0]\nprint(page)', }, typescript: { method: 'client.questions.list', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const question of client.questions.list()) {\n console.log(question);\n}", }, }, }, { name: 'retrieve', endpoint: '/v5/questions/{question_id}', httpMethod: 'get', summary: 'Get Question', description: 'Get Question', stainlessPath: '(resource) questions > (method) retrieve', qualified: 'client.questions.retrieve', params: ['question_id: string;'], response: 'object | object | object | object | object | object', markdown: "## retrieve\n\n`client.questions.retrieve(question_id: string): object | object | object | object | object | object`\n\n**get** `/v5/questions/{question_id}`\n\nGet Question\n\n### Parameters\n\n- `question_id: string`\n\n### Returns\n\n- `{ id: string; configuration: object; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; object?: 'question'; question_type?: 'categorical'; } | { id: string; configuration: object; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; object?: 'question'; question_type?: 'rating'; } | { id: string; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; configuration?: object; object?: 'question'; question_type?: 'number'; } | { id: string; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; configuration?: object; object?: 'question'; question_type?: 'free_text'; } | { id: string; configuration: object; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; object?: 'question'; question_type?: 'form'; } | { id: string; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; configuration?: object; object?: 'question'; question_type?: 'timestamp'; }`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst question = await client.questions.retrieve('question_id');\n\nconsole.log(question);\n```", perLanguage: { go: { method: 'client.Questions.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tquestion, err := client.Questions.Get(context.TODO(), "question_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", question)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/questions/$QUESTION_ID \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'questions.retrieve', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nquestion = client.questions.retrieve(\n "question_id",\n)\nprint(question)', }, typescript: { method: 'client.questions.retrieve', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst question = await client.questions.retrieve('question_id');\n\nconsole.log(question);", }, }, }, { name: 'update', endpoint: '/v5/questions/{question_id}', httpMethod: 'patch', summary: 'Update Question', description: 'Update Question', stainlessPath: '(resource) questions > (method) update', qualified: 'client.questions.update', params: ['question_id: string;', 'name: string;'], response: 'object | object | object | object | object | object', markdown: "## update\n\n`client.questions.update(question_id: string, name: string): object | object | object | object | object | object`\n\n**patch** `/v5/questions/{question_id}`\n\nUpdate Question\n\n### Parameters\n\n- `question_id: string`\n\n- `name: string`\n Display name for the question\n\n### Returns\n\n- `{ id: string; configuration: object; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; object?: 'question'; question_type?: 'categorical'; } | { id: string; configuration: object; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; object?: 'question'; question_type?: 'rating'; } | { id: string; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; configuration?: object; object?: 'question'; question_type?: 'number'; } | { id: string; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; configuration?: object; object?: 'question'; question_type?: 'free_text'; } | { id: string; configuration: object; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; object?: 'question'; question_type?: 'form'; } | { id: string; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; configuration?: object; object?: 'question'; question_type?: 'timestamp'; }`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst question = await client.questions.update('question_id', { name: 'x' });\n\nconsole.log(question);\n```", perLanguage: { go: { method: 'client.Questions.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tquestion, err := client.Questions.Update(\n\t\tcontext.TODO(),\n\t\t"question_id",\n\t\tsgpdev.QuestionUpdateParams{\n\t\t\tName: "x",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", question)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/questions/$QUESTION_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "name": "x"\n }\'', }, python: { method: 'questions.update', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nquestion = client.questions.update(\n question_id="question_id",\n name="x",\n)\nprint(question)', }, typescript: { method: 'client.questions.update', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst question = await client.questions.update('question_id', { name: 'x' });\n\nconsole.log(question);", }, }, }, { name: 'archive', endpoint: '/v5/questions/{question_id}', httpMethod: 'delete', summary: 'Archive Question', description: 'Archive a question by setting archived_at in the db', stainlessPath: '(resource) questions > (method) archive', qualified: 'client.questions.archive', params: ['question_id: string;'], response: 'object | object | object | object | object | object', markdown: "## archive\n\n`client.questions.archive(question_id: string): object | object | object | object | object | object`\n\n**delete** `/v5/questions/{question_id}`\n\nArchive a question by setting archived_at in the db\n\n### Parameters\n\n- `question_id: string`\n\n### Returns\n\n- `{ id: string; configuration: object; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; object?: 'question'; question_type?: 'categorical'; } | { id: string; configuration: object; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; object?: 'question'; question_type?: 'rating'; } | { id: string; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; configuration?: object; object?: 'question'; question_type?: 'number'; } | { id: string; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; configuration?: object; object?: 'question'; question_type?: 'free_text'; } | { id: string; configuration: object; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; object?: 'question'; question_type?: 'form'; } | { id: string; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; configuration?: object; object?: 'question'; question_type?: 'timestamp'; }`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst question = await client.questions.archive('question_id');\n\nconsole.log(question);\n```", perLanguage: { go: { method: 'client.Questions.Archive', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tquestion, err := client.Questions.Archive(context.TODO(), "question_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", question)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/questions/$QUESTION_ID \\\n -X DELETE \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'questions.archive', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nquestion = client.questions.archive(\n "question_id",\n)\nprint(question)', }, typescript: { method: 'client.questions.archive', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst question = await client.questions.archive('question_id');\n\nconsole.log(question);", }, }, }, { name: 'restore', endpoint: '/v5/questions/{question_id}/restore', httpMethod: 'post', summary: 'Restore Archived Question', description: 'Restore Archived Question', stainlessPath: '(resource) questions > (method) restore', qualified: 'client.questions.restore', params: ['question_id: string;'], response: 'object | object | object | object | object | object', markdown: "## restore\n\n`client.questions.restore(question_id: string): object | object | object | object | object | object`\n\n**post** `/v5/questions/{question_id}/restore`\n\nRestore Archived Question\n\n### Parameters\n\n- `question_id: string`\n\n### Returns\n\n- `{ id: string; configuration: object; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; object?: 'question'; question_type?: 'categorical'; } | { id: string; configuration: object; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; object?: 'question'; question_type?: 'rating'; } | { id: string; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; configuration?: object; object?: 'question'; question_type?: 'number'; } | { id: string; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; configuration?: object; object?: 'question'; question_type?: 'free_text'; } | { id: string; configuration: object; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; object?: 'question'; question_type?: 'form'; } | { id: string; created_at: string; created_by: object; name: string; prompt: string; archived_at?: string; conditions?: object[]; configuration?: object; object?: 'question'; question_type?: 'timestamp'; }`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst question = await client.questions.restore('question_id');\n\nconsole.log(question);\n```", perLanguage: { go: { method: 'client.Questions.Restore', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tquestion, err := client.Questions.Restore(context.TODO(), "question_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", question)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/questions/$QUESTION_ID/restore \\\n -X POST \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'questions.restore', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nquestion = client.questions.restore(\n "question_id",\n)\nprint(question)', }, typescript: { method: 'client.questions.restore', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst question = await client.questions.restore('question_id');\n\nconsole.log(question);", }, }, }, { name: 'create', endpoint: '/v5/files', httpMethod: 'post', summary: 'Upload File', description: 'Upload File', stainlessPath: '(resource) files > (method) create', qualified: 'client.files.create', params: ['file: string;'], response: "{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; filename: string; md5_checksum: string; mime_type: string; size: number; duration_seconds?: number; object?: 'file'; tags?: object; }", markdown: "## create\n\n`client.files.create(file: string): { id: string; created_at: string; created_by: identity; filename: string; md5_checksum: string; mime_type: string; size: number; duration_seconds?: number; object?: 'file'; tags?: object; }`\n\n**post** `/v5/files`\n\nUpload File\n\n### Parameters\n\n- `file: string`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; filename: string; md5_checksum: string; mime_type: string; size: number; duration_seconds?: number; object?: 'file'; tags?: object; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `filename: string`\n - `md5_checksum: string`\n - `mime_type: string`\n - `size: number`\n - `duration_seconds?: number`\n - `object?: 'file'`\n - `tags?: object`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst sgpFile = await client.files.create({ file: fs.createReadStream('path/to/file') });\n\nconsole.log(sgpFile);\n```", perLanguage: { go: { method: 'client.Files.New', example: 'package main\n\nimport (\n\t"bytes"\n\t"context"\n\t"fmt"\n\t"io"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tsgpFile, err := client.Files.New(context.TODO(), sgpdev.FileNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte("Example data"))),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", sgpFile.ID)\n}\n', }, http: { example: "curl https://api.egp.scale.com/v5/files \\\n -H 'Content-Type: multipart/form-data' \\\n -H \"x-api-key: $SGP_API_KEY\" \\\n -F 'file=@/path/to/file'", }, python: { method: 'files.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nsgp_file = client.files.create(\n file=b"Example data",\n)\nprint(sgp_file.id)', }, typescript: { method: 'client.files.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst sgpFile = await client.files.create({ file: fs.createReadStream('path/to/file') });\n\nconsole.log(sgpFile.id);", }, }, }, { name: 'import_from_cloud', endpoint: '/v5/files/cloud_imports', httpMethod: 'post', summary: 'Import files from existing blob storage in cloud (batch operation)', description: 'Import files from existing blob storage in cloud (batch operation)', stainlessPath: '(resource) files > (method) import_from_cloud', qualified: 'client.files.importFromCloud', params: ['files: { container: string; file_type: string; filename: string; filepath: string; }[];'], response: "{ results: { file: object | { filename: string; mime_type: string; object?: 'failed_file'; }; status: 'SUCCESS' | 'FAILED_FILE_DOES_NOT_EXIST' | 'FAILED_INVALID_PERMISSIONS' | 'FAILED_UNKNOWN_ERROR'; }[]; }", markdown: "## import_from_cloud\n\n`client.files.importFromCloud(files: { container: string; file_type: string; filename: string; filepath: string; }[]): { results: object[]; }`\n\n**post** `/v5/files/cloud_imports`\n\nImport files from existing blob storage in cloud (batch operation)\n\n### Parameters\n\n- `files: { container: string; file_type: string; filename: string; filepath: string; }[]`\n List of files to import from cloud storage\n\n### Returns\n\n- `{ results: { file: object | { filename: string; mime_type: string; object?: 'failed_file'; }; status: 'SUCCESS' | 'FAILED_FILE_DOES_NOT_EXIST' | 'FAILED_INVALID_PERMISSIONS' | 'FAILED_UNKNOWN_ERROR'; }[]; }`\n\n - `results: { file: { id: string; created_at: string; created_by: object; filename: string; md5_checksum: string; mime_type: string; size: number; duration_seconds?: number; object?: 'file'; tags?: object; } | { filename: string; mime_type: string; object?: 'failed_file'; }; status: 'SUCCESS' | 'FAILED_FILE_DOES_NOT_EXIST' | 'FAILED_INVALID_PERMISSIONS' | 'FAILED_UNKNOWN_ERROR'; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst response = await client.files.importFromCloud({ files: [{\n container: 'container',\n file_type: 'file_type',\n filename: 'filename',\n filepath: 'filepath',\n}] });\n\nconsole.log(response);\n```", perLanguage: { go: { method: 'client.Files.ImportFromCloud', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tresponse, err := client.Files.ImportFromCloud(context.TODO(), sgpdev.FileImportFromCloudParams{\n\t\tFiles: []sgpdev.FileImportFromCloudParamsFile{{\n\t\t\tContainer: "container",\n\t\t\tFileType: "file_type",\n\t\t\tFilename: "filename",\n\t\t\tFilepath: "filepath",\n\t\t}},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Results)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/files/cloud_imports \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "files": [\n {\n "container": "container",\n "file_type": "file_type",\n "filename": "filename",\n "filepath": "filepath"\n }\n ]\n }\'', }, python: { method: 'files.import_from_cloud', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.files.import_from_cloud(\n files=[{\n "container": "container",\n "file_type": "file_type",\n "filename": "filename",\n "filepath": "filepath",\n }],\n)\nprint(response.results)', }, typescript: { method: 'client.files.importFromCloud', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.files.importFromCloud({\n files: [\n {\n container: 'container',\n file_type: 'file_type',\n filename: 'filename',\n filepath: 'filepath',\n },\n ],\n});\n\nconsole.log(response.results);", }, }, }, { name: 'list', endpoint: '/v5/files', httpMethod: 'get', summary: 'List Files', description: 'List Files', stainlessPath: '(resource) files > (method) list', qualified: 'client.files.list', params: [ 'cursor?: string;', 'ending_before?: string;', 'filename?: string;', 'limit?: number;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', ], response: "{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; filename: string; md5_checksum: string; mime_type: string; size: number; duration_seconds?: number; object?: 'file'; tags?: object; }", markdown: "## list\n\n`client.files.list(cursor?: string, ending_before?: string, filename?: string, limit?: number, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string): { id: string; created_at: string; created_by: identity; filename: string; md5_checksum: string; mime_type: string; size: number; duration_seconds?: number; object?: 'file'; tags?: object; }`\n\n**get** `/v5/files`\n\nList Files\n\n### Parameters\n\n- `cursor?: string`\n\n- `ending_before?: string`\n\n- `filename?: string`\n Filter files by filename (case-insensitive partial match)\n\n- `limit?: number`\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; filename: string; md5_checksum: string; mime_type: string; size: number; duration_seconds?: number; object?: 'file'; tags?: object; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `filename: string`\n - `md5_checksum: string`\n - `mime_type: string`\n - `size: number`\n - `duration_seconds?: number`\n - `object?: 'file'`\n - `tags?: object`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\n// Automatically fetches more pages as needed.\nfor await (const sgpFile of client.files.list()) {\n console.log(sgpFile);\n}\n```", perLanguage: { go: { method: 'client.Files.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tpage, err := client.Files.List(context.TODO(), sgpdev.FileListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/files \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'files.list', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\npage = client.files.list()\npage = page.items[0]\nprint(page.id)', }, typescript: { method: 'client.files.list', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const sgpFile of client.files.list()) {\n console.log(sgpFile.id);\n}", }, }, }, { name: 'update', endpoint: '/v5/files/{file_id}', httpMethod: 'patch', summary: 'Update File', description: 'Update File', stainlessPath: '(resource) files > (method) update', qualified: 'client.files.update', params: ['file_id: string;', 'tags?: object;'], response: "{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; filename: string; md5_checksum: string; mime_type: string; size: number; duration_seconds?: number; object?: 'file'; tags?: object; }", markdown: "## update\n\n`client.files.update(file_id: string, tags?: object): { id: string; created_at: string; created_by: identity; filename: string; md5_checksum: string; mime_type: string; size: number; duration_seconds?: number; object?: 'file'; tags?: object; }`\n\n**patch** `/v5/files/{file_id}`\n\nUpdate File\n\n### Parameters\n\n- `file_id: string`\n\n- `tags?: object`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; filename: string; md5_checksum: string; mime_type: string; size: number; duration_seconds?: number; object?: 'file'; tags?: object; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `filename: string`\n - `md5_checksum: string`\n - `mime_type: string`\n - `size: number`\n - `duration_seconds?: number`\n - `object?: 'file'`\n - `tags?: object`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst sgpFile = await client.files.update('file_id');\n\nconsole.log(sgpFile);\n```", perLanguage: { go: { method: 'client.Files.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tsgpFile, err := client.Files.Update(\n\t\tcontext.TODO(),\n\t\t"file_id",\n\t\tsgpdev.FileUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", sgpFile.ID)\n}\n', }, http: { example: "curl https://api.egp.scale.com/v5/files/$FILE_ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"x-api-key: $SGP_API_KEY\" \\\n -d '{}'", }, python: { method: 'files.update', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nsgp_file = client.files.update(\n file_id="file_id",\n)\nprint(sgp_file.id)', }, typescript: { method: 'client.files.update', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst sgpFile = await client.files.update('file_id');\n\nconsole.log(sgpFile.id);", }, }, }, { name: 'retrieve', endpoint: '/v5/files/{file_id}', httpMethod: 'get', summary: 'Get File', description: 'Get File', stainlessPath: '(resource) files > (method) retrieve', qualified: 'client.files.retrieve', params: ['file_id: string;'], response: "{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; filename: string; md5_checksum: string; mime_type: string; size: number; duration_seconds?: number; object?: 'file'; tags?: object; }", markdown: "## retrieve\n\n`client.files.retrieve(file_id: string): { id: string; created_at: string; created_by: identity; filename: string; md5_checksum: string; mime_type: string; size: number; duration_seconds?: number; object?: 'file'; tags?: object; }`\n\n**get** `/v5/files/{file_id}`\n\nGet File\n\n### Parameters\n\n- `file_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; filename: string; md5_checksum: string; mime_type: string; size: number; duration_seconds?: number; object?: 'file'; tags?: object; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `filename: string`\n - `md5_checksum: string`\n - `mime_type: string`\n - `size: number`\n - `duration_seconds?: number`\n - `object?: 'file'`\n - `tags?: object`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst sgpFile = await client.files.retrieve('file_id');\n\nconsole.log(sgpFile);\n```", perLanguage: { go: { method: 'client.Files.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tsgpFile, err := client.Files.Get(context.TODO(), "file_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", sgpFile.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/files/$FILE_ID \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'files.retrieve', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nsgp_file = client.files.retrieve(\n "file_id",\n)\nprint(sgp_file.id)', }, typescript: { method: 'client.files.retrieve', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst sgpFile = await client.files.retrieve('file_id');\n\nconsole.log(sgpFile.id);", }, }, }, { name: 'delete', endpoint: '/v5/files/{file_id}', httpMethod: 'delete', summary: 'Delete File', description: 'Delete File', stainlessPath: '(resource) files > (method) delete', qualified: 'client.files.delete', params: ['file_id: string;'], response: "{ id: string; deleted: boolean; object?: 'file'; }", markdown: "## delete\n\n`client.files.delete(file_id: string): { id: string; deleted: boolean; object?: 'file'; }`\n\n**delete** `/v5/files/{file_id}`\n\nDelete File\n\n### Parameters\n\n- `file_id: string`\n\n### Returns\n\n- `{ id: string; deleted: boolean; object?: 'file'; }`\n\n - `id: string`\n - `deleted: boolean`\n - `object?: 'file'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst file = await client.files.delete('file_id');\n\nconsole.log(file);\n```", perLanguage: { go: { method: 'client.Files.Delete', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tfile, err := client.Files.Delete(context.TODO(), "file_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", file.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/files/$FILE_ID \\\n -X DELETE \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'files.delete', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nfile = client.files.delete(\n "file_id",\n)\nprint(file.id)', }, typescript: { method: 'client.files.delete', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst file = await client.files.delete('file_id');\n\nconsole.log(file.id);", }, }, }, { name: 'retrieve', endpoint: '/v5/files/{file_id}/content', httpMethod: 'get', summary: 'Get File Content', description: 'Get File Content', stainlessPath: '(resource) files.content > (method) retrieve', qualified: 'client.files.content.retrieve', params: ['file_id: string;'], response: 'object', markdown: "## retrieve\n\n`client.files.content.retrieve(file_id: string): object`\n\n**get** `/v5/files/{file_id}/content`\n\nGet File Content\n\n### Parameters\n\n- `file_id: string`\n\n### Returns\n\n- `object`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst content = await client.files.content.retrieve('file_id');\n\nconsole.log(content);\n```", perLanguage: { go: { method: 'client.Files.Content.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tcontent, err := client.Files.Content.Get(context.TODO(), "file_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", content)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/files/$FILE_ID/content \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'files.content.retrieve', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\ncontent = client.files.content.retrieve(\n "file_id",\n)\nprint(content)', }, typescript: { method: 'client.files.content.retrieve', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst content = await client.files.content.retrieve('file_id');\n\nconsole.log(content);", }, }, }, { name: 'create', endpoint: '/v5/models', httpMethod: 'post', summary: 'Create Model', description: 'Create Model', stainlessPath: '(resource) models > (method) create', qualified: 'client.models.create', params: [ "model: { name: string; vendor_configuration: { model_image: { command: string[]; registry: string; repository: string; tag: string; env_vars?: object; healthcheck_route?: string; predict_route?: string; readiness_delay?: number; request_schema?: object; response_schema?: object; streaming_command?: string[]; streaming_predict_route?: string; }; model_infra: { cpus?: string | number; endpoint_type?: 'async' | 'sync' | 'streaming'; gpu_type?: string; gpus?: number; high_priority?: boolean; labels?: object; max_workers?: number; memory?: string; min_workers?: number; per_worker?: number; public_inference?: boolean; storage?: string; }; }; model_metadata?: object; model_type?: 'generic'; model_vendor?: 'launch'; on_conflict?: 'error' | 'update'; } | { name: string; vendor_configuration: { model: string; checkpoint_path?: string; cpus?: number; default_callback_url?: string; endpoint_type?: string; gpu_type?: string; gpus?: number; high_priority?: boolean; inference_framework?: string; inference_framework_image_tag?: string; labels?: object; max_workers?: number; memory?: string; min_workers?: number; nodes_per_worker?: number; num_shards?: number; per_worker?: number; post_inference_hooks?: string[]; public_inference?: boolean; quantize?: string; source?: string; storage?: string; }; model_metadata?: object; model_type?: 'chat_completion'; model_vendor?: 'llmengine'; on_conflict?: 'error' | 'update'; };", ], response: "{ id: string; created_at: string; created_by_identity_type: 'user' | 'service_account'; created_by_user_id: string; model_type: 'generic' | 'completion' | 'chat_completion'; model_vendor: string; name: string; status: 'failed' | 'ready' | 'deploying' | 'deployment_timeout'; model_availability?: 'unknown' | 'available' | 'unavailable'; model_metadata?: object; object?: 'model'; vendor_configuration?: { model_image: object; model_infra: object; } | { model: string; checkpoint_path?: string; cpus?: number; default_callback_url?: string; endpoint_type?: string; gpu_type?: string; gpus?: number; high_priority?: boolean; inference_framework?: string; inference_framework_image_tag?: string; labels?: object; max_workers?: number; memory?: string; min_workers?: number; nodes_per_worker?: number; num_shards?: number; per_worker?: number; post_inference_hooks?: string[]; public_inference?: boolean; quantize?: string; source?: string; storage?: string; }; }", markdown: "## create\n\n`client.models.create(model: { name: string; vendor_configuration: object; model_metadata?: object; model_type?: 'generic'; model_vendor?: 'launch'; on_conflict?: 'error' | 'update'; } | { name: string; vendor_configuration: object; model_metadata?: object; model_type?: 'chat_completion'; model_vendor?: 'llmengine'; on_conflict?: 'error' | 'update'; }): { id: string; created_at: string; created_by_identity_type: 'user' | 'service_account'; created_by_user_id: string; model_type: 'generic' | 'completion' | 'chat_completion'; model_vendor: string; name: string; status: 'failed' | 'ready' | 'deploying' | 'deployment_timeout'; model_availability?: 'unknown' | 'available' | 'unavailable'; model_metadata?: object; object?: 'model'; vendor_configuration?: launch_vendor_configuration | llm_engine_vendor_configuration; }`\n\n**post** `/v5/models`\n\nCreate Model\n\n### Parameters\n\n- `model: { name: string; vendor_configuration: { model_image: { command: string[]; registry: string; repository: string; tag: string; env_vars?: object; healthcheck_route?: string; predict_route?: string; readiness_delay?: number; request_schema?: object; response_schema?: object; streaming_command?: string[]; streaming_predict_route?: string; }; model_infra: { cpus?: string | number; endpoint_type?: 'async' | 'sync' | 'streaming'; gpu_type?: string; gpus?: number; high_priority?: boolean; labels?: object; max_workers?: number; memory?: string; min_workers?: number; per_worker?: number; public_inference?: boolean; storage?: string; }; }; model_metadata?: object; model_type?: 'generic'; model_vendor?: 'launch'; on_conflict?: 'error' | 'update'; } | { name: string; vendor_configuration: { model: string; checkpoint_path?: string; cpus?: number; default_callback_url?: string; endpoint_type?: string; gpu_type?: string; gpus?: number; high_priority?: boolean; inference_framework?: string; inference_framework_image_tag?: string; labels?: object; max_workers?: number; memory?: string; min_workers?: number; nodes_per_worker?: number; num_shards?: number; per_worker?: number; post_inference_hooks?: string[]; public_inference?: boolean; quantize?: string; source?: string; storage?: string; }; model_metadata?: object; model_type?: 'chat_completion'; model_vendor?: 'llmengine'; on_conflict?: 'error' | 'update'; }`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by_identity_type: 'user' | 'service_account'; created_by_user_id: string; model_type: 'generic' | 'completion' | 'chat_completion'; model_vendor: string; name: string; status: 'failed' | 'ready' | 'deploying' | 'deployment_timeout'; model_availability?: 'unknown' | 'available' | 'unavailable'; model_metadata?: object; object?: 'model'; vendor_configuration?: { model_image: object; model_infra: object; } | { model: string; checkpoint_path?: string; cpus?: number; default_callback_url?: string; endpoint_type?: string; gpu_type?: string; gpus?: number; high_priority?: boolean; inference_framework?: string; inference_framework_image_tag?: string; labels?: object; max_workers?: number; memory?: string; min_workers?: number; nodes_per_worker?: number; num_shards?: number; per_worker?: number; post_inference_hooks?: string[]; public_inference?: boolean; quantize?: string; source?: string; storage?: string; }; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by_identity_type: 'user' | 'service_account'`\n - `created_by_user_id: string`\n - `model_type: 'generic' | 'completion' | 'chat_completion'`\n - `model_vendor: string`\n - `name: string`\n - `status: 'failed' | 'ready' | 'deploying' | 'deployment_timeout'`\n - `model_availability?: 'unknown' | 'available' | 'unavailable'`\n - `model_metadata?: object`\n - `object?: 'model'`\n - `vendor_configuration?: { model_image: { command: string[]; registry: string; repository: string; tag: string; env_vars?: object; healthcheck_route?: string; predict_route?: string; readiness_delay?: number; request_schema?: object; response_schema?: object; streaming_command?: string[]; streaming_predict_route?: string; }; model_infra: { cpus?: string | number; endpoint_type?: 'async' | 'sync' | 'streaming'; gpu_type?: string; gpus?: number; high_priority?: boolean; labels?: object; max_workers?: number; memory?: string; min_workers?: number; per_worker?: number; public_inference?: boolean; storage?: string; }; } | { model: string; checkpoint_path?: string; cpus?: number; default_callback_url?: string; endpoint_type?: string; gpu_type?: string; gpus?: number; high_priority?: boolean; inference_framework?: string; inference_framework_image_tag?: string; labels?: object; max_workers?: number; memory?: string; min_workers?: number; nodes_per_worker?: number; num_shards?: number; per_worker?: number; post_inference_hooks?: string[]; public_inference?: boolean; quantize?: string; source?: string; storage?: string; }`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst inferenceModel = await client.models.create({ model: {\n name: 'name',\n vendor_configuration: {\n model_image: {\n command: ['string'],\n registry: 'registry',\n repository: 'repository',\n tag: 'tag',\n},\n model_infra: {},\n},\n model_vendor: 'launch',\n} });\n\nconsole.log(inferenceModel);\n```", perLanguage: { go: { method: 'client.Models.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tinferenceModel, err := client.Models.New(context.TODO(), sgpdev.ModelNewParams{\n\t\tOfLaunch: &sgpdev.ModelNewParamsModelLaunch{\n\t\t\tName: "name",\n\t\t\tVendorConfiguration: sgpdev.LaunchVendorConfigurationParam{\n\t\t\t\tModelImage: sgpdev.LaunchVendorConfigurationModelImageParam{\n\t\t\t\t\tCommand: []string{"string"},\n\t\t\t\t\tRegistry: "registry",\n\t\t\t\t\tRepository: "repository",\n\t\t\t\t\tTag: "tag",\n\t\t\t\t},\n\t\t\t\tModelInfra: sgpdev.LaunchVendorConfigurationModelInfraParam{},\n\t\t\t},\n\t\t\tModelVendor: "launch",\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", inferenceModel.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/models \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "name": "name",\n "vendor_configuration": {\n "model_image": {\n "command": [\n "string"\n ],\n "registry": "registry",\n "repository": "repository",\n "tag": "tag",\n "env_vars": {\n "foo": "bar"\n },\n "healthcheck_route": "healthcheck_route",\n "predict_route": "predict_route",\n "readiness_delay": 0,\n "request_schema": {\n "foo": "bar"\n },\n "response_schema": {\n "foo": "bar"\n },\n "streaming_command": [\n "string"\n ],\n "streaming_predict_route": "streaming_predict_route"\n },\n "model_infra": {\n "cpus": "string",\n "endpoint_type": "async",\n "gpu_type": "nvidia-tesla-t4",\n "gpus": 0,\n "high_priority": true,\n "labels": {\n "foo": "string"\n },\n "max_workers": 0,\n "memory": "memory",\n "min_workers": 0,\n "per_worker": 0,\n "public_inference": true,\n "storage": "storage"\n }\n },\n "model_metadata": {\n "foo": "bar"\n },\n "model_type": "generic",\n "model_vendor": "launch",\n "on_conflict": "error"\n }\'', }, python: { method: 'models.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\ninference_model = client.models.create(\n model={\n "name": "name",\n "vendor_configuration": {\n "model_image": {\n "command": ["string"],\n "registry": "registry",\n "repository": "repository",\n "tag": "tag",\n },\n "model_infra": {},\n },\n "model_vendor": "launch",\n },\n)\nprint(inference_model.id)', }, typescript: { method: 'client.models.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst inferenceModel = await client.models.create({\n model: {\n name: 'name',\n vendor_configuration: {\n model_image: {\n command: ['string'],\n registry: 'registry',\n repository: 'repository',\n tag: 'tag',\n },\n model_infra: {},\n },\n model_vendor: 'launch',\n },\n});\n\nconsole.log(inferenceModel.id);", }, }, }, { name: 'list', endpoint: '/v5/models', httpMethod: 'get', summary: 'List Models', description: 'List Models', stainlessPath: '(resource) models > (method) list', qualified: 'client.models.list', params: [ 'cursor?: string;', 'ending_before?: string;', 'limit?: number;', 'model_vendor?: string;', 'name?: string;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', ], response: "{ id: string; created_at: string; created_by_identity_type: 'user' | 'service_account'; created_by_user_id: string; model_type: 'generic' | 'completion' | 'chat_completion'; model_vendor: string; name: string; status: 'failed' | 'ready' | 'deploying' | 'deployment_timeout'; model_availability?: 'unknown' | 'available' | 'unavailable'; model_metadata?: object; object?: 'model'; vendor_configuration?: { model_image: object; model_infra: object; } | { model: string; checkpoint_path?: string; cpus?: number; default_callback_url?: string; endpoint_type?: string; gpu_type?: string; gpus?: number; high_priority?: boolean; inference_framework?: string; inference_framework_image_tag?: string; labels?: object; max_workers?: number; memory?: string; min_workers?: number; nodes_per_worker?: number; num_shards?: number; per_worker?: number; post_inference_hooks?: string[]; public_inference?: boolean; quantize?: string; source?: string; storage?: string; }; }", markdown: "## list\n\n`client.models.list(cursor?: string, ending_before?: string, limit?: number, model_vendor?: string, name?: string, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string): { id: string; created_at: string; created_by_identity_type: 'user' | 'service_account'; created_by_user_id: string; model_type: 'generic' | 'completion' | 'chat_completion'; model_vendor: string; name: string; status: 'failed' | 'ready' | 'deploying' | 'deployment_timeout'; model_availability?: 'unknown' | 'available' | 'unavailable'; model_metadata?: object; object?: 'model'; vendor_configuration?: launch_vendor_configuration | llm_engine_vendor_configuration; }`\n\n**get** `/v5/models`\n\nList Models\n\n### Parameters\n\n- `cursor?: string`\n\n- `ending_before?: string`\n\n- `limit?: number`\n\n- `model_vendor?: string`\n\n- `name?: string`\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by_identity_type: 'user' | 'service_account'; created_by_user_id: string; model_type: 'generic' | 'completion' | 'chat_completion'; model_vendor: string; name: string; status: 'failed' | 'ready' | 'deploying' | 'deployment_timeout'; model_availability?: 'unknown' | 'available' | 'unavailable'; model_metadata?: object; object?: 'model'; vendor_configuration?: { model_image: object; model_infra: object; } | { model: string; checkpoint_path?: string; cpus?: number; default_callback_url?: string; endpoint_type?: string; gpu_type?: string; gpus?: number; high_priority?: boolean; inference_framework?: string; inference_framework_image_tag?: string; labels?: object; max_workers?: number; memory?: string; min_workers?: number; nodes_per_worker?: number; num_shards?: number; per_worker?: number; post_inference_hooks?: string[]; public_inference?: boolean; quantize?: string; source?: string; storage?: string; }; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by_identity_type: 'user' | 'service_account'`\n - `created_by_user_id: string`\n - `model_type: 'generic' | 'completion' | 'chat_completion'`\n - `model_vendor: string`\n - `name: string`\n - `status: 'failed' | 'ready' | 'deploying' | 'deployment_timeout'`\n - `model_availability?: 'unknown' | 'available' | 'unavailable'`\n - `model_metadata?: object`\n - `object?: 'model'`\n - `vendor_configuration?: { model_image: { command: string[]; registry: string; repository: string; tag: string; env_vars?: object; healthcheck_route?: string; predict_route?: string; readiness_delay?: number; request_schema?: object; response_schema?: object; streaming_command?: string[]; streaming_predict_route?: string; }; model_infra: { cpus?: string | number; endpoint_type?: 'async' | 'sync' | 'streaming'; gpu_type?: string; gpus?: number; high_priority?: boolean; labels?: object; max_workers?: number; memory?: string; min_workers?: number; per_worker?: number; public_inference?: boolean; storage?: string; }; } | { model: string; checkpoint_path?: string; cpus?: number; default_callback_url?: string; endpoint_type?: string; gpu_type?: string; gpus?: number; high_priority?: boolean; inference_framework?: string; inference_framework_image_tag?: string; labels?: object; max_workers?: number; memory?: string; min_workers?: number; nodes_per_worker?: number; num_shards?: number; per_worker?: number; post_inference_hooks?: string[]; public_inference?: boolean; quantize?: string; source?: string; storage?: string; }`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\n// Automatically fetches more pages as needed.\nfor await (const inferenceModel of client.models.list()) {\n console.log(inferenceModel);\n}\n```", perLanguage: { go: { method: 'client.Models.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tpage, err := client.Models.List(context.TODO(), sgpdev.ModelListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/models \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'models.list', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\npage = client.models.list()\npage = page.items[0]\nprint(page.id)', }, typescript: { method: 'client.models.list', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const inferenceModel of client.models.list()) {\n console.log(inferenceModel.id);\n}", }, }, }, { name: 'update', endpoint: '/v5/models/{model_id}', httpMethod: 'patch', summary: 'Update Model', description: 'Update Model', stainlessPath: '(resource) models > (method) update', qualified: 'client.models.update', params: [ 'model_id: string;', "model: { model_metadata?: object; } | { vendor_configuration: { model_image?: { command?: string[]; env_vars?: object; healthcheck_route?: string; predict_route?: string; readiness_delay?: number; registry?: string; repository?: string; request_schema?: object; response_schema?: object; streaming_command?: string[]; streaming_predict_route?: string; tag?: string; }; model_infra?: { cpus?: string | number; endpoint_type?: 'async' | 'sync' | 'streaming'; gpu_type?: string; gpus?: number; high_priority?: boolean; labels?: object; max_workers?: number; memory?: string; min_workers?: number; per_worker?: number; public_inference?: boolean; storage?: string; }; } | { checkpoint_path?: string; cpus?: number; default_callback_url?: string; endpoint_type?: string; gpu_type?: string; gpus?: number; high_priority?: boolean; inference_framework?: string; inference_framework_image_tag?: string; labels?: object; max_workers?: number; memory?: string; min_workers?: number; model?: string; nodes_per_worker?: number; num_shards?: number; per_worker?: number; post_inference_hooks?: string[]; public_inference?: boolean; quantize?: string; source?: string; storage?: string; }; model_metadata?: object; } | { name: string; on_conflict?: 'error' | 'swap'; };", ], response: "{ id: string; created_at: string; created_by_identity_type: 'user' | 'service_account'; created_by_user_id: string; model_type: 'generic' | 'completion' | 'chat_completion'; model_vendor: string; name: string; status: 'failed' | 'ready' | 'deploying' | 'deployment_timeout'; model_availability?: 'unknown' | 'available' | 'unavailable'; model_metadata?: object; object?: 'model'; vendor_configuration?: { model_image: object; model_infra: object; } | { model: string; checkpoint_path?: string; cpus?: number; default_callback_url?: string; endpoint_type?: string; gpu_type?: string; gpus?: number; high_priority?: boolean; inference_framework?: string; inference_framework_image_tag?: string; labels?: object; max_workers?: number; memory?: string; min_workers?: number; nodes_per_worker?: number; num_shards?: number; per_worker?: number; post_inference_hooks?: string[]; public_inference?: boolean; quantize?: string; source?: string; storage?: string; }; }", markdown: "## update\n\n`client.models.update(model_id: string, model: { model_metadata?: object; } | { vendor_configuration: { model_image?: object; model_infra?: object; } | { checkpoint_path?: string; cpus?: number; default_callback_url?: string; endpoint_type?: string; gpu_type?: string; gpus?: number; high_priority?: boolean; inference_framework?: string; inference_framework_image_tag?: string; labels?: object; max_workers?: number; memory?: string; min_workers?: number; model?: string; nodes_per_worker?: number; num_shards?: number; per_worker?: number; post_inference_hooks?: string[]; public_inference?: boolean; quantize?: string; source?: string; storage?: string; }; model_metadata?: object; } | { name: string; on_conflict?: 'error' | 'swap'; }): { id: string; created_at: string; created_by_identity_type: 'user' | 'service_account'; created_by_user_id: string; model_type: 'generic' | 'completion' | 'chat_completion'; model_vendor: string; name: string; status: 'failed' | 'ready' | 'deploying' | 'deployment_timeout'; model_availability?: 'unknown' | 'available' | 'unavailable'; model_metadata?: object; object?: 'model'; vendor_configuration?: launch_vendor_configuration | llm_engine_vendor_configuration; }`\n\n**patch** `/v5/models/{model_id}`\n\nUpdate Model\n\n### Parameters\n\n- `model_id: string`\n\n- `model: { model_metadata?: object; } | { vendor_configuration: { model_image?: { command?: string[]; env_vars?: object; healthcheck_route?: string; predict_route?: string; readiness_delay?: number; registry?: string; repository?: string; request_schema?: object; response_schema?: object; streaming_command?: string[]; streaming_predict_route?: string; tag?: string; }; model_infra?: { cpus?: string | number; endpoint_type?: 'async' | 'sync' | 'streaming'; gpu_type?: string; gpus?: number; high_priority?: boolean; labels?: object; max_workers?: number; memory?: string; min_workers?: number; per_worker?: number; public_inference?: boolean; storage?: string; }; } | { checkpoint_path?: string; cpus?: number; default_callback_url?: string; endpoint_type?: string; gpu_type?: string; gpus?: number; high_priority?: boolean; inference_framework?: string; inference_framework_image_tag?: string; labels?: object; max_workers?: number; memory?: string; min_workers?: number; model?: string; nodes_per_worker?: number; num_shards?: number; per_worker?: number; post_inference_hooks?: string[]; public_inference?: boolean; quantize?: string; source?: string; storage?: string; }; model_metadata?: object; } | { name: string; on_conflict?: 'error' | 'swap'; }`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by_identity_type: 'user' | 'service_account'; created_by_user_id: string; model_type: 'generic' | 'completion' | 'chat_completion'; model_vendor: string; name: string; status: 'failed' | 'ready' | 'deploying' | 'deployment_timeout'; model_availability?: 'unknown' | 'available' | 'unavailable'; model_metadata?: object; object?: 'model'; vendor_configuration?: { model_image: object; model_infra: object; } | { model: string; checkpoint_path?: string; cpus?: number; default_callback_url?: string; endpoint_type?: string; gpu_type?: string; gpus?: number; high_priority?: boolean; inference_framework?: string; inference_framework_image_tag?: string; labels?: object; max_workers?: number; memory?: string; min_workers?: number; nodes_per_worker?: number; num_shards?: number; per_worker?: number; post_inference_hooks?: string[]; public_inference?: boolean; quantize?: string; source?: string; storage?: string; }; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by_identity_type: 'user' | 'service_account'`\n - `created_by_user_id: string`\n - `model_type: 'generic' | 'completion' | 'chat_completion'`\n - `model_vendor: string`\n - `name: string`\n - `status: 'failed' | 'ready' | 'deploying' | 'deployment_timeout'`\n - `model_availability?: 'unknown' | 'available' | 'unavailable'`\n - `model_metadata?: object`\n - `object?: 'model'`\n - `vendor_configuration?: { model_image: { command: string[]; registry: string; repository: string; tag: string; env_vars?: object; healthcheck_route?: string; predict_route?: string; readiness_delay?: number; request_schema?: object; response_schema?: object; streaming_command?: string[]; streaming_predict_route?: string; }; model_infra: { cpus?: string | number; endpoint_type?: 'async' | 'sync' | 'streaming'; gpu_type?: string; gpus?: number; high_priority?: boolean; labels?: object; max_workers?: number; memory?: string; min_workers?: number; per_worker?: number; public_inference?: boolean; storage?: string; }; } | { model: string; checkpoint_path?: string; cpus?: number; default_callback_url?: string; endpoint_type?: string; gpu_type?: string; gpus?: number; high_priority?: boolean; inference_framework?: string; inference_framework_image_tag?: string; labels?: object; max_workers?: number; memory?: string; min_workers?: number; nodes_per_worker?: number; num_shards?: number; per_worker?: number; post_inference_hooks?: string[]; public_inference?: boolean; quantize?: string; source?: string; storage?: string; }`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst inferenceModel = await client.models.update('model_id', { model: {} });\n\nconsole.log(inferenceModel);\n```", perLanguage: { go: { method: 'client.Models.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tinferenceModel, err := client.Models.Update(\n\t\tcontext.TODO(),\n\t\t"model_id",\n\t\tsgpdev.ModelUpdateParams{\n\t\t\tOfDefaultModelPatchRequest: &sgpdev.ModelUpdateParamsModelDefaultModelPatchRequest{},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", inferenceModel.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/models/$MODEL_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "model_metadata": {\n "foo": "bar"\n }\n }\'', }, python: { method: 'models.update', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\ninference_model = client.models.update(\n model_id="model_id",\n model={},\n)\nprint(inference_model.id)', }, typescript: { method: 'client.models.update', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst inferenceModel = await client.models.update('model_id', { model: {} });\n\nconsole.log(inferenceModel.id);", }, }, }, { name: 'delete', endpoint: '/v5/models/{model_id}', httpMethod: 'delete', summary: 'Delete Model', description: 'Delete Model', stainlessPath: '(resource) models > (method) delete', qualified: 'client.models.delete', params: ['model_id: string;'], response: "{ id: string; deleted: boolean; object?: 'model'; }", markdown: "## delete\n\n`client.models.delete(model_id: string): { id: string; deleted: boolean; object?: 'model'; }`\n\n**delete** `/v5/models/{model_id}`\n\nDelete Model\n\n### Parameters\n\n- `model_id: string`\n\n### Returns\n\n- `{ id: string; deleted: boolean; object?: 'model'; }`\n\n - `id: string`\n - `deleted: boolean`\n - `object?: 'model'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst model = await client.models.delete('model_id');\n\nconsole.log(model);\n```", perLanguage: { go: { method: 'client.Models.Delete', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tmodel, err := client.Models.Delete(context.TODO(), "model_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", model.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/models/$MODEL_ID \\\n -X DELETE \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'models.delete', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nmodel = client.models.delete(\n "model_id",\n)\nprint(model.id)', }, typescript: { method: 'client.models.delete', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst model = await client.models.delete('model_id');\n\nconsole.log(model.id);", }, }, }, { name: 'retrieve', endpoint: '/v5/models/{model_id}', httpMethod: 'get', summary: 'Get Model', description: 'Get Model', stainlessPath: '(resource) models > (method) retrieve', qualified: 'client.models.retrieve', params: ['model_id: string;'], response: "{ id: string; created_at: string; created_by_identity_type: 'user' | 'service_account'; created_by_user_id: string; model_type: 'generic' | 'completion' | 'chat_completion'; model_vendor: string; name: string; status: 'failed' | 'ready' | 'deploying' | 'deployment_timeout'; model_availability?: 'unknown' | 'available' | 'unavailable'; model_metadata?: object; object?: 'model'; vendor_configuration?: { model_image: object; model_infra: object; } | { model: string; checkpoint_path?: string; cpus?: number; default_callback_url?: string; endpoint_type?: string; gpu_type?: string; gpus?: number; high_priority?: boolean; inference_framework?: string; inference_framework_image_tag?: string; labels?: object; max_workers?: number; memory?: string; min_workers?: number; nodes_per_worker?: number; num_shards?: number; per_worker?: number; post_inference_hooks?: string[]; public_inference?: boolean; quantize?: string; source?: string; storage?: string; }; }", markdown: "## retrieve\n\n`client.models.retrieve(model_id: string): { id: string; created_at: string; created_by_identity_type: 'user' | 'service_account'; created_by_user_id: string; model_type: 'generic' | 'completion' | 'chat_completion'; model_vendor: string; name: string; status: 'failed' | 'ready' | 'deploying' | 'deployment_timeout'; model_availability?: 'unknown' | 'available' | 'unavailable'; model_metadata?: object; object?: 'model'; vendor_configuration?: launch_vendor_configuration | llm_engine_vendor_configuration; }`\n\n**get** `/v5/models/{model_id}`\n\nGet Model\n\n### Parameters\n\n- `model_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by_identity_type: 'user' | 'service_account'; created_by_user_id: string; model_type: 'generic' | 'completion' | 'chat_completion'; model_vendor: string; name: string; status: 'failed' | 'ready' | 'deploying' | 'deployment_timeout'; model_availability?: 'unknown' | 'available' | 'unavailable'; model_metadata?: object; object?: 'model'; vendor_configuration?: { model_image: object; model_infra: object; } | { model: string; checkpoint_path?: string; cpus?: number; default_callback_url?: string; endpoint_type?: string; gpu_type?: string; gpus?: number; high_priority?: boolean; inference_framework?: string; inference_framework_image_tag?: string; labels?: object; max_workers?: number; memory?: string; min_workers?: number; nodes_per_worker?: number; num_shards?: number; per_worker?: number; post_inference_hooks?: string[]; public_inference?: boolean; quantize?: string; source?: string; storage?: string; }; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by_identity_type: 'user' | 'service_account'`\n - `created_by_user_id: string`\n - `model_type: 'generic' | 'completion' | 'chat_completion'`\n - `model_vendor: string`\n - `name: string`\n - `status: 'failed' | 'ready' | 'deploying' | 'deployment_timeout'`\n - `model_availability?: 'unknown' | 'available' | 'unavailable'`\n - `model_metadata?: object`\n - `object?: 'model'`\n - `vendor_configuration?: { model_image: { command: string[]; registry: string; repository: string; tag: string; env_vars?: object; healthcheck_route?: string; predict_route?: string; readiness_delay?: number; request_schema?: object; response_schema?: object; streaming_command?: string[]; streaming_predict_route?: string; }; model_infra: { cpus?: string | number; endpoint_type?: 'async' | 'sync' | 'streaming'; gpu_type?: string; gpus?: number; high_priority?: boolean; labels?: object; max_workers?: number; memory?: string; min_workers?: number; per_worker?: number; public_inference?: boolean; storage?: string; }; } | { model: string; checkpoint_path?: string; cpus?: number; default_callback_url?: string; endpoint_type?: string; gpu_type?: string; gpus?: number; high_priority?: boolean; inference_framework?: string; inference_framework_image_tag?: string; labels?: object; max_workers?: number; memory?: string; min_workers?: number; nodes_per_worker?: number; num_shards?: number; per_worker?: number; post_inference_hooks?: string[]; public_inference?: boolean; quantize?: string; source?: string; storage?: string; }`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst inferenceModel = await client.models.retrieve('model_id');\n\nconsole.log(inferenceModel);\n```", perLanguage: { go: { method: 'client.Models.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tinferenceModel, err := client.Models.Get(context.TODO(), "model_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", inferenceModel.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/models/$MODEL_ID \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'models.retrieve', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\ninference_model = client.models.retrieve(\n "model_id",\n)\nprint(inference_model.id)', }, typescript: { method: 'client.models.retrieve', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst inferenceModel = await client.models.retrieve('model_id');\n\nconsole.log(inferenceModel.id);", }, }, }, { name: 'create', endpoint: '/v5/datasets', httpMethod: 'post', summary: 'Create Dataset', description: 'Create Dataset', stainlessPath: '(resource) datasets > (method) create', qualified: 'client.datasets.create', params: [ 'data: object[];', 'name: string;', 'description?: string;', 'files?: object[];', 'tags?: string[];', ], response: "{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }", markdown: "## create\n\n`client.datasets.create(data: object[], name: string, description?: string, files?: object[], tags?: string[]): { id: string; created_at: string; created_by: identity; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }`\n\n**post** `/v5/datasets`\n\nCreate Dataset\n\n### Parameters\n\n- `data: object[]`\n Items to be included in the dataset\n\n- `name: string`\n\n- `description?: string`\n\n- `files?: object[]`\n Files to be associated to the dataset\n\n- `tags?: string[]`\n The tags associated with the entity\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `current_version_num: number`\n - `name: string`\n - `tags: string[]`\n - `archived_at?: string`\n - `description?: string`\n - `object?: 'dataset'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst dataset = await client.datasets.create({ data: [{ foo: 'bar' }], name: 'name' });\n\nconsole.log(dataset);\n```", perLanguage: { go: { method: 'client.Datasets.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tdataset, err := client.Datasets.New(context.TODO(), sgpdev.DatasetNewParams{\n\t\tData: []map[string]any{{\n\t\t\t"foo": "bar",\n\t\t}},\n\t\tName: "name",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", dataset.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/datasets \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "data": [\n {\n "foo": "bar"\n }\n ],\n "name": "name"\n }\'', }, python: { method: 'datasets.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\ndataset = client.datasets.create(\n data=[{\n "foo": "bar"\n }],\n name="name",\n)\nprint(dataset.id)', }, typescript: { method: 'client.datasets.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dataset = await client.datasets.create({ data: [{ foo: 'bar' }], name: 'name' });\n\nconsole.log(dataset.id);", }, }, }, { name: 'list', endpoint: '/v5/datasets', httpMethod: 'get', summary: 'List Datasets', description: 'List Datasets', stainlessPath: '(resource) datasets > (method) list', qualified: 'client.datasets.list', params: [ 'cursor?: string;', 'ending_before?: string;', 'include_archived?: boolean;', 'limit?: number;', 'name?: string;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', 'tags?: string[];', ], response: "{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }", markdown: "## list\n\n`client.datasets.list(cursor?: string, ending_before?: string, include_archived?: boolean, limit?: number, name?: string, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string, tags?: string[]): { id: string; created_at: string; created_by: identity; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }`\n\n**get** `/v5/datasets`\n\nList Datasets\n\n### Parameters\n\n- `cursor?: string`\n\n- `ending_before?: string`\n\n- `include_archived?: boolean`\n\n- `limit?: number`\n\n- `name?: string`\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n- `tags?: string[]`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `current_version_num: number`\n - `name: string`\n - `tags: string[]`\n - `archived_at?: string`\n - `description?: string`\n - `object?: 'dataset'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\n// Automatically fetches more pages as needed.\nfor await (const dataset of client.datasets.list()) {\n console.log(dataset);\n}\n```", perLanguage: { go: { method: 'client.Datasets.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tpage, err := client.Datasets.List(context.TODO(), sgpdev.DatasetListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/datasets \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'datasets.list', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\npage = client.datasets.list()\npage = page.items[0]\nprint(page.id)', }, typescript: { method: 'client.datasets.list', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const dataset of client.datasets.list()) {\n console.log(dataset.id);\n}", }, }, }, { name: 'archive', endpoint: '/v5/datasets/{dataset_id}', httpMethod: 'delete', summary: 'Delete Dataset', description: 'Delete Dataset', stainlessPath: '(resource) datasets > (method) archive', qualified: 'client.datasets.archive', params: ['dataset_id: string;'], response: "{ id: string; deleted: boolean; object?: 'dataset'; }", markdown: "## archive\n\n`client.datasets.archive(dataset_id: string): { id: string; deleted: boolean; object?: 'dataset'; }`\n\n**delete** `/v5/datasets/{dataset_id}`\n\nDelete Dataset\n\n### Parameters\n\n- `dataset_id: string`\n\n### Returns\n\n- `{ id: string; deleted: boolean; object?: 'dataset'; }`\n\n - `id: string`\n - `deleted: boolean`\n - `object?: 'dataset'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst response = await client.datasets.archive('dataset_id');\n\nconsole.log(response);\n```", perLanguage: { go: { method: 'client.Datasets.Archive', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tresponse, err := client.Datasets.Archive(context.TODO(), "dataset_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/datasets/$DATASET_ID \\\n -X DELETE \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'datasets.archive', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.datasets.archive(\n "dataset_id",\n)\nprint(response.id)', }, typescript: { method: 'client.datasets.archive', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.datasets.archive('dataset_id');\n\nconsole.log(response.id);", }, }, }, { name: 'update', endpoint: '/v5/datasets/{dataset_id}', httpMethod: 'patch', summary: 'Update or Restore Dataset', description: 'Update or Restore Dataset', stainlessPath: '(resource) datasets > (method) update', qualified: 'client.datasets.update', params: [ 'dataset_id: string;', 'dataset: { description?: string; name?: string; tags?: string[]; } | { restore: true; };', ], response: "{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }", markdown: "## update\n\n`client.datasets.update(dataset_id: string, dataset: { description?: string; name?: string; tags?: string[]; } | { restore: true; }): { id: string; created_at: string; created_by: identity; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }`\n\n**patch** `/v5/datasets/{dataset_id}`\n\nUpdate or Restore Dataset\n\n### Parameters\n\n- `dataset_id: string`\n\n- `dataset: { description?: string; name?: string; tags?: string[]; } | { restore: true; }`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `current_version_num: number`\n - `name: string`\n - `tags: string[]`\n - `archived_at?: string`\n - `description?: string`\n - `object?: 'dataset'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst dataset = await client.datasets.update('dataset_id', { dataset: {} });\n\nconsole.log(dataset);\n```", perLanguage: { go: { method: 'client.Datasets.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tdataset, err := client.Datasets.Update(\n\t\tcontext.TODO(),\n\t\t"dataset_id",\n\t\tsgpdev.DatasetUpdateParams{\n\t\t\tOfPartialDatasetRequestBase: &sgpdev.DatasetUpdateParamsDatasetPartialDatasetRequestBase{},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", dataset.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/datasets/$DATASET_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "description": "description",\n "name": "name",\n "tags": [\n "string"\n ]\n }\'', }, python: { method: 'datasets.update', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\ndataset = client.datasets.update(\n dataset_id="dataset_id",\n dataset={},\n)\nprint(dataset.id)', }, typescript: { method: 'client.datasets.update', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dataset = await client.datasets.update('dataset_id', { dataset: {} });\n\nconsole.log(dataset.id);", }, }, }, { name: 'retrieve', endpoint: '/v5/datasets/{dataset_id}', httpMethod: 'get', summary: 'Get Dataset', description: 'Get Dataset', stainlessPath: '(resource) datasets > (method) retrieve', qualified: 'client.datasets.retrieve', params: ['dataset_id: string;', 'include_archived?: boolean;'], response: "{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }", markdown: "## retrieve\n\n`client.datasets.retrieve(dataset_id: string, include_archived?: boolean): { id: string; created_at: string; created_by: identity; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }`\n\n**get** `/v5/datasets/{dataset_id}`\n\nGet Dataset\n\n### Parameters\n\n- `dataset_id: string`\n\n- `include_archived?: boolean`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `current_version_num: number`\n - `name: string`\n - `tags: string[]`\n - `archived_at?: string`\n - `description?: string`\n - `object?: 'dataset'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst dataset = await client.datasets.retrieve('dataset_id');\n\nconsole.log(dataset);\n```", perLanguage: { go: { method: 'client.Datasets.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tdataset, err := client.Datasets.Get(\n\t\tcontext.TODO(),\n\t\t"dataset_id",\n\t\tsgpdev.DatasetGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", dataset.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/datasets/$DATASET_ID \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'datasets.retrieve', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\ndataset = client.datasets.retrieve(\n dataset_id="dataset_id",\n)\nprint(dataset.id)', }, typescript: { method: 'client.datasets.retrieve', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dataset = await client.datasets.retrieve('dataset_id');\n\nconsole.log(dataset.id);", }, }, }, { name: 'batch_create', endpoint: '/v5/dataset-items/batch', httpMethod: 'post', summary: 'Batch Create Dataset Items', description: 'Batch Create Dataset Items', stainlessPath: '(resource) dataset_items > (method) batch_create', qualified: 'client.datasetItems.batchCreate', params: ['data: object[];', 'dataset_id: string;', 'files?: object[];'], response: "{ items: { id: string; content_hash: string; created_at: string; created_by: identity; data: object; updated_at: string; archived_at?: string; dataset_id?: string; files?: object; object?: 'dataset.item'; }[]; object?: 'list'; }", markdown: "## batch_create\n\n`client.datasetItems.batchCreate(data: object[], dataset_id: string, files?: object[]): { items: dataset_item[]; object?: 'list'; }`\n\n**post** `/v5/dataset-items/batch`\n\nBatch Create Dataset Items\n\n### Parameters\n\n- `data: object[]`\n Items to be added to the dataset\n\n- `dataset_id: string`\n Identifier of the target dataset\n\n- `files?: object[]`\n Files to be associated to the dataset\n\n### Returns\n\n- `{ items: { id: string; content_hash: string; created_at: string; created_by: identity; data: object; updated_at: string; archived_at?: string; dataset_id?: string; files?: object; object?: 'dataset.item'; }[]; object?: 'list'; }`\n\n - `items: { id: string; content_hash: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; data: object; updated_at: string; archived_at?: string; dataset_id?: string; files?: object; object?: 'dataset.item'; }[]`\n - `object?: 'list'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst response = await client.datasetItems.batchCreate({ data: [{ foo: 'bar' }], dataset_id: 'dataset_id' });\n\nconsole.log(response);\n```", perLanguage: { go: { method: 'client.DatasetItems.BatchNew', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tresponse, err := client.DatasetItems.BatchNew(context.TODO(), sgpdev.DatasetItemBatchNewParams{\n\t\tData: []map[string]any{{\n\t\t\t"foo": "bar",\n\t\t}},\n\t\tDatasetID: "dataset_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Items)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/dataset-items/batch \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "data": [\n {\n "foo": "bar"\n }\n ],\n "dataset_id": "dataset_id"\n }\'', }, python: { method: 'dataset_items.batch_create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.dataset_items.batch_create(\n data=[{\n "foo": "bar"\n }],\n dataset_id="dataset_id",\n)\nprint(response.items)', }, typescript: { method: 'client.datasetItems.batchCreate', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.datasetItems.batchCreate({\n data: [{ foo: 'bar' }],\n dataset_id: 'dataset_id',\n});\n\nconsole.log(response.items);", }, }, }, { name: 'retrieve', endpoint: '/v5/dataset-items/{dataset_item_id}', httpMethod: 'get', summary: 'Get Dataset Item', description: 'Get Dataset Item', stainlessPath: '(resource) dataset_items > (method) retrieve', qualified: 'client.datasetItems.retrieve', params: ['dataset_item_id: string;', 'version?: number;'], response: "{ id: string; content_hash: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; data: object; updated_at: string; archived_at?: string; dataset_id?: string; files?: object; object?: 'dataset.item'; }", markdown: "## retrieve\n\n`client.datasetItems.retrieve(dataset_item_id: string, version?: number): { id: string; content_hash: string; created_at: string; created_by: identity; data: object; updated_at: string; archived_at?: string; dataset_id?: string; files?: object; object?: 'dataset.item'; }`\n\n**get** `/v5/dataset-items/{dataset_item_id}`\n\nGet Dataset Item\n\n### Parameters\n\n- `dataset_item_id: string`\n\n- `version?: number`\n Optional dataset version. When unset, returns the latest version.\n\n### Returns\n\n- `{ id: string; content_hash: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; data: object; updated_at: string; archived_at?: string; dataset_id?: string; files?: object; object?: 'dataset.item'; }`\n\n - `id: string`\n - `content_hash: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `data: object`\n - `updated_at: string`\n - `archived_at?: string`\n - `dataset_id?: string`\n - `files?: object`\n - `object?: 'dataset.item'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst datasetItem = await client.datasetItems.retrieve('dataset_item_id');\n\nconsole.log(datasetItem);\n```", perLanguage: { go: { method: 'client.DatasetItems.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tdatasetItem, err := client.DatasetItems.Get(\n\t\tcontext.TODO(),\n\t\t"dataset_item_id",\n\t\tsgpdev.DatasetItemGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", datasetItem.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/dataset-items/$DATASET_ITEM_ID \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'dataset_items.retrieve', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\ndataset_item = client.dataset_items.retrieve(\n dataset_item_id="dataset_item_id",\n)\nprint(dataset_item.id)', }, typescript: { method: 'client.datasetItems.retrieve', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst datasetItem = await client.datasetItems.retrieve('dataset_item_id');\n\nconsole.log(datasetItem.id);", }, }, }, { name: 'archive', endpoint: '/v5/dataset-items/{dataset_item_id}', httpMethod: 'delete', summary: 'Delete Dataset Item', description: 'Delete Dataset Item', stainlessPath: '(resource) dataset_items > (method) archive', qualified: 'client.datasetItems.archive', params: ['dataset_item_id: string;'], response: "{ id: string; deleted: boolean; object?: 'dataset.item'; }", markdown: "## archive\n\n`client.datasetItems.archive(dataset_item_id: string): { id: string; deleted: boolean; object?: 'dataset.item'; }`\n\n**delete** `/v5/dataset-items/{dataset_item_id}`\n\nDelete Dataset Item\n\n### Parameters\n\n- `dataset_item_id: string`\n\n### Returns\n\n- `{ id: string; deleted: boolean; object?: 'dataset.item'; }`\n\n - `id: string`\n - `deleted: boolean`\n - `object?: 'dataset.item'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst response = await client.datasetItems.archive('dataset_item_id');\n\nconsole.log(response);\n```", perLanguage: { go: { method: 'client.DatasetItems.Archive', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tresponse, err := client.DatasetItems.Archive(context.TODO(), "dataset_item_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/dataset-items/$DATASET_ITEM_ID \\\n -X DELETE \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'dataset_items.archive', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.dataset_items.archive(\n "dataset_item_id",\n)\nprint(response.id)', }, typescript: { method: 'client.datasetItems.archive', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.datasetItems.archive('dataset_item_id');\n\nconsole.log(response.id);", }, }, }, { name: 'update', endpoint: '/v5/dataset-items/{dataset_item_id}', httpMethod: 'patch', summary: 'Update Dataset Item', description: 'Update Dataset Item', stainlessPath: '(resource) dataset_items > (method) update', qualified: 'client.datasetItems.update', params: ['dataset_item_id: string;', 'data: object;', 'files?: object;'], response: "{ id: string; content_hash: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; data: object; updated_at: string; archived_at?: string; dataset_id?: string; files?: object; object?: 'dataset.item'; }", markdown: "## update\n\n`client.datasetItems.update(dataset_item_id: string, data: object, files?: object): { id: string; content_hash: string; created_at: string; created_by: identity; data: object; updated_at: string; archived_at?: string; dataset_id?: string; files?: object; object?: 'dataset.item'; }`\n\n**patch** `/v5/dataset-items/{dataset_item_id}`\n\nUpdate Dataset Item\n\n### Parameters\n\n- `dataset_item_id: string`\n\n- `data: object`\n Updated dataset item data\n\n- `files?: object`\n Files to be associated to the dataset\n\n### Returns\n\n- `{ id: string; content_hash: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; data: object; updated_at: string; archived_at?: string; dataset_id?: string; files?: object; object?: 'dataset.item'; }`\n\n - `id: string`\n - `content_hash: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `data: object`\n - `updated_at: string`\n - `archived_at?: string`\n - `dataset_id?: string`\n - `files?: object`\n - `object?: 'dataset.item'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst datasetItem = await client.datasetItems.update('dataset_item_id', { data: { foo: 'bar' } });\n\nconsole.log(datasetItem);\n```", perLanguage: { go: { method: 'client.DatasetItems.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tdatasetItem, err := client.DatasetItems.Update(\n\t\tcontext.TODO(),\n\t\t"dataset_item_id",\n\t\tsgpdev.DatasetItemUpdateParams{\n\t\t\tData: map[string]any{\n\t\t\t\t"foo": "bar",\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", datasetItem.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/dataset-items/$DATASET_ITEM_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "data": {\n "foo": "bar"\n }\n }\'', }, python: { method: 'dataset_items.update', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\ndataset_item = client.dataset_items.update(\n dataset_item_id="dataset_item_id",\n data={\n "foo": "bar"\n },\n)\nprint(dataset_item.id)', }, typescript: { method: 'client.datasetItems.update', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst datasetItem = await client.datasetItems.update('dataset_item_id', { data: { foo: 'bar' } });\n\nconsole.log(datasetItem.id);", }, }, }, { name: 'list', endpoint: '/v5/dataset-items', httpMethod: 'get', summary: 'List Dataset Items', description: 'List Dataset Items', stainlessPath: '(resource) dataset_items > (method) list', qualified: 'client.datasetItems.list', params: [ 'cursor?: string;', 'dataset_id?: string;', 'ending_before?: string;', 'include_archived?: boolean;', 'limit?: number;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', 'version?: number;', ], response: "{ id: string; content_hash: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; data: object; updated_at: string; archived_at?: string; dataset_id?: string; files?: object; object?: 'dataset.item'; }", markdown: "## list\n\n`client.datasetItems.list(cursor?: string, dataset_id?: string, ending_before?: string, include_archived?: boolean, limit?: number, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string, version?: number): { id: string; content_hash: string; created_at: string; created_by: identity; data: object; updated_at: string; archived_at?: string; dataset_id?: string; files?: object; object?: 'dataset.item'; }`\n\n**get** `/v5/dataset-items`\n\nList Dataset Items\n\n### Parameters\n\n- `cursor?: string`\n\n- `dataset_id?: string`\n Optional dataset identifier. Must be provided if a specific version is requested.\n\n- `ending_before?: string`\n\n- `include_archived?: boolean`\n\n- `limit?: number`\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n- `version?: number`\n Optional dataset version. When unset, returns the latest version. Requires a valid dataset_id when set.\n\n### Returns\n\n- `{ id: string; content_hash: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; data: object; updated_at: string; archived_at?: string; dataset_id?: string; files?: object; object?: 'dataset.item'; }`\n\n - `id: string`\n - `content_hash: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `data: object`\n - `updated_at: string`\n - `archived_at?: string`\n - `dataset_id?: string`\n - `files?: object`\n - `object?: 'dataset.item'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\n// Automatically fetches more pages as needed.\nfor await (const datasetItem of client.datasetItems.list()) {\n console.log(datasetItem);\n}\n```", perLanguage: { go: { method: 'client.DatasetItems.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tpage, err := client.DatasetItems.List(context.TODO(), sgpdev.DatasetItemListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/dataset-items \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'dataset_items.list', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\npage = client.dataset_items.list()\npage = page.items[0]\nprint(page.id)', }, typescript: { method: 'client.datasetItems.list', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const datasetItem of client.datasetItems.list()) {\n console.log(datasetItem.id);\n}", }, }, }, { name: 'create', endpoint: '/v5/evaluations', httpMethod: 'post', summary: 'Create Evaluation', description: 'Create Evaluation', stainlessPath: '(resource) evaluations > (method) create', qualified: 'client.evaluations.create', params: [ "evaluation: { data: object[]; name: string; description?: string; files?: object[]; metadata?: object; tags?: string[]; tasks?: { configuration: { messages: object[] | item_locator; model: string; audio?: object | item_locator; frequency_penalty?: number | item_locator; function_call?: object | item_locator; functions?: object[] | item_locator; logit_bias?: object | item_locator; logprobs?: boolean | item_locator; max_completion_tokens?: number | item_locator; max_tokens?: number | item_locator; metadata?: object | item_locator; modalities?: string[] | item_locator; n?: number | item_locator; parallel_tool_calls?: boolean | item_locator; prediction?: object | item_locator; presence_penalty?: number | item_locator; reasoning_effort?: string; response_format?: object | item_locator; seed?: number | item_locator; stop?: string; store?: boolean | item_locator; temperature?: number | item_locator; tool_choice?: string; tools?: object[] | item_locator; top_k?: number | item_locator; top_logprobs?: number | item_locator; top_p?: number | item_locator; }; alias?: string; task_type?: 'chat_completion'; } | { configuration: { model: string; args?: object | item_locator; inference_configuration?: launch_inference_configuration | item_locator; }; alias?: string; task_type?: 'inference'; } | { configuration: { application_variant_id: string; inputs: object | item_locator; history?: object[] | item_locator; operation_metadata?: object | item_locator; overrides?: object | item_locator; }; alias?: string; task_type?: 'application_variant'; } | { configuration: { agentex_agent_id: string; input_column: string | object | object[]; include_traces?: boolean | item_locator; timeout_seconds?: number | item_locator; }; alias?: string; task_type?: 'agentex_output'; } | { configuration: { candidate: string; reference: string; type: 'bleu'; } | { candidate: string; reference: string; type: 'meteor'; } | { candidate: string; reference: string; type: 'cosine_similarity'; } | { candidate: string; reference: string; type: 'f1'; } | { candidate: string; reference: string; type: 'rouge1'; } | { candidate: string; reference: string; type: 'rouge2'; } | { candidate: string; reference: string; type: 'rougeL'; }; alias?: string; task_type?: 'metric'; } | { configuration: { model: string; prompt: string; question_id: string; }; alias?: string; task_type?: 'auto_evaluation.question'; } | { configuration: { model: string; prompt: string; response_format: object; inference_args?: object; system_prompt?: string; } | { choices: string[]; model: string; prompt: string; inference_args?: object; system_prompt?: string; } | object; alias?: string; task_type?: 'auto_evaluation.guided_decoding'; } | { configuration: object; alias?: string; task_type?: 'auto_evaluation.agent'; } | { configuration: { layout: container; question_id: string; queue_id?: string; required?: boolean; rubric_id?: string; }; alias?: string; task_type?: 'contributor_evaluation.question'; } | { configuration: { function_source: string; arg_mapping?: object; }; alias?: string; task_type?: 'custom_function'; }[]; taxonomy_params?: object; } | { dataset_id: string; name: string; data?: { dataset_item_id: string; }[]; description?: string; metadata?: object; tags?: string[]; tasks?: { configuration: { messages: object[] | item_locator; model: string; audio?: object | item_locator; frequency_penalty?: number | item_locator; function_call?: object | item_locator; functions?: object[] | item_locator; logit_bias?: object | item_locator; logprobs?: boolean | item_locator; max_completion_tokens?: number | item_locator; max_tokens?: number | item_locator; metadata?: object | item_locator; modalities?: string[] | item_locator; n?: number | item_locator; parallel_tool_calls?: boolean | item_locator; prediction?: object | item_locator; presence_penalty?: number | item_locator; reasoning_effort?: string; response_format?: object | item_locator; seed?: number | item_locator; stop?: string; store?: boolean | item_locator; temperature?: number | item_locator; tool_choice?: string; tools?: object[] | item_locator; top_k?: number | item_locator; top_logprobs?: number | item_locator; top_p?: number | item_locator; }; alias?: string; task_type?: 'chat_completion'; } | { configuration: { model: string; args?: object | item_locator; inference_configuration?: launch_inference_configuration | item_locator; }; alias?: string; task_type?: 'inference'; } | { configuration: { application_variant_id: string; inputs: object | item_locator; history?: object[] | item_locator; operation_metadata?: object | item_locator; overrides?: object | item_locator; }; alias?: string; task_type?: 'application_variant'; } | { configuration: { agentex_agent_id: string; input_column: string | object | object[]; include_traces?: boolean | item_locator; timeout_seconds?: number | item_locator; }; alias?: string; task_type?: 'agentex_output'; } | { configuration: { candidate: string; reference: string; type: 'bleu'; } | { candidate: string; reference: string; type: 'meteor'; } | { candidate: string; reference: string; type: 'cosine_similarity'; } | { candidate: string; reference: string; type: 'f1'; } | { candidate: string; reference: string; type: 'rouge1'; } | { candidate: string; reference: string; type: 'rouge2'; } | { candidate: string; reference: string; type: 'rougeL'; }; alias?: string; task_type?: 'metric'; } | { configuration: { model: string; prompt: string; question_id: string; }; alias?: string; task_type?: 'auto_evaluation.question'; } | { configuration: { model: string; prompt: string; response_format: object; inference_args?: object; system_prompt?: string; } | { choices: string[]; model: string; prompt: string; inference_args?: object; system_prompt?: string; } | object; alias?: string; task_type?: 'auto_evaluation.guided_decoding'; } | { configuration: object; alias?: string; task_type?: 'auto_evaluation.agent'; } | { configuration: { layout: container; question_id: string; queue_id?: string; required?: boolean; rubric_id?: string; }; alias?: string; task_type?: 'contributor_evaluation.question'; } | { configuration: { function_source: string; arg_mapping?: object; }; alias?: string; task_type?: 'custom_function'; }[]; taxonomy_params?: object; } | { data: object[]; dataset: { name: string; description?: string; keys?: string[]; tags?: string[]; }; name: string; description?: string; files?: object[]; metadata?: object; tags?: string[]; tasks?: { configuration: { messages: object[] | item_locator; model: string; audio?: object | item_locator; frequency_penalty?: number | item_locator; function_call?: object | item_locator; functions?: object[] | item_locator; logit_bias?: object | item_locator; logprobs?: boolean | item_locator; max_completion_tokens?: number | item_locator; max_tokens?: number | item_locator; metadata?: object | item_locator; modalities?: string[] | item_locator; n?: number | item_locator; parallel_tool_calls?: boolean | item_locator; prediction?: object | item_locator; presence_penalty?: number | item_locator; reasoning_effort?: string; response_format?: object | item_locator; seed?: number | item_locator; stop?: string; store?: boolean | item_locator; temperature?: number | item_locator; tool_choice?: string; tools?: object[] | item_locator; top_k?: number | item_locator; top_logprobs?: number | item_locator; top_p?: number | item_locator; }; alias?: string; task_type?: 'chat_completion'; } | { configuration: { model: string; args?: object | item_locator; inference_configuration?: launch_inference_configuration | item_locator; }; alias?: string; task_type?: 'inference'; } | { configuration: { application_variant_id: string; inputs: object | item_locator; history?: object[] | item_locator; operation_metadata?: object | item_locator; overrides?: object | item_locator; }; alias?: string; task_type?: 'application_variant'; } | { configuration: { agentex_agent_id: string; input_column: string | object | object[]; include_traces?: boolean | item_locator; timeout_seconds?: number | item_locator; }; alias?: string; task_type?: 'agentex_output'; } | { configuration: { candidate: string; reference: string; type: 'bleu'; } | { candidate: string; reference: string; type: 'meteor'; } | { candidate: string; reference: string; type: 'cosine_similarity'; } | { candidate: string; reference: string; type: 'f1'; } | { candidate: string; reference: string; type: 'rouge1'; } | { candidate: string; reference: string; type: 'rouge2'; } | { candidate: string; reference: string; type: 'rougeL'; }; alias?: string; task_type?: 'metric'; } | { configuration: { model: string; prompt: string; question_id: string; }; alias?: string; task_type?: 'auto_evaluation.question'; } | { configuration: { model: string; prompt: string; response_format: object; inference_args?: object; system_prompt?: string; } | { choices: string[]; model: string; prompt: string; inference_args?: object; system_prompt?: string; } | object; alias?: string; task_type?: 'auto_evaluation.guided_decoding'; } | { configuration: object; alias?: string; task_type?: 'auto_evaluation.agent'; } | { configuration: { layout: container; question_id: string; queue_id?: string; required?: boolean; rubric_id?: string; }; alias?: string; task_type?: 'contributor_evaluation.question'; } | { configuration: { function_source: string; arg_mapping?: object; }; alias?: string; task_type?: 'custom_function'; }[]; taxonomy_params?: object; };", ], response: "{ id: string; created_at: string; created_by: object; datasets: object[]; name: string; status: 'failed' | 'completed' | 'running'; tags: string[]; archived_at?: string; description?: string; error_count?: number; metadata?: object; object?: 'evaluation'; progress?: object; status_reason?: string; tasks?: object | object | object | object | object | object | object | object | object | object[]; }", markdown: "## create\n\n`client.evaluations.create(evaluation: { data: object[]; name: string; description?: string; files?: object[]; metadata?: object; tags?: string[]; tasks?: object | object | object | object | object | object | object | object | object | object[]; taxonomy_params?: object; } | { dataset_id: string; name: string; data?: { dataset_item_id: string; }[]; description?: string; metadata?: object; tags?: string[]; tasks?: object | object | object | object | object | object | object | object | object | object[]; taxonomy_params?: object; } | { data: object[]; dataset: { name: string; description?: string; keys?: string[]; tags?: string[]; }; name: string; description?: string; files?: object[]; metadata?: object; tags?: string[]; tasks?: object | object | object | object | object | object | object | object | object | object[]; taxonomy_params?: object; }): { id: string; created_at: string; created_by: identity; datasets: dataset[]; name: string; status: 'failed' | 'completed' | 'running'; tags: string[]; archived_at?: string; description?: string; error_count?: number; metadata?: object; object?: 'evaluation'; progress?: evaluation_tasks_progress_schema; status_reason?: string; tasks?: evaluation_task[]; }`\n\n**post** `/v5/evaluations`\n\nCreate Evaluation\n\n### Parameters\n\n- `evaluation: { data: object[]; name: string; description?: string; files?: object[]; metadata?: object; tags?: string[]; tasks?: { configuration: { messages: object[] | item_locator; model: string; audio?: object | item_locator; frequency_penalty?: number | item_locator; function_call?: object | item_locator; functions?: object[] | item_locator; logit_bias?: object | item_locator; logprobs?: boolean | item_locator; max_completion_tokens?: number | item_locator; max_tokens?: number | item_locator; metadata?: object | item_locator; modalities?: string[] | item_locator; n?: number | item_locator; parallel_tool_calls?: boolean | item_locator; prediction?: object | item_locator; presence_penalty?: number | item_locator; reasoning_effort?: string; response_format?: object | item_locator; seed?: number | item_locator; stop?: string; store?: boolean | item_locator; temperature?: number | item_locator; tool_choice?: string; tools?: object[] | item_locator; top_k?: number | item_locator; top_logprobs?: number | item_locator; top_p?: number | item_locator; }; alias?: string; task_type?: 'chat_completion'; } | { configuration: { model: string; args?: object | item_locator; inference_configuration?: launch_inference_configuration | item_locator; }; alias?: string; task_type?: 'inference'; } | { configuration: { application_variant_id: string; inputs: object | item_locator; history?: object[] | item_locator; operation_metadata?: object | item_locator; overrides?: object | item_locator; }; alias?: string; task_type?: 'application_variant'; } | { configuration: { agentex_agent_id: string; input_column: string | object | object[]; include_traces?: boolean | item_locator; timeout_seconds?: number | item_locator; }; alias?: string; task_type?: 'agentex_output'; } | { configuration: { candidate: string; reference: string; type: 'bleu'; } | { candidate: string; reference: string; type: 'meteor'; } | { candidate: string; reference: string; type: 'cosine_similarity'; } | { candidate: string; reference: string; type: 'f1'; } | { candidate: string; reference: string; type: 'rouge1'; } | { candidate: string; reference: string; type: 'rouge2'; } | { candidate: string; reference: string; type: 'rougeL'; }; alias?: string; task_type?: 'metric'; } | { configuration: { model: string; prompt: string; question_id: string; }; alias?: string; task_type?: 'auto_evaluation.question'; } | { configuration: { model: string; prompt: string; response_format: object; inference_args?: object; system_prompt?: string; } | { choices: string[]; model: string; prompt: string; inference_args?: object; system_prompt?: string; } | object; alias?: string; task_type?: 'auto_evaluation.guided_decoding'; } | { configuration: object; alias?: string; task_type?: 'auto_evaluation.agent'; } | { configuration: { layout: container; question_id: string; queue_id?: string; required?: boolean; rubric_id?: string; }; alias?: string; task_type?: 'contributor_evaluation.question'; } | { configuration: { function_source: string; arg_mapping?: object; }; alias?: string; task_type?: 'custom_function'; }[]; taxonomy_params?: object; } | { dataset_id: string; name: string; data?: { dataset_item_id: string; }[]; description?: string; metadata?: object; tags?: string[]; tasks?: { configuration: { messages: object[] | item_locator; model: string; audio?: object | item_locator; frequency_penalty?: number | item_locator; function_call?: object | item_locator; functions?: object[] | item_locator; logit_bias?: object | item_locator; logprobs?: boolean | item_locator; max_completion_tokens?: number | item_locator; max_tokens?: number | item_locator; metadata?: object | item_locator; modalities?: string[] | item_locator; n?: number | item_locator; parallel_tool_calls?: boolean | item_locator; prediction?: object | item_locator; presence_penalty?: number | item_locator; reasoning_effort?: string; response_format?: object | item_locator; seed?: number | item_locator; stop?: string; store?: boolean | item_locator; temperature?: number | item_locator; tool_choice?: string; tools?: object[] | item_locator; top_k?: number | item_locator; top_logprobs?: number | item_locator; top_p?: number | item_locator; }; alias?: string; task_type?: 'chat_completion'; } | { configuration: { model: string; args?: object | item_locator; inference_configuration?: launch_inference_configuration | item_locator; }; alias?: string; task_type?: 'inference'; } | { configuration: { application_variant_id: string; inputs: object | item_locator; history?: object[] | item_locator; operation_metadata?: object | item_locator; overrides?: object | item_locator; }; alias?: string; task_type?: 'application_variant'; } | { configuration: { agentex_agent_id: string; input_column: string | object | object[]; include_traces?: boolean | item_locator; timeout_seconds?: number | item_locator; }; alias?: string; task_type?: 'agentex_output'; } | { configuration: { candidate: string; reference: string; type: 'bleu'; } | { candidate: string; reference: string; type: 'meteor'; } | { candidate: string; reference: string; type: 'cosine_similarity'; } | { candidate: string; reference: string; type: 'f1'; } | { candidate: string; reference: string; type: 'rouge1'; } | { candidate: string; reference: string; type: 'rouge2'; } | { candidate: string; reference: string; type: 'rougeL'; }; alias?: string; task_type?: 'metric'; } | { configuration: { model: string; prompt: string; question_id: string; }; alias?: string; task_type?: 'auto_evaluation.question'; } | { configuration: { model: string; prompt: string; response_format: object; inference_args?: object; system_prompt?: string; } | { choices: string[]; model: string; prompt: string; inference_args?: object; system_prompt?: string; } | object; alias?: string; task_type?: 'auto_evaluation.guided_decoding'; } | { configuration: object; alias?: string; task_type?: 'auto_evaluation.agent'; } | { configuration: { layout: container; question_id: string; queue_id?: string; required?: boolean; rubric_id?: string; }; alias?: string; task_type?: 'contributor_evaluation.question'; } | { configuration: { function_source: string; arg_mapping?: object; }; alias?: string; task_type?: 'custom_function'; }[]; taxonomy_params?: object; } | { data: object[]; dataset: { name: string; description?: string; keys?: string[]; tags?: string[]; }; name: string; description?: string; files?: object[]; metadata?: object; tags?: string[]; tasks?: { configuration: { messages: object[] | item_locator; model: string; audio?: object | item_locator; frequency_penalty?: number | item_locator; function_call?: object | item_locator; functions?: object[] | item_locator; logit_bias?: object | item_locator; logprobs?: boolean | item_locator; max_completion_tokens?: number | item_locator; max_tokens?: number | item_locator; metadata?: object | item_locator; modalities?: string[] | item_locator; n?: number | item_locator; parallel_tool_calls?: boolean | item_locator; prediction?: object | item_locator; presence_penalty?: number | item_locator; reasoning_effort?: string; response_format?: object | item_locator; seed?: number | item_locator; stop?: string; store?: boolean | item_locator; temperature?: number | item_locator; tool_choice?: string; tools?: object[] | item_locator; top_k?: number | item_locator; top_logprobs?: number | item_locator; top_p?: number | item_locator; }; alias?: string; task_type?: 'chat_completion'; } | { configuration: { model: string; args?: object | item_locator; inference_configuration?: launch_inference_configuration | item_locator; }; alias?: string; task_type?: 'inference'; } | { configuration: { application_variant_id: string; inputs: object | item_locator; history?: object[] | item_locator; operation_metadata?: object | item_locator; overrides?: object | item_locator; }; alias?: string; task_type?: 'application_variant'; } | { configuration: { agentex_agent_id: string; input_column: string | object | object[]; include_traces?: boolean | item_locator; timeout_seconds?: number | item_locator; }; alias?: string; task_type?: 'agentex_output'; } | { configuration: { candidate: string; reference: string; type: 'bleu'; } | { candidate: string; reference: string; type: 'meteor'; } | { candidate: string; reference: string; type: 'cosine_similarity'; } | { candidate: string; reference: string; type: 'f1'; } | { candidate: string; reference: string; type: 'rouge1'; } | { candidate: string; reference: string; type: 'rouge2'; } | { candidate: string; reference: string; type: 'rougeL'; }; alias?: string; task_type?: 'metric'; } | { configuration: { model: string; prompt: string; question_id: string; }; alias?: string; task_type?: 'auto_evaluation.question'; } | { configuration: { model: string; prompt: string; response_format: object; inference_args?: object; system_prompt?: string; } | { choices: string[]; model: string; prompt: string; inference_args?: object; system_prompt?: string; } | object; alias?: string; task_type?: 'auto_evaluation.guided_decoding'; } | { configuration: object; alias?: string; task_type?: 'auto_evaluation.agent'; } | { configuration: { layout: container; question_id: string; queue_id?: string; required?: boolean; rubric_id?: string; }; alias?: string; task_type?: 'contributor_evaluation.question'; } | { configuration: { function_source: string; arg_mapping?: object; }; alias?: string; task_type?: 'custom_function'; }[]; taxonomy_params?: object; }`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; datasets: { id: string; created_at: string; created_by: identity; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }[]; name: string; status: 'failed' | 'completed' | 'running'; tags: string[]; archived_at?: string; description?: string; error_count?: number; metadata?: object; object?: 'evaluation'; progress?: { items?: object; workflows?: object; }; status_reason?: string; tasks?: { configuration: object; alias?: string; task_type?: 'chat_completion'; } | { configuration: object; alias?: string; task_type?: 'inference'; } | { configuration: object; alias?: string; task_type?: 'application_variant'; } | { configuration: object; alias?: string; task_type?: 'agentex_output'; } | { configuration: object | object | object | object | object | object | object; alias?: string; task_type?: 'metric'; } | { configuration: object; alias?: string; task_type?: 'auto_evaluation.question'; } | { configuration: object | object | auto_evaluation_agent_task_request_with_item_locator; alias?: string; task_type?: 'auto_evaluation.guided_decoding'; } | { configuration: auto_evaluation_agent_task_request_with_item_locator; alias?: string; task_type?: 'auto_evaluation.agent'; } | { configuration: object; alias?: string; task_type?: 'contributor_evaluation.question'; } | { configuration: object; alias?: string; task_type?: 'custom_function'; }[]; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `datasets: { id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }[]`\n - `name: string`\n - `status: 'failed' | 'completed' | 'running'`\n - `tags: string[]`\n - `archived_at?: string`\n - `description?: string`\n - `error_count?: number`\n - `metadata?: object`\n - `object?: 'evaluation'`\n - `progress?: { items?: { failed: number; pending: number; successful: number; total: number; failed_items?: { item_id: string; error?: string; error_type?: string; }[]; }; workflows?: { completed: number; failed: number; pending: number; total: number; }; }`\n - `status_reason?: string`\n - `tasks?: { configuration: { messages: object[] | string; model: string; audio?: object | string; frequency_penalty?: number | string; function_call?: object | string; functions?: object[] | string; logit_bias?: object | string; logprobs?: boolean | string; max_completion_tokens?: number | string; max_tokens?: number | string; metadata?: object | string; modalities?: string[] | string; n?: number | string; parallel_tool_calls?: boolean | string; prediction?: object | string; presence_penalty?: number | string; reasoning_effort?: string; response_format?: object | string; seed?: number | string; stop?: string; store?: boolean | string; temperature?: number | string; tool_choice?: string; tools?: object[] | string; top_k?: number | string; top_logprobs?: number | string; top_p?: number | string; }; alias?: string; task_type?: 'chat_completion'; } | { configuration: { model: string; args?: object | string; inference_configuration?: object | string; }; alias?: string; task_type?: 'inference'; } | { configuration: { application_variant_id: string; inputs: object | string; history?: { request: string; response: string; session_data?: object; }[] | string; operation_metadata?: object | string; overrides?: { concurrent?: boolean; initial_state?: object; partial_trace?: object[]; return_span?: boolean; use_channels?: boolean; } | string; }; alias?: string; task_type?: 'application_variant'; } | { configuration: { agentex_agent_id: string; input_column: string | object | object[]; include_traces?: boolean | string; timeout_seconds?: number | string; }; alias?: string; task_type?: 'agentex_output'; } | { configuration: { candidate: string; reference: string; type: 'bleu'; } | { candidate: string; reference: string; type: 'meteor'; } | { candidate: string; reference: string; type: 'cosine_similarity'; } | { candidate: string; reference: string; type: 'f1'; } | { candidate: string; reference: string; type: 'rouge1'; } | { candidate: string; reference: string; type: 'rouge2'; } | { candidate: string; reference: string; type: 'rougeL'; }; alias?: string; task_type?: 'metric'; } | { configuration: { model: string; prompt: string; question_id: string; }; alias?: string; task_type?: 'auto_evaluation.question'; } | { configuration: { model: string; prompt: string; response_format: object; inference_args?: object; system_prompt?: string; } | { choices: string[]; model: string; prompt: string; inference_args?: object; system_prompt?: string; } | { definition: string; name: string; output_rules: string[]; data_fields?: string[]; designated_to?: object | object | object | object; output_type?: 'text' | 'integer' | 'float' | 'boolean'; output_values?: string | number | boolean[]; rubric_id?: string; rubric_version?: number; }; alias?: string; task_type?: 'auto_evaluation.guided_decoding'; } | { configuration: { definition: string; name: string; output_rules: string[]; data_fields?: string[]; designated_to?: object | object | object | object; output_type?: 'text' | 'integer' | 'float' | 'boolean'; output_values?: string | number | boolean[]; rubric_id?: string; rubric_version?: number; }; alias?: string; task_type?: 'auto_evaluation.agent'; } | { configuration: { layout: object; question_id: string; queue_id?: string; required?: boolean; rubric_id?: string; }; alias?: string; task_type?: 'contributor_evaluation.question'; } | { configuration: { function_source: string; arg_mapping?: object; }; alias?: string; task_type?: 'custom_function'; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst evaluation = await client.evaluations.create({ evaluation: { data: [{ foo: 'bar' }], name: 'name' } });\n\nconsole.log(evaluation);\n```", perLanguage: { go: { method: 'client.Evaluations.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tevaluation, err := client.Evaluations.New(context.TODO(), sgpdev.EvaluationNewParams{\n\t\tOfEvaluationStandaloneCreateRequest: &sgpdev.EvaluationNewParamsEvaluationEvaluationStandaloneCreateRequest{\n\t\t\tData: []map[string]any{{\n\t\t\t\t"foo": "bar",\n\t\t\t}},\n\t\t\tName: "name",\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", evaluation.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluations \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "data": [\n {\n "foo": "bar"\n }\n ],\n "name": "name",\n "description": "description",\n "files": [\n {\n "foo": "string"\n }\n ],\n "metadata": {\n "foo": "bar"\n },\n "tags": [\n "string"\n ],\n "tasks": [\n {\n "configuration": {\n "messages": [\n {\n "foo": "bar"\n }\n ],\n "model": "model",\n "audio": {\n "foo": "bar"\n },\n "frequency_penalty": 0,\n "function_call": {\n "foo": "bar"\n },\n "functions": [\n {\n "foo": "bar"\n }\n ],\n "logit_bias": {\n "foo": 0\n },\n "logprobs": true,\n "max_completion_tokens": 0,\n "max_tokens": 0,\n "metadata": {\n "foo": "string"\n },\n "modalities": [\n "string"\n ],\n "n": 0,\n "parallel_tool_calls": true,\n "prediction": {\n "foo": "bar"\n },\n "presence_penalty": 0,\n "reasoning_effort": "reasoning_effort",\n "response_format": {\n "foo": "bar"\n },\n "seed": 0,\n "stop": "stop",\n "store": true,\n "temperature": 0,\n "tool_choice": "tool_choice",\n "tools": [\n {\n "foo": "bar"\n }\n ],\n "top_k": 0,\n "top_logprobs": 0,\n "top_p": 0\n },\n "alias": "alias",\n "task_type": "chat_completion"\n }\n ],\n "taxonomy_params": {\n "foo": "bar"\n }\n }\'', }, python: { method: 'evaluations.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nevaluation = client.evaluations.create(\n evaluation={\n "data": [{\n "foo": "bar"\n }],\n "name": "name",\n },\n)\nprint(evaluation.id)', }, typescript: { method: 'client.evaluations.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst evaluation = await client.evaluations.create({\n evaluation: { data: [{ foo: 'bar' }], name: 'name' },\n});\n\nconsole.log(evaluation.id);", }, }, }, { name: 'list', endpoint: '/v5/evaluations', httpMethod: 'get', summary: 'List Evaluations', description: 'List Evaluations', stainlessPath: '(resource) evaluations > (method) list', qualified: 'client.evaluations.list', params: [ 'cursor?: string;', 'ending_before?: string;', 'include_archived?: boolean;', 'limit?: number;', 'name?: string;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', 'tags?: string[];', "views?: 'tasks'[];", ], response: "{ id: string; created_at: string; created_by: object; datasets: object[]; name: string; status: 'failed' | 'completed' | 'running'; tags: string[]; archived_at?: string; description?: string; error_count?: number; metadata?: object; object?: 'evaluation'; progress?: object; status_reason?: string; tasks?: object | object | object | object | object | object | object | object | object | object[]; }", markdown: "## list\n\n`client.evaluations.list(cursor?: string, ending_before?: string, include_archived?: boolean, limit?: number, name?: string, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string, tags?: string[], views?: 'tasks'[]): { id: string; created_at: string; created_by: identity; datasets: dataset[]; name: string; status: 'failed' | 'completed' | 'running'; tags: string[]; archived_at?: string; description?: string; error_count?: number; metadata?: object; object?: 'evaluation'; progress?: evaluation_tasks_progress_schema; status_reason?: string; tasks?: evaluation_task[]; }`\n\n**get** `/v5/evaluations`\n\nList Evaluations\n\n### Parameters\n\n- `cursor?: string`\n\n- `ending_before?: string`\n\n- `include_archived?: boolean`\n\n- `limit?: number`\n\n- `name?: string`\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n- `tags?: string[]`\n\n- `views?: 'tasks'[]`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; datasets: { id: string; created_at: string; created_by: identity; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }[]; name: string; status: 'failed' | 'completed' | 'running'; tags: string[]; archived_at?: string; description?: string; error_count?: number; metadata?: object; object?: 'evaluation'; progress?: { items?: object; workflows?: object; }; status_reason?: string; tasks?: { configuration: object; alias?: string; task_type?: 'chat_completion'; } | { configuration: object; alias?: string; task_type?: 'inference'; } | { configuration: object; alias?: string; task_type?: 'application_variant'; } | { configuration: object; alias?: string; task_type?: 'agentex_output'; } | { configuration: object | object | object | object | object | object | object; alias?: string; task_type?: 'metric'; } | { configuration: object; alias?: string; task_type?: 'auto_evaluation.question'; } | { configuration: object | object | auto_evaluation_agent_task_request_with_item_locator; alias?: string; task_type?: 'auto_evaluation.guided_decoding'; } | { configuration: auto_evaluation_agent_task_request_with_item_locator; alias?: string; task_type?: 'auto_evaluation.agent'; } | { configuration: object; alias?: string; task_type?: 'contributor_evaluation.question'; } | { configuration: object; alias?: string; task_type?: 'custom_function'; }[]; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `datasets: { id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }[]`\n - `name: string`\n - `status: 'failed' | 'completed' | 'running'`\n - `tags: string[]`\n - `archived_at?: string`\n - `description?: string`\n - `error_count?: number`\n - `metadata?: object`\n - `object?: 'evaluation'`\n - `progress?: { items?: { failed: number; pending: number; successful: number; total: number; failed_items?: { item_id: string; error?: string; error_type?: string; }[]; }; workflows?: { completed: number; failed: number; pending: number; total: number; }; }`\n - `status_reason?: string`\n - `tasks?: { configuration: { messages: object[] | string; model: string; audio?: object | string; frequency_penalty?: number | string; function_call?: object | string; functions?: object[] | string; logit_bias?: object | string; logprobs?: boolean | string; max_completion_tokens?: number | string; max_tokens?: number | string; metadata?: object | string; modalities?: string[] | string; n?: number | string; parallel_tool_calls?: boolean | string; prediction?: object | string; presence_penalty?: number | string; reasoning_effort?: string; response_format?: object | string; seed?: number | string; stop?: string; store?: boolean | string; temperature?: number | string; tool_choice?: string; tools?: object[] | string; top_k?: number | string; top_logprobs?: number | string; top_p?: number | string; }; alias?: string; task_type?: 'chat_completion'; } | { configuration: { model: string; args?: object | string; inference_configuration?: object | string; }; alias?: string; task_type?: 'inference'; } | { configuration: { application_variant_id: string; inputs: object | string; history?: { request: string; response: string; session_data?: object; }[] | string; operation_metadata?: object | string; overrides?: { concurrent?: boolean; initial_state?: object; partial_trace?: object[]; return_span?: boolean; use_channels?: boolean; } | string; }; alias?: string; task_type?: 'application_variant'; } | { configuration: { agentex_agent_id: string; input_column: string | object | object[]; include_traces?: boolean | string; timeout_seconds?: number | string; }; alias?: string; task_type?: 'agentex_output'; } | { configuration: { candidate: string; reference: string; type: 'bleu'; } | { candidate: string; reference: string; type: 'meteor'; } | { candidate: string; reference: string; type: 'cosine_similarity'; } | { candidate: string; reference: string; type: 'f1'; } | { candidate: string; reference: string; type: 'rouge1'; } | { candidate: string; reference: string; type: 'rouge2'; } | { candidate: string; reference: string; type: 'rougeL'; }; alias?: string; task_type?: 'metric'; } | { configuration: { model: string; prompt: string; question_id: string; }; alias?: string; task_type?: 'auto_evaluation.question'; } | { configuration: { model: string; prompt: string; response_format: object; inference_args?: object; system_prompt?: string; } | { choices: string[]; model: string; prompt: string; inference_args?: object; system_prompt?: string; } | { definition: string; name: string; output_rules: string[]; data_fields?: string[]; designated_to?: object | object | object | object; output_type?: 'text' | 'integer' | 'float' | 'boolean'; output_values?: string | number | boolean[]; rubric_id?: string; rubric_version?: number; }; alias?: string; task_type?: 'auto_evaluation.guided_decoding'; } | { configuration: { definition: string; name: string; output_rules: string[]; data_fields?: string[]; designated_to?: object | object | object | object; output_type?: 'text' | 'integer' | 'float' | 'boolean'; output_values?: string | number | boolean[]; rubric_id?: string; rubric_version?: number; }; alias?: string; task_type?: 'auto_evaluation.agent'; } | { configuration: { layout: object; question_id: string; queue_id?: string; required?: boolean; rubric_id?: string; }; alias?: string; task_type?: 'contributor_evaluation.question'; } | { configuration: { function_source: string; arg_mapping?: object; }; alias?: string; task_type?: 'custom_function'; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\n// Automatically fetches more pages as needed.\nfor await (const evaluation of client.evaluations.list()) {\n console.log(evaluation);\n}\n```", perLanguage: { go: { method: 'client.Evaluations.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tpage, err := client.Evaluations.List(context.TODO(), sgpdev.EvaluationListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluations \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'evaluations.list', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\npage = client.evaluations.list()\npage = page.items[0]\nprint(page.id)', }, typescript: { method: 'client.evaluations.list', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const evaluation of client.evaluations.list()) {\n console.log(evaluation.id);\n}", }, }, }, { name: 'retrieve', endpoint: '/v5/evaluations/{evaluation_id}', httpMethod: 'get', summary: 'Get Evaluation', description: 'Get Evaluation', stainlessPath: '(resource) evaluations > (method) retrieve', qualified: 'client.evaluations.retrieve', params: ['evaluation_id: string;', 'include_archived?: boolean;', "views?: 'tasks'[];"], response: "{ id: string; created_at: string; created_by: object; datasets: object[]; name: string; status: 'failed' | 'completed' | 'running'; tags: string[]; archived_at?: string; description?: string; error_count?: number; metadata?: object; object?: 'evaluation'; progress?: object; status_reason?: string; tasks?: object | object | object | object | object | object | object | object | object | object[]; }", markdown: "## retrieve\n\n`client.evaluations.retrieve(evaluation_id: string, include_archived?: boolean, views?: 'tasks'[]): { id: string; created_at: string; created_by: identity; datasets: dataset[]; name: string; status: 'failed' | 'completed' | 'running'; tags: string[]; archived_at?: string; description?: string; error_count?: number; metadata?: object; object?: 'evaluation'; progress?: evaluation_tasks_progress_schema; status_reason?: string; tasks?: evaluation_task[]; }`\n\n**get** `/v5/evaluations/{evaluation_id}`\n\nGet Evaluation\n\n### Parameters\n\n- `evaluation_id: string`\n\n- `include_archived?: boolean`\n\n- `views?: 'tasks'[]`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; datasets: { id: string; created_at: string; created_by: identity; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }[]; name: string; status: 'failed' | 'completed' | 'running'; tags: string[]; archived_at?: string; description?: string; error_count?: number; metadata?: object; object?: 'evaluation'; progress?: { items?: object; workflows?: object; }; status_reason?: string; tasks?: { configuration: object; alias?: string; task_type?: 'chat_completion'; } | { configuration: object; alias?: string; task_type?: 'inference'; } | { configuration: object; alias?: string; task_type?: 'application_variant'; } | { configuration: object; alias?: string; task_type?: 'agentex_output'; } | { configuration: object | object | object | object | object | object | object; alias?: string; task_type?: 'metric'; } | { configuration: object; alias?: string; task_type?: 'auto_evaluation.question'; } | { configuration: object | object | auto_evaluation_agent_task_request_with_item_locator; alias?: string; task_type?: 'auto_evaluation.guided_decoding'; } | { configuration: auto_evaluation_agent_task_request_with_item_locator; alias?: string; task_type?: 'auto_evaluation.agent'; } | { configuration: object; alias?: string; task_type?: 'contributor_evaluation.question'; } | { configuration: object; alias?: string; task_type?: 'custom_function'; }[]; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `datasets: { id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }[]`\n - `name: string`\n - `status: 'failed' | 'completed' | 'running'`\n - `tags: string[]`\n - `archived_at?: string`\n - `description?: string`\n - `error_count?: number`\n - `metadata?: object`\n - `object?: 'evaluation'`\n - `progress?: { items?: { failed: number; pending: number; successful: number; total: number; failed_items?: { item_id: string; error?: string; error_type?: string; }[]; }; workflows?: { completed: number; failed: number; pending: number; total: number; }; }`\n - `status_reason?: string`\n - `tasks?: { configuration: { messages: object[] | string; model: string; audio?: object | string; frequency_penalty?: number | string; function_call?: object | string; functions?: object[] | string; logit_bias?: object | string; logprobs?: boolean | string; max_completion_tokens?: number | string; max_tokens?: number | string; metadata?: object | string; modalities?: string[] | string; n?: number | string; parallel_tool_calls?: boolean | string; prediction?: object | string; presence_penalty?: number | string; reasoning_effort?: string; response_format?: object | string; seed?: number | string; stop?: string; store?: boolean | string; temperature?: number | string; tool_choice?: string; tools?: object[] | string; top_k?: number | string; top_logprobs?: number | string; top_p?: number | string; }; alias?: string; task_type?: 'chat_completion'; } | { configuration: { model: string; args?: object | string; inference_configuration?: object | string; }; alias?: string; task_type?: 'inference'; } | { configuration: { application_variant_id: string; inputs: object | string; history?: { request: string; response: string; session_data?: object; }[] | string; operation_metadata?: object | string; overrides?: { concurrent?: boolean; initial_state?: object; partial_trace?: object[]; return_span?: boolean; use_channels?: boolean; } | string; }; alias?: string; task_type?: 'application_variant'; } | { configuration: { agentex_agent_id: string; input_column: string | object | object[]; include_traces?: boolean | string; timeout_seconds?: number | string; }; alias?: string; task_type?: 'agentex_output'; } | { configuration: { candidate: string; reference: string; type: 'bleu'; } | { candidate: string; reference: string; type: 'meteor'; } | { candidate: string; reference: string; type: 'cosine_similarity'; } | { candidate: string; reference: string; type: 'f1'; } | { candidate: string; reference: string; type: 'rouge1'; } | { candidate: string; reference: string; type: 'rouge2'; } | { candidate: string; reference: string; type: 'rougeL'; }; alias?: string; task_type?: 'metric'; } | { configuration: { model: string; prompt: string; question_id: string; }; alias?: string; task_type?: 'auto_evaluation.question'; } | { configuration: { model: string; prompt: string; response_format: object; inference_args?: object; system_prompt?: string; } | { choices: string[]; model: string; prompt: string; inference_args?: object; system_prompt?: string; } | { definition: string; name: string; output_rules: string[]; data_fields?: string[]; designated_to?: object | object | object | object; output_type?: 'text' | 'integer' | 'float' | 'boolean'; output_values?: string | number | boolean[]; rubric_id?: string; rubric_version?: number; }; alias?: string; task_type?: 'auto_evaluation.guided_decoding'; } | { configuration: { definition: string; name: string; output_rules: string[]; data_fields?: string[]; designated_to?: object | object | object | object; output_type?: 'text' | 'integer' | 'float' | 'boolean'; output_values?: string | number | boolean[]; rubric_id?: string; rubric_version?: number; }; alias?: string; task_type?: 'auto_evaluation.agent'; } | { configuration: { layout: object; question_id: string; queue_id?: string; required?: boolean; rubric_id?: string; }; alias?: string; task_type?: 'contributor_evaluation.question'; } | { configuration: { function_source: string; arg_mapping?: object; }; alias?: string; task_type?: 'custom_function'; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst evaluation = await client.evaluations.retrieve('evaluation_id');\n\nconsole.log(evaluation);\n```", perLanguage: { go: { method: 'client.Evaluations.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tevaluation, err := client.Evaluations.Get(\n\t\tcontext.TODO(),\n\t\t"evaluation_id",\n\t\tsgpdev.EvaluationGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", evaluation.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluations/$EVALUATION_ID \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'evaluations.retrieve', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nevaluation = client.evaluations.retrieve(\n evaluation_id="evaluation_id",\n)\nprint(evaluation.id)', }, typescript: { method: 'client.evaluations.retrieve', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst evaluation = await client.evaluations.retrieve('evaluation_id');\n\nconsole.log(evaluation.id);", }, }, }, { name: 'archive', endpoint: '/v5/evaluations/{evaluation_id}', httpMethod: 'delete', summary: 'Archive Evaluation', description: 'Archive Evaluation', stainlessPath: '(resource) evaluations > (method) archive', qualified: 'client.evaluations.archive', params: ['evaluation_id: string;'], response: "{ id: string; created_at: string; created_by: object; datasets: object[]; name: string; status: 'failed' | 'completed' | 'running'; tags: string[]; archived_at?: string; description?: string; error_count?: number; metadata?: object; object?: 'evaluation'; progress?: object; status_reason?: string; tasks?: object | object | object | object | object | object | object | object | object | object[]; }", markdown: "## archive\n\n`client.evaluations.archive(evaluation_id: string): { id: string; created_at: string; created_by: identity; datasets: dataset[]; name: string; status: 'failed' | 'completed' | 'running'; tags: string[]; archived_at?: string; description?: string; error_count?: number; metadata?: object; object?: 'evaluation'; progress?: evaluation_tasks_progress_schema; status_reason?: string; tasks?: evaluation_task[]; }`\n\n**delete** `/v5/evaluations/{evaluation_id}`\n\nArchive Evaluation\n\n### Parameters\n\n- `evaluation_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; datasets: { id: string; created_at: string; created_by: identity; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }[]; name: string; status: 'failed' | 'completed' | 'running'; tags: string[]; archived_at?: string; description?: string; error_count?: number; metadata?: object; object?: 'evaluation'; progress?: { items?: object; workflows?: object; }; status_reason?: string; tasks?: { configuration: object; alias?: string; task_type?: 'chat_completion'; } | { configuration: object; alias?: string; task_type?: 'inference'; } | { configuration: object; alias?: string; task_type?: 'application_variant'; } | { configuration: object; alias?: string; task_type?: 'agentex_output'; } | { configuration: object | object | object | object | object | object | object; alias?: string; task_type?: 'metric'; } | { configuration: object; alias?: string; task_type?: 'auto_evaluation.question'; } | { configuration: object | object | auto_evaluation_agent_task_request_with_item_locator; alias?: string; task_type?: 'auto_evaluation.guided_decoding'; } | { configuration: auto_evaluation_agent_task_request_with_item_locator; alias?: string; task_type?: 'auto_evaluation.agent'; } | { configuration: object; alias?: string; task_type?: 'contributor_evaluation.question'; } | { configuration: object; alias?: string; task_type?: 'custom_function'; }[]; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `datasets: { id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }[]`\n - `name: string`\n - `status: 'failed' | 'completed' | 'running'`\n - `tags: string[]`\n - `archived_at?: string`\n - `description?: string`\n - `error_count?: number`\n - `metadata?: object`\n - `object?: 'evaluation'`\n - `progress?: { items?: { failed: number; pending: number; successful: number; total: number; failed_items?: { item_id: string; error?: string; error_type?: string; }[]; }; workflows?: { completed: number; failed: number; pending: number; total: number; }; }`\n - `status_reason?: string`\n - `tasks?: { configuration: { messages: object[] | string; model: string; audio?: object | string; frequency_penalty?: number | string; function_call?: object | string; functions?: object[] | string; logit_bias?: object | string; logprobs?: boolean | string; max_completion_tokens?: number | string; max_tokens?: number | string; metadata?: object | string; modalities?: string[] | string; n?: number | string; parallel_tool_calls?: boolean | string; prediction?: object | string; presence_penalty?: number | string; reasoning_effort?: string; response_format?: object | string; seed?: number | string; stop?: string; store?: boolean | string; temperature?: number | string; tool_choice?: string; tools?: object[] | string; top_k?: number | string; top_logprobs?: number | string; top_p?: number | string; }; alias?: string; task_type?: 'chat_completion'; } | { configuration: { model: string; args?: object | string; inference_configuration?: object | string; }; alias?: string; task_type?: 'inference'; } | { configuration: { application_variant_id: string; inputs: object | string; history?: { request: string; response: string; session_data?: object; }[] | string; operation_metadata?: object | string; overrides?: { concurrent?: boolean; initial_state?: object; partial_trace?: object[]; return_span?: boolean; use_channels?: boolean; } | string; }; alias?: string; task_type?: 'application_variant'; } | { configuration: { agentex_agent_id: string; input_column: string | object | object[]; include_traces?: boolean | string; timeout_seconds?: number | string; }; alias?: string; task_type?: 'agentex_output'; } | { configuration: { candidate: string; reference: string; type: 'bleu'; } | { candidate: string; reference: string; type: 'meteor'; } | { candidate: string; reference: string; type: 'cosine_similarity'; } | { candidate: string; reference: string; type: 'f1'; } | { candidate: string; reference: string; type: 'rouge1'; } | { candidate: string; reference: string; type: 'rouge2'; } | { candidate: string; reference: string; type: 'rougeL'; }; alias?: string; task_type?: 'metric'; } | { configuration: { model: string; prompt: string; question_id: string; }; alias?: string; task_type?: 'auto_evaluation.question'; } | { configuration: { model: string; prompt: string; response_format: object; inference_args?: object; system_prompt?: string; } | { choices: string[]; model: string; prompt: string; inference_args?: object; system_prompt?: string; } | { definition: string; name: string; output_rules: string[]; data_fields?: string[]; designated_to?: object | object | object | object; output_type?: 'text' | 'integer' | 'float' | 'boolean'; output_values?: string | number | boolean[]; rubric_id?: string; rubric_version?: number; }; alias?: string; task_type?: 'auto_evaluation.guided_decoding'; } | { configuration: { definition: string; name: string; output_rules: string[]; data_fields?: string[]; designated_to?: object | object | object | object; output_type?: 'text' | 'integer' | 'float' | 'boolean'; output_values?: string | number | boolean[]; rubric_id?: string; rubric_version?: number; }; alias?: string; task_type?: 'auto_evaluation.agent'; } | { configuration: { layout: object; question_id: string; queue_id?: string; required?: boolean; rubric_id?: string; }; alias?: string; task_type?: 'contributor_evaluation.question'; } | { configuration: { function_source: string; arg_mapping?: object; }; alias?: string; task_type?: 'custom_function'; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst evaluation = await client.evaluations.archive('evaluation_id');\n\nconsole.log(evaluation);\n```", perLanguage: { go: { method: 'client.Evaluations.Archive', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tevaluation, err := client.Evaluations.Archive(context.TODO(), "evaluation_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", evaluation.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluations/$EVALUATION_ID \\\n -X DELETE \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'evaluations.archive', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nevaluation = client.evaluations.archive(\n "evaluation_id",\n)\nprint(evaluation.id)', }, typescript: { method: 'client.evaluations.archive', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst evaluation = await client.evaluations.archive('evaluation_id');\n\nconsole.log(evaluation.id);", }, }, }, { name: 'update', endpoint: '/v5/evaluations/{evaluation_id}', httpMethod: 'patch', summary: 'Update or Restore Evaluation', description: 'Update or Restore Evaluation', stainlessPath: '(resource) evaluations > (method) update', qualified: 'client.evaluations.update', params: [ 'evaluation_id: string;', 'evaluation: { description?: string; name?: string; tags?: string[]; } | { restore: true; };', ], response: "{ id: string; created_at: string; created_by: object; datasets: object[]; name: string; status: 'failed' | 'completed' | 'running'; tags: string[]; archived_at?: string; description?: string; error_count?: number; metadata?: object; object?: 'evaluation'; progress?: object; status_reason?: string; tasks?: object | object | object | object | object | object | object | object | object | object[]; }", markdown: "## update\n\n`client.evaluations.update(evaluation_id: string, evaluation: { description?: string; name?: string; tags?: string[]; } | { restore: true; }): { id: string; created_at: string; created_by: identity; datasets: dataset[]; name: string; status: 'failed' | 'completed' | 'running'; tags: string[]; archived_at?: string; description?: string; error_count?: number; metadata?: object; object?: 'evaluation'; progress?: evaluation_tasks_progress_schema; status_reason?: string; tasks?: evaluation_task[]; }`\n\n**patch** `/v5/evaluations/{evaluation_id}`\n\nUpdate or Restore Evaluation\n\n### Parameters\n\n- `evaluation_id: string`\n\n- `evaluation: { description?: string; name?: string; tags?: string[]; } | { restore: true; }`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; datasets: { id: string; created_at: string; created_by: identity; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }[]; name: string; status: 'failed' | 'completed' | 'running'; tags: string[]; archived_at?: string; description?: string; error_count?: number; metadata?: object; object?: 'evaluation'; progress?: { items?: object; workflows?: object; }; status_reason?: string; tasks?: { configuration: object; alias?: string; task_type?: 'chat_completion'; } | { configuration: object; alias?: string; task_type?: 'inference'; } | { configuration: object; alias?: string; task_type?: 'application_variant'; } | { configuration: object; alias?: string; task_type?: 'agentex_output'; } | { configuration: object | object | object | object | object | object | object; alias?: string; task_type?: 'metric'; } | { configuration: object; alias?: string; task_type?: 'auto_evaluation.question'; } | { configuration: object | object | auto_evaluation_agent_task_request_with_item_locator; alias?: string; task_type?: 'auto_evaluation.guided_decoding'; } | { configuration: auto_evaluation_agent_task_request_with_item_locator; alias?: string; task_type?: 'auto_evaluation.agent'; } | { configuration: object; alias?: string; task_type?: 'contributor_evaluation.question'; } | { configuration: object; alias?: string; task_type?: 'custom_function'; }[]; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `datasets: { id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }[]`\n - `name: string`\n - `status: 'failed' | 'completed' | 'running'`\n - `tags: string[]`\n - `archived_at?: string`\n - `description?: string`\n - `error_count?: number`\n - `metadata?: object`\n - `object?: 'evaluation'`\n - `progress?: { items?: { failed: number; pending: number; successful: number; total: number; failed_items?: { item_id: string; error?: string; error_type?: string; }[]; }; workflows?: { completed: number; failed: number; pending: number; total: number; }; }`\n - `status_reason?: string`\n - `tasks?: { configuration: { messages: object[] | string; model: string; audio?: object | string; frequency_penalty?: number | string; function_call?: object | string; functions?: object[] | string; logit_bias?: object | string; logprobs?: boolean | string; max_completion_tokens?: number | string; max_tokens?: number | string; metadata?: object | string; modalities?: string[] | string; n?: number | string; parallel_tool_calls?: boolean | string; prediction?: object | string; presence_penalty?: number | string; reasoning_effort?: string; response_format?: object | string; seed?: number | string; stop?: string; store?: boolean | string; temperature?: number | string; tool_choice?: string; tools?: object[] | string; top_k?: number | string; top_logprobs?: number | string; top_p?: number | string; }; alias?: string; task_type?: 'chat_completion'; } | { configuration: { model: string; args?: object | string; inference_configuration?: object | string; }; alias?: string; task_type?: 'inference'; } | { configuration: { application_variant_id: string; inputs: object | string; history?: { request: string; response: string; session_data?: object; }[] | string; operation_metadata?: object | string; overrides?: { concurrent?: boolean; initial_state?: object; partial_trace?: object[]; return_span?: boolean; use_channels?: boolean; } | string; }; alias?: string; task_type?: 'application_variant'; } | { configuration: { agentex_agent_id: string; input_column: string | object | object[]; include_traces?: boolean | string; timeout_seconds?: number | string; }; alias?: string; task_type?: 'agentex_output'; } | { configuration: { candidate: string; reference: string; type: 'bleu'; } | { candidate: string; reference: string; type: 'meteor'; } | { candidate: string; reference: string; type: 'cosine_similarity'; } | { candidate: string; reference: string; type: 'f1'; } | { candidate: string; reference: string; type: 'rouge1'; } | { candidate: string; reference: string; type: 'rouge2'; } | { candidate: string; reference: string; type: 'rougeL'; }; alias?: string; task_type?: 'metric'; } | { configuration: { model: string; prompt: string; question_id: string; }; alias?: string; task_type?: 'auto_evaluation.question'; } | { configuration: { model: string; prompt: string; response_format: object; inference_args?: object; system_prompt?: string; } | { choices: string[]; model: string; prompt: string; inference_args?: object; system_prompt?: string; } | { definition: string; name: string; output_rules: string[]; data_fields?: string[]; designated_to?: object | object | object | object; output_type?: 'text' | 'integer' | 'float' | 'boolean'; output_values?: string | number | boolean[]; rubric_id?: string; rubric_version?: number; }; alias?: string; task_type?: 'auto_evaluation.guided_decoding'; } | { configuration: { definition: string; name: string; output_rules: string[]; data_fields?: string[]; designated_to?: object | object | object | object; output_type?: 'text' | 'integer' | 'float' | 'boolean'; output_values?: string | number | boolean[]; rubric_id?: string; rubric_version?: number; }; alias?: string; task_type?: 'auto_evaluation.agent'; } | { configuration: { layout: object; question_id: string; queue_id?: string; required?: boolean; rubric_id?: string; }; alias?: string; task_type?: 'contributor_evaluation.question'; } | { configuration: { function_source: string; arg_mapping?: object; }; alias?: string; task_type?: 'custom_function'; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst evaluation = await client.evaluations.update('evaluation_id', { evaluation: {} });\n\nconsole.log(evaluation);\n```", perLanguage: { go: { method: 'client.Evaluations.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tevaluation, err := client.Evaluations.Update(\n\t\tcontext.TODO(),\n\t\t"evaluation_id",\n\t\tsgpdev.EvaluationUpdateParams{\n\t\t\tOfPartialEvaluationUpdateRequest: &sgpdev.EvaluationUpdateParamsEvaluationPartialEvaluationUpdateRequest{},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", evaluation.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluations/$EVALUATION_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "description": "description",\n "name": "name",\n "tags": [\n "string"\n ]\n }\'', }, python: { method: 'evaluations.update', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nevaluation = client.evaluations.update(\n evaluation_id="evaluation_id",\n evaluation={},\n)\nprint(evaluation.id)', }, typescript: { method: 'client.evaluations.update', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst evaluation = await client.evaluations.update('evaluation_id', { evaluation: {} });\n\nconsole.log(evaluation.id);", }, }, }, { name: 'retrieve_schema', endpoint: '/v5/evaluations/{evaluation_id}/schema', httpMethod: 'get', summary: 'Get Evaluation Data Schema', description: 'Get schema information for evaluation item data, including field names, types, and occurrence counts.', stainlessPath: '(resource) evaluations > (method) retrieve_schema', qualified: 'client.evaluations.retrieveSchema', params: ['evaluation_id: string;', 'include_archived?: boolean;'], response: "{ evaluation_id: string; fields: { data_type: string; field_name: string; item_count: number; source: 'data' | 'task_result_cache'; object?: 'field_schema'; }[]; total_items: number; is_sampled?: boolean; object?: 'evaluation_schema'; sample_size?: number; }", markdown: "## retrieve_schema\n\n`client.evaluations.retrieveSchema(evaluation_id: string, include_archived?: boolean): { evaluation_id: string; fields: object[]; total_items: number; is_sampled?: boolean; object?: 'evaluation_schema'; sample_size?: number; }`\n\n**get** `/v5/evaluations/{evaluation_id}/schema`\n\nGet schema information for evaluation item data, including field names, types, and occurrence counts.\n\n### Parameters\n\n- `evaluation_id: string`\n\n- `include_archived?: boolean`\n Include archived items in schema analysis\n\n### Returns\n\n- `{ evaluation_id: string; fields: { data_type: string; field_name: string; item_count: number; source: 'data' | 'task_result_cache'; object?: 'field_schema'; }[]; total_items: number; is_sampled?: boolean; object?: 'evaluation_schema'; sample_size?: number; }`\n Schema information for an evaluation's item data structure\n\n - `evaluation_id: string`\n - `fields: { data_type: string; field_name: string; item_count: number; source: 'data' | 'task_result_cache'; object?: 'field_schema'; }[]`\n - `total_items: number`\n - `is_sampled?: boolean`\n - `object?: 'evaluation_schema'`\n - `sample_size?: number`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst evaluationSchemaResponse = await client.evaluations.retrieveSchema('evaluation_id');\n\nconsole.log(evaluationSchemaResponse);\n```", perLanguage: { go: { method: 'client.Evaluations.GetSchema', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tevaluationSchemaResponse, err := client.Evaluations.GetSchema(\n\t\tcontext.TODO(),\n\t\t"evaluation_id",\n\t\tsgpdev.EvaluationGetSchemaParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", evaluationSchemaResponse.EvaluationID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluations/$EVALUATION_ID/schema \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'evaluations.retrieve_schema', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nevaluation_schema_response = client.evaluations.retrieve_schema(\n evaluation_id="evaluation_id",\n)\nprint(evaluation_schema_response.evaluation_id)', }, typescript: { method: 'client.evaluations.retrieveSchema', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst evaluationSchemaResponse = await client.evaluations.retrieveSchema('evaluation_id');\n\nconsole.log(evaluationSchemaResponse.evaluation_id);", }, }, }, { name: 'filter', endpoint: '/v5/evaluations/filter', httpMethod: 'post', summary: 'Filter Evaluations', description: 'Filter evaluations using metadata and other criteria. Supports up to 10 filters with AND logic.', stainlessPath: '(resource) evaluations > (method) filter', qualified: 'client.evaluations.filter', params: [ "filters: { key: string; operator: '==' | '!=' | '>=' | '<=' | 'IN' | 'NOT_IN'; value: string; object?: 'metadata_filter'; }[];", 'cursor?: string;', 'ending_before?: string;', 'include_archived?: boolean;', 'limit?: number;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', "views?: 'tasks'[];", ], response: "{ id: string; created_at: string; created_by: object; datasets: object[]; name: string; status: 'failed' | 'completed' | 'running'; tags: string[]; archived_at?: string; description?: string; error_count?: number; metadata?: object; object?: 'evaluation'; progress?: object; status_reason?: string; tasks?: object | object | object | object | object | object | object | object | object | object[]; }", markdown: "## filter\n\n`client.evaluations.filter(filters: { key: string; operator: '==' | '!=' | '>=' | '<=' | 'IN' | 'NOT_IN'; value: string; object?: 'metadata_filter'; }[], cursor?: string, ending_before?: string, include_archived?: boolean, limit?: number, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string, views?: 'tasks'[]): { id: string; created_at: string; created_by: identity; datasets: dataset[]; name: string; status: 'failed' | 'completed' | 'running'; tags: string[]; archived_at?: string; description?: string; error_count?: number; metadata?: object; object?: 'evaluation'; progress?: evaluation_tasks_progress_schema; status_reason?: string; tasks?: evaluation_task[]; }`\n\n**post** `/v5/evaluations/filter`\n\nFilter evaluations using metadata and other criteria. Supports up to 10 filters with AND logic.\n\n### Parameters\n\n- `filters: { key: string; operator: '==' | '!=' | '>=' | '<=' | 'IN' | 'NOT_IN'; value: string; object?: 'metadata_filter'; }[]`\n List of metadata filters to apply (maximum 10)\n\n- `cursor?: string`\n\n- `ending_before?: string`\n\n- `include_archived?: boolean`\n\n- `limit?: number`\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n- `views?: 'tasks'[]`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; datasets: { id: string; created_at: string; created_by: identity; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }[]; name: string; status: 'failed' | 'completed' | 'running'; tags: string[]; archived_at?: string; description?: string; error_count?: number; metadata?: object; object?: 'evaluation'; progress?: { items?: object; workflows?: object; }; status_reason?: string; tasks?: { configuration: object; alias?: string; task_type?: 'chat_completion'; } | { configuration: object; alias?: string; task_type?: 'inference'; } | { configuration: object; alias?: string; task_type?: 'application_variant'; } | { configuration: object; alias?: string; task_type?: 'agentex_output'; } | { configuration: object | object | object | object | object | object | object; alias?: string; task_type?: 'metric'; } | { configuration: object; alias?: string; task_type?: 'auto_evaluation.question'; } | { configuration: object | object | auto_evaluation_agent_task_request_with_item_locator; alias?: string; task_type?: 'auto_evaluation.guided_decoding'; } | { configuration: auto_evaluation_agent_task_request_with_item_locator; alias?: string; task_type?: 'auto_evaluation.agent'; } | { configuration: object; alias?: string; task_type?: 'contributor_evaluation.question'; } | { configuration: object; alias?: string; task_type?: 'custom_function'; }[]; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `datasets: { id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; current_version_num: number; name: string; tags: string[]; archived_at?: string; description?: string; object?: 'dataset'; }[]`\n - `name: string`\n - `status: 'failed' | 'completed' | 'running'`\n - `tags: string[]`\n - `archived_at?: string`\n - `description?: string`\n - `error_count?: number`\n - `metadata?: object`\n - `object?: 'evaluation'`\n - `progress?: { items?: { failed: number; pending: number; successful: number; total: number; failed_items?: { item_id: string; error?: string; error_type?: string; }[]; }; workflows?: { completed: number; failed: number; pending: number; total: number; }; }`\n - `status_reason?: string`\n - `tasks?: { configuration: { messages: object[] | string; model: string; audio?: object | string; frequency_penalty?: number | string; function_call?: object | string; functions?: object[] | string; logit_bias?: object | string; logprobs?: boolean | string; max_completion_tokens?: number | string; max_tokens?: number | string; metadata?: object | string; modalities?: string[] | string; n?: number | string; parallel_tool_calls?: boolean | string; prediction?: object | string; presence_penalty?: number | string; reasoning_effort?: string; response_format?: object | string; seed?: number | string; stop?: string; store?: boolean | string; temperature?: number | string; tool_choice?: string; tools?: object[] | string; top_k?: number | string; top_logprobs?: number | string; top_p?: number | string; }; alias?: string; task_type?: 'chat_completion'; } | { configuration: { model: string; args?: object | string; inference_configuration?: object | string; }; alias?: string; task_type?: 'inference'; } | { configuration: { application_variant_id: string; inputs: object | string; history?: { request: string; response: string; session_data?: object; }[] | string; operation_metadata?: object | string; overrides?: { concurrent?: boolean; initial_state?: object; partial_trace?: object[]; return_span?: boolean; use_channels?: boolean; } | string; }; alias?: string; task_type?: 'application_variant'; } | { configuration: { agentex_agent_id: string; input_column: string | object | object[]; include_traces?: boolean | string; timeout_seconds?: number | string; }; alias?: string; task_type?: 'agentex_output'; } | { configuration: { candidate: string; reference: string; type: 'bleu'; } | { candidate: string; reference: string; type: 'meteor'; } | { candidate: string; reference: string; type: 'cosine_similarity'; } | { candidate: string; reference: string; type: 'f1'; } | { candidate: string; reference: string; type: 'rouge1'; } | { candidate: string; reference: string; type: 'rouge2'; } | { candidate: string; reference: string; type: 'rougeL'; }; alias?: string; task_type?: 'metric'; } | { configuration: { model: string; prompt: string; question_id: string; }; alias?: string; task_type?: 'auto_evaluation.question'; } | { configuration: { model: string; prompt: string; response_format: object; inference_args?: object; system_prompt?: string; } | { choices: string[]; model: string; prompt: string; inference_args?: object; system_prompt?: string; } | { definition: string; name: string; output_rules: string[]; data_fields?: string[]; designated_to?: object | object | object | object; output_type?: 'text' | 'integer' | 'float' | 'boolean'; output_values?: string | number | boolean[]; rubric_id?: string; rubric_version?: number; }; alias?: string; task_type?: 'auto_evaluation.guided_decoding'; } | { configuration: { definition: string; name: string; output_rules: string[]; data_fields?: string[]; designated_to?: object | object | object | object; output_type?: 'text' | 'integer' | 'float' | 'boolean'; output_values?: string | number | boolean[]; rubric_id?: string; rubric_version?: number; }; alias?: string; task_type?: 'auto_evaluation.agent'; } | { configuration: { layout: object; question_id: string; queue_id?: string; required?: boolean; rubric_id?: string; }; alias?: string; task_type?: 'contributor_evaluation.question'; } | { configuration: { function_source: string; arg_mapping?: object; }; alias?: string; task_type?: 'custom_function'; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\n// Automatically fetches more pages as needed.\nfor await (const evaluation of client.evaluations.filter({ filters: [{\n key: 'key',\n operator: '==',\n value: 'value',\n}] })) {\n console.log(evaluation);\n}\n```", perLanguage: { go: { method: 'client.Evaluations.Filter', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tpage, err := client.Evaluations.Filter(context.TODO(), sgpdev.EvaluationFilterParams{\n\t\tFilters: []sgpdev.EvaluationFilterParamsFilter{{\n\t\t\tKey: "key",\n\t\t\tOperator: "==",\n\t\t\tValue: "value",\n\t\t}},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluations/filter \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "filters": [\n {\n "key": "key",\n "operator": "==",\n "value": "value"\n }\n ]\n }\'', }, python: { method: 'evaluations.filter', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\npage = client.evaluations.filter(\n filters=[{\n "key": "key",\n "operator": "==",\n "value": "value",\n }],\n)\npage = page.items[0]\nprint(page.id)', }, typescript: { method: 'client.evaluations.filter', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const evaluation of client.evaluations.filter({\n filters: [\n {\n key: 'key',\n operator: '==',\n value: 'value',\n },\n ],\n})) {\n console.log(evaluation.id);\n}", }, }, }, { name: 'retrieve_taxonomy', endpoint: '/v5/evaluations/{evaluation_id}/taxonomy', httpMethod: 'get', summary: 'Get Evaluation Taxonomy', description: 'Get taxonomy JSON for contributor evaluation question tasks.', stainlessPath: '(resource) evaluations > (method) retrieve_taxonomy', qualified: 'client.evaluations.retrieveTaxonomy', params: ['evaluation_id: string;'], response: 'object', markdown: "## retrieve_taxonomy\n\n`client.evaluations.retrieveTaxonomy(evaluation_id: string): object`\n\n**get** `/v5/evaluations/{evaluation_id}/taxonomy`\n\nGet taxonomy JSON for contributor evaluation question tasks.\n\n### Parameters\n\n- `evaluation_id: string`\n\n### Returns\n\n- `object`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst response = await client.evaluations.retrieveTaxonomy('evaluation_id');\n\nconsole.log(response);\n```", perLanguage: { go: { method: 'client.Evaluations.GetTaxonomy', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tresponse, err := client.Evaluations.GetTaxonomy(context.TODO(), "evaluation_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluations/$EVALUATION_ID/taxonomy \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'evaluations.retrieve_taxonomy', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.evaluations.retrieve_taxonomy(\n "evaluation_id",\n)\nprint(response)', }, typescript: { method: 'client.evaluations.retrieveTaxonomy', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.evaluations.retrieveTaxonomy('evaluation_id');\n\nconsole.log(response);", }, }, }, { name: 'retrieve', endpoint: '/v5/evaluation-items/{evaluation_item_id}', httpMethod: 'get', summary: 'Get Evaluation Item', description: 'Get Evaluation Item', stainlessPath: '(resource) evaluation_items > (method) retrieve', qualified: 'client.evaluationItems.retrieve', params: ['evaluation_item_id: string;', 'include_archived?: boolean;'], response: "{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; data: object; evaluation_id: string; archived_at?: string; dataset_item_id?: string; dataset_item_version_num?: number; files?: object; object?: 'evaluation.item'; task_errors?: object; }", markdown: "## retrieve\n\n`client.evaluationItems.retrieve(evaluation_item_id: string, include_archived?: boolean): { id: string; created_at: string; created_by: identity; data: object; evaluation_id: string; archived_at?: string; dataset_item_id?: string; dataset_item_version_num?: number; files?: object; object?: 'evaluation.item'; task_errors?: object; }`\n\n**get** `/v5/evaluation-items/{evaluation_item_id}`\n\nGet Evaluation Item\n\n### Parameters\n\n- `evaluation_item_id: string`\n\n- `include_archived?: boolean`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; data: object; evaluation_id: string; archived_at?: string; dataset_item_id?: string; dataset_item_version_num?: number; files?: object; object?: 'evaluation.item'; task_errors?: object; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `data: object`\n - `evaluation_id: string`\n - `archived_at?: string`\n - `dataset_item_id?: string`\n - `dataset_item_version_num?: number`\n - `files?: object`\n - `object?: 'evaluation.item'`\n - `task_errors?: object`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst evaluationItem = await client.evaluationItems.retrieve('evaluation_item_id');\n\nconsole.log(evaluationItem);\n```", perLanguage: { go: { method: 'client.EvaluationItems.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tevaluationItem, err := client.EvaluationItems.Get(\n\t\tcontext.TODO(),\n\t\t"evaluation_item_id",\n\t\tsgpdev.EvaluationItemGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", evaluationItem.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluation-items/$EVALUATION_ITEM_ID \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'evaluation_items.retrieve', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nevaluation_item = client.evaluation_items.retrieve(\n evaluation_item_id="evaluation_item_id",\n)\nprint(evaluation_item.id)', }, typescript: { method: 'client.evaluationItems.retrieve', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst evaluationItem = await client.evaluationItems.retrieve('evaluation_item_id');\n\nconsole.log(evaluationItem.id);", }, }, }, { name: 'list', endpoint: '/v5/evaluation-items', httpMethod: 'get', summary: 'List Evaluation Items', description: 'List Evaluation Items', stainlessPath: '(resource) evaluation_items > (method) list', qualified: 'client.evaluationItems.list', params: [ "completion_status?: 'failed' | 'passed' | 'all';", 'cursor?: string;', 'ending_before?: string;', 'evaluation_id?: string;', 'include_archived?: boolean;', 'limit?: number;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', ], response: "{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; data: object; evaluation_id: string; archived_at?: string; dataset_item_id?: string; dataset_item_version_num?: number; files?: object; object?: 'evaluation.item'; task_errors?: object; }", markdown: "## list\n\n`client.evaluationItems.list(completion_status?: 'failed' | 'passed' | 'all', cursor?: string, ending_before?: string, evaluation_id?: string, include_archived?: boolean, limit?: number, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string): { id: string; created_at: string; created_by: identity; data: object; evaluation_id: string; archived_at?: string; dataset_item_id?: string; dataset_item_version_num?: number; files?: object; object?: 'evaluation.item'; task_errors?: object; }`\n\n**get** `/v5/evaluation-items`\n\nList Evaluation Items\n\n### Parameters\n\n- `completion_status?: 'failed' | 'passed' | 'all'`\n Filter items by completion status. Pass 'failed' to return only items with errors, 'passed' for items without errors. Pass 'all' or omit to return all items.\n\n- `cursor?: string`\n\n- `ending_before?: string`\n\n- `evaluation_id?: string`\n\n- `include_archived?: boolean`\n\n- `limit?: number`\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; data: object; evaluation_id: string; archived_at?: string; dataset_item_id?: string; dataset_item_version_num?: number; files?: object; object?: 'evaluation.item'; task_errors?: object; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `data: object`\n - `evaluation_id: string`\n - `archived_at?: string`\n - `dataset_item_id?: string`\n - `dataset_item_version_num?: number`\n - `files?: object`\n - `object?: 'evaluation.item'`\n - `task_errors?: object`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\n// Automatically fetches more pages as needed.\nfor await (const evaluationItem of client.evaluationItems.list()) {\n console.log(evaluationItem);\n}\n```", perLanguage: { go: { method: 'client.EvaluationItems.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tpage, err := client.EvaluationItems.List(context.TODO(), sgpdev.EvaluationItemListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluation-items \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'evaluation_items.list', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\npage = client.evaluation_items.list()\npage = page.items[0]\nprint(page.id)', }, typescript: { method: 'client.evaluationItems.list', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const evaluationItem of client.evaluationItems.list()) {\n console.log(evaluationItem.id);\n}", }, }, }, { name: 'export', endpoint: '/v5/evaluation-items/export', httpMethod: 'post', summary: 'Export Evaluation Items', description: 'Export Evaluation Items', stainlessPath: '(resource) evaluation_items > (method) export', qualified: 'client.evaluationItems.export', params: [ 'evaluation_id: string;', "export_format?: 'json' | 'jsonl' | 'csv';", "export_method?: 'signed_url' | 'direct';", 'include_archived?: boolean;', ], response: '{ filename: string; content?: string; signed_url?: string; }', markdown: "## export\n\n`client.evaluationItems.export(evaluation_id: string, export_format?: 'json' | 'jsonl' | 'csv', export_method?: 'signed_url' | 'direct', include_archived?: boolean): { filename: string; content?: string; signed_url?: string; }`\n\n**post** `/v5/evaluation-items/export`\n\nExport Evaluation Items\n\n### Parameters\n\n- `evaluation_id: string`\n The ID of the evaluation to export items from.\n\n- `export_format?: 'json' | 'jsonl' | 'csv'`\n The format of the exported evaluation items. `json` returns a single JSON array, while `jsonl` returns one JSON object per line.\n\n- `export_method?: 'signed_url' | 'direct'`\n The method for exporting evaluation items. `signed_url` returns a pre-signed URL, while `direct` returns the raw content.\n\n- `include_archived?: boolean`\n If true, include archived evaluation items in the export.\n\n### Returns\n\n- `{ filename: string; content?: string; signed_url?: string; }`\n Response model for exporting evaluation items.\nThis class represents the response when users export evaluation items.\nIt contains either a signed URL to download the exported data from object storage,\nor the actual content bytes when direct download is used (in environments where object storage is not configured).\n\n - `filename: string`\n - `content?: string`\n - `signed_url?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst evaluationItemExport = await client.evaluationItems.export({ evaluation_id: 'evaluation_id' });\n\nconsole.log(evaluationItemExport);\n```", perLanguage: { go: { method: 'client.EvaluationItems.Export', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tevaluationItemExport, err := client.EvaluationItems.Export(context.TODO(), sgpdev.EvaluationItemExportParams{\n\t\tEvaluationID: "evaluation_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", evaluationItemExport.Filename)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluation-items/export \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "evaluation_id": "evaluation_id"\n }\'', }, python: { method: 'evaluation_items.export', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nevaluation_item_export = client.evaluation_items.export(\n evaluation_id="evaluation_id",\n)\nprint(evaluation_item_export.filename)', }, typescript: { method: 'client.evaluationItems.export', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst evaluationItemExport = await client.evaluationItems.export({\n evaluation_id: 'evaluation_id',\n});\n\nconsole.log(evaluationItemExport.filename);", }, }, }, { name: 'create', endpoint: '/v5/rubrics', httpMethod: 'post', summary: 'Create Rubric', description: 'Create Rubric', stainlessPath: '(resource) rubrics > (method) create', qualified: 'client.rubrics.create', params: [ 'title: string;', 'criteria?: { title: string; annotations?: object; weight?: number; }[];', 'tags?: string[];', ], response: "{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; tags: string[]; title: string; version: number; archived_at?: string; criteria?: { id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; } | { title: string; weight?: number; }[]; object?: 'rubric'; updated_at?: string; }", markdown: "## create\n\n`client.rubrics.create(title: string, criteria?: { title: string; annotations?: object; weight?: number; }[], tags?: string[]): { id: string; created_at: string; created_by: identity; tags: string[]; title: string; version: number; archived_at?: string; criteria?: rubric_criteria_response | rubric_criteria_summary_response[]; object?: 'rubric'; updated_at?: string; }`\n\n**post** `/v5/rubrics`\n\nCreate Rubric\n\n### Parameters\n\n- `title: string`\n The rubric title\n\n- `criteria?: { title: string; annotations?: object; weight?: number; }[]`\n Initial criteria to create with the rubric\n\n- `tags?: string[]`\n The tags associated with the entity\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; tags: string[]; title: string; version: number; archived_at?: string; criteria?: { id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; } | { title: string; weight?: number; }[]; object?: 'rubric'; updated_at?: string; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `tags: string[]`\n - `title: string`\n - `version: number`\n - `archived_at?: string`\n - `criteria?: { id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; } | { title: string; weight?: number; }[]`\n - `object?: 'rubric'`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst rubricResponse = await client.rubrics.create({ title: 'x' });\n\nconsole.log(rubricResponse);\n```", perLanguage: { go: { method: 'client.Rubrics.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\trubricResponse, err := client.Rubrics.New(context.TODO(), sgpdev.RubricNewParams{\n\t\tTitle: "x",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", rubricResponse.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/rubrics \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "title": "x"\n }\'', }, python: { method: 'rubrics.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nrubric_response = client.rubrics.create(\n title="x",\n)\nprint(rubric_response.id)', }, typescript: { method: 'client.rubrics.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst rubricResponse = await client.rubrics.create({ title: 'x' });\n\nconsole.log(rubricResponse.id);", }, }, }, { name: 'list', endpoint: '/v5/rubrics', httpMethod: 'get', summary: 'List Rubrics', description: 'List Rubrics', stainlessPath: '(resource) rubrics > (method) list', qualified: 'client.rubrics.list', params: [ 'cursor?: string;', 'ending_before?: string;', 'limit?: number;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', 'tags?: string[];', 'title?: string;', ], response: "{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; tags: string[]; title: string; version: number; archived_at?: string; criteria?: { id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; } | { title: string; weight?: number; }[]; object?: 'rubric'; updated_at?: string; }", markdown: "## list\n\n`client.rubrics.list(cursor?: string, ending_before?: string, limit?: number, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string, tags?: string[], title?: string): { id: string; created_at: string; created_by: identity; tags: string[]; title: string; version: number; archived_at?: string; criteria?: rubric_criteria_response | rubric_criteria_summary_response[]; object?: 'rubric'; updated_at?: string; }`\n\n**get** `/v5/rubrics`\n\nList Rubrics\n\n### Parameters\n\n- `cursor?: string`\n\n- `ending_before?: string`\n\n- `limit?: number`\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n- `tags?: string[]`\n Filter by tags\n\n- `title?: string`\n Filter by title (case-insensitive)\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; tags: string[]; title: string; version: number; archived_at?: string; criteria?: { id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; } | { title: string; weight?: number; }[]; object?: 'rubric'; updated_at?: string; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `tags: string[]`\n - `title: string`\n - `version: number`\n - `archived_at?: string`\n - `criteria?: { id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; } | { title: string; weight?: number; }[]`\n - `object?: 'rubric'`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\n// Automatically fetches more pages as needed.\nfor await (const rubricResponse of client.rubrics.list()) {\n console.log(rubricResponse);\n}\n```", perLanguage: { go: { method: 'client.Rubrics.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tpage, err := client.Rubrics.List(context.TODO(), sgpdev.RubricListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/rubrics \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'rubrics.list', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\npage = client.rubrics.list()\npage = page.items[0]\nprint(page.id)', }, typescript: { method: 'client.rubrics.list', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const rubricResponse of client.rubrics.list()) {\n console.log(rubricResponse.id);\n}", }, }, }, { name: 'retrieve', endpoint: '/v5/rubrics/{rubric_id}', httpMethod: 'get', summary: 'Get Rubric', description: 'Get Rubric', stainlessPath: '(resource) rubrics > (method) retrieve', qualified: 'client.rubrics.retrieve', params: ['rubric_id: string;'], response: "{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; tags: string[]; title: string; version: number; archived_at?: string; criteria?: { id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; } | { title: string; weight?: number; }[]; object?: 'rubric'; updated_at?: string; }", markdown: "## retrieve\n\n`client.rubrics.retrieve(rubric_id: string): { id: string; created_at: string; created_by: identity; tags: string[]; title: string; version: number; archived_at?: string; criteria?: rubric_criteria_response | rubric_criteria_summary_response[]; object?: 'rubric'; updated_at?: string; }`\n\n**get** `/v5/rubrics/{rubric_id}`\n\nGet Rubric\n\n### Parameters\n\n- `rubric_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; tags: string[]; title: string; version: number; archived_at?: string; criteria?: { id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; } | { title: string; weight?: number; }[]; object?: 'rubric'; updated_at?: string; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `tags: string[]`\n - `title: string`\n - `version: number`\n - `archived_at?: string`\n - `criteria?: { id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; } | { title: string; weight?: number; }[]`\n - `object?: 'rubric'`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst rubricResponse = await client.rubrics.retrieve('rubric_id');\n\nconsole.log(rubricResponse);\n```", perLanguage: { go: { method: 'client.Rubrics.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\trubricResponse, err := client.Rubrics.Get(context.TODO(), "rubric_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", rubricResponse.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/rubrics/$RUBRIC_ID \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'rubrics.retrieve', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nrubric_response = client.rubrics.retrieve(\n "rubric_id",\n)\nprint(rubric_response.id)', }, typescript: { method: 'client.rubrics.retrieve', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst rubricResponse = await client.rubrics.retrieve('rubric_id');\n\nconsole.log(rubricResponse.id);", }, }, }, { name: 'update', endpoint: '/v5/rubrics/{rubric_id}', httpMethod: 'patch', summary: 'Update or Restore Rubric', description: 'Update or Restore Rubric', stainlessPath: '(resource) rubrics > (method) update', qualified: 'client.rubrics.update', params: ['rubric_id: string;', 'rubric: { tags?: string[]; title?: string; } | { restore: true; };'], response: "{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; tags: string[]; title: string; version: number; archived_at?: string; criteria?: { id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; } | { title: string; weight?: number; }[]; object?: 'rubric'; updated_at?: string; }", markdown: "## update\n\n`client.rubrics.update(rubric_id: string, rubric: { tags?: string[]; title?: string; } | { restore: true; }): { id: string; created_at: string; created_by: identity; tags: string[]; title: string; version: number; archived_at?: string; criteria?: rubric_criteria_response | rubric_criteria_summary_response[]; object?: 'rubric'; updated_at?: string; }`\n\n**patch** `/v5/rubrics/{rubric_id}`\n\nUpdate or Restore Rubric\n\n### Parameters\n\n- `rubric_id: string`\n\n- `rubric: { tags?: string[]; title?: string; } | { restore: true; }`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; tags: string[]; title: string; version: number; archived_at?: string; criteria?: { id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; } | { title: string; weight?: number; }[]; object?: 'rubric'; updated_at?: string; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `tags: string[]`\n - `title: string`\n - `version: number`\n - `archived_at?: string`\n - `criteria?: { id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; } | { title: string; weight?: number; }[]`\n - `object?: 'rubric'`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst rubricResponse = await client.rubrics.update('rubric_id', { rubric: {} });\n\nconsole.log(rubricResponse);\n```", perLanguage: { go: { method: 'client.Rubrics.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\trubricResponse, err := client.Rubrics.Update(\n\t\tcontext.TODO(),\n\t\t"rubric_id",\n\t\tsgpdev.RubricUpdateParams{\n\t\t\tOfPartialRubricRequestBase: &sgpdev.RubricUpdateParamsRubricPartialRubricRequestBase{},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", rubricResponse.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/rubrics/$RUBRIC_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "tags": [\n "string"\n ],\n "title": "x"\n }\'', }, python: { method: 'rubrics.update', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nrubric_response = client.rubrics.update(\n rubric_id="rubric_id",\n rubric={},\n)\nprint(rubric_response.id)', }, typescript: { method: 'client.rubrics.update', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst rubricResponse = await client.rubrics.update('rubric_id', { rubric: {} });\n\nconsole.log(rubricResponse.id);", }, }, }, { name: 'archive', endpoint: '/v5/rubrics/{rubric_id}', httpMethod: 'delete', summary: 'Archive Rubric', description: 'Archive Rubric', stainlessPath: '(resource) rubrics > (method) archive', qualified: 'client.rubrics.archive', params: ['rubric_id: string;'], response: "{ id: string; deleted: boolean; object?: 'rubric'; }", markdown: "## archive\n\n`client.rubrics.archive(rubric_id: string): { id: string; deleted: boolean; object?: 'rubric'; }`\n\n**delete** `/v5/rubrics/{rubric_id}`\n\nArchive Rubric\n\n### Parameters\n\n- `rubric_id: string`\n\n### Returns\n\n- `{ id: string; deleted: boolean; object?: 'rubric'; }`\n\n - `id: string`\n - `deleted: boolean`\n - `object?: 'rubric'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst response = await client.rubrics.archive('rubric_id');\n\nconsole.log(response);\n```", perLanguage: { go: { method: 'client.Rubrics.Archive', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tresponse, err := client.Rubrics.Archive(context.TODO(), "rubric_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/rubrics/$RUBRIC_ID \\\n -X DELETE \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'rubrics.archive', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.rubrics.archive(\n "rubric_id",\n)\nprint(response.id)', }, typescript: { method: 'client.rubrics.archive', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.rubrics.archive('rubric_id');\n\nconsole.log(response.id);", }, }, }, { name: 'create', endpoint: '/v5/rubrics/{rubric_id}/criteria', httpMethod: 'post', summary: 'Add Criterion to Rubric', description: 'Add Criterion to Rubric', stainlessPath: '(resource) rubrics.criteria > (method) create', qualified: 'client.rubrics.criteria.create', params: ['rubric_id: string;', 'title: string;', 'annotations?: object;', 'weight?: number;'], response: "{ id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; }", markdown: "## create\n\n`client.rubrics.criteria.create(rubric_id: string, title: string, annotations?: object, weight?: number): { id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; }`\n\n**post** `/v5/rubrics/{rubric_id}/criteria`\n\nAdd Criterion to Rubric\n\n### Parameters\n\n- `rubric_id: string`\n\n- `title: string`\n The Criteria text\n\n- `annotations?: object`\n Free-form metadata for the Criteria\n\n- `weight?: number`\n Weight multiplier for scoring\n\n### Returns\n\n- `{ id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; }`\n\n - `id: string`\n - `created_at: string`\n - `rubric_id: string`\n - `title: string`\n - `version: number`\n - `annotations?: object`\n - `object?: 'rubric_criteria'`\n - `weight?: number`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst rubricCriteriaResponse = await client.rubrics.criteria.create('rubric_id', { title: 'x' });\n\nconsole.log(rubricCriteriaResponse);\n```", perLanguage: { go: { method: 'client.Rubrics.Criteria.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\trubricCriteriaResponse, err := client.Rubrics.Criteria.New(\n\t\tcontext.TODO(),\n\t\t"rubric_id",\n\t\tsgpdev.RubricCriterionNewParams{\n\t\t\tRubricCriteriaInput: sgpdev.RubricCriteriaInputParam{\n\t\t\t\tTitle: "x",\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", rubricCriteriaResponse.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/rubrics/$RUBRIC_ID/criteria \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "title": "x"\n }\'', }, python: { method: 'rubrics.criteria.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nrubric_criteria_response = client.rubrics.criteria.create(\n rubric_id="rubric_id",\n title="x",\n)\nprint(rubric_criteria_response.id)', }, typescript: { method: 'client.rubrics.criteria.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst rubricCriteriaResponse = await client.rubrics.criteria.create('rubric_id', { title: 'x' });\n\nconsole.log(rubricCriteriaResponse.id);", }, }, }, { name: 'update', endpoint: '/v5/rubrics/{rubric_id}/criteria/{rubric_criteria_id}', httpMethod: 'patch', summary: 'Update Criterion', description: 'Update Criterion', stainlessPath: '(resource) rubrics.criteria > (method) update', qualified: 'client.rubrics.criteria.update', params: [ 'rubric_id: string;', 'rubric_criteria_id: string;', 'annotations?: object;', 'title?: string;', 'weight?: number;', ], response: "{ id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; }", markdown: "## update\n\n`client.rubrics.criteria.update(rubric_id: string, rubric_criteria_id: string, annotations?: object, title?: string, weight?: number): { id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; }`\n\n**patch** `/v5/rubrics/{rubric_id}/criteria/{rubric_criteria_id}`\n\nUpdate Criterion\n\n### Parameters\n\n- `rubric_id: string`\n\n- `rubric_criteria_id: string`\n\n- `annotations?: object`\n Free-form metadata for the Criteria\n\n- `title?: string`\n The Criteria text\n\n- `weight?: number`\n Weight multiplier for scoring\n\n### Returns\n\n- `{ id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; }`\n\n - `id: string`\n - `created_at: string`\n - `rubric_id: string`\n - `title: string`\n - `version: number`\n - `annotations?: object`\n - `object?: 'rubric_criteria'`\n - `weight?: number`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst rubricCriteriaResponse = await client.rubrics.criteria.update('rubric_criteria_id', { rubric_id: 'rubric_id' });\n\nconsole.log(rubricCriteriaResponse);\n```", perLanguage: { go: { method: 'client.Rubrics.Criteria.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\trubricCriteriaResponse, err := client.Rubrics.Criteria.Update(\n\t\tcontext.TODO(),\n\t\t"rubric_criteria_id",\n\t\tsgpdev.RubricCriterionUpdateParams{\n\t\t\tRubricID: "rubric_id",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", rubricCriteriaResponse.ID)\n}\n', }, http: { example: "curl https://api.egp.scale.com/v5/rubrics/$RUBRIC_ID/criteria/$RUBRIC_CRITERIA_ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"x-api-key: $SGP_API_KEY\" \\\n -d '{}'", }, python: { method: 'rubrics.criteria.update', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nrubric_criteria_response = client.rubrics.criteria.update(\n rubric_criteria_id="rubric_criteria_id",\n rubric_id="rubric_id",\n)\nprint(rubric_criteria_response.id)', }, typescript: { method: 'client.rubrics.criteria.update', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst rubricCriteriaResponse = await client.rubrics.criteria.update('rubric_criteria_id', {\n rubric_id: 'rubric_id',\n});\n\nconsole.log(rubricCriteriaResponse.id);", }, }, }, { name: 'list_versions', endpoint: '/v5/rubrics/{rubric_id}/criteria/{rubric_criteria_id}/versions', httpMethod: 'get', summary: 'List Criterion Versions', description: 'List Criterion Versions', stainlessPath: '(resource) rubrics.criteria > (method) list_versions', qualified: 'client.rubrics.criteria.listVersions', params: [ 'rubric_id: string;', 'rubric_criteria_id: string;', 'cursor?: string;', 'ending_before?: string;', 'limit?: number;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', ], response: "{ has_more: boolean; items: { id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; }[]; total: number; limit?: number; object?: 'list'; }", markdown: "## list_versions\n\n`client.rubrics.criteria.listVersions(rubric_id: string, rubric_criteria_id: string, cursor?: string, ending_before?: string, limit?: number, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string): { has_more: boolean; items: rubric_criteria_response[]; total: number; limit?: number; object?: 'list'; }`\n\n**get** `/v5/rubrics/{rubric_id}/criteria/{rubric_criteria_id}/versions`\n\nList Criterion Versions\n\n### Parameters\n\n- `rubric_id: string`\n\n- `rubric_criteria_id: string`\n\n- `cursor?: string`\n\n- `ending_before?: string`\n\n- `limit?: number`\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n### Returns\n\n- `{ has_more: boolean; items: { id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; }[]; total: number; limit?: number; object?: 'list'; }`\n\n - `has_more: boolean`\n - `items: { id: string; created_at: string; rubric_id: string; title: string; version: number; annotations?: object; object?: 'rubric_criteria'; weight?: number; }[]`\n - `total: number`\n - `limit?: number`\n - `object?: 'list'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst response = await client.rubrics.criteria.listVersions('rubric_criteria_id', { rubric_id: 'rubric_id' });\n\nconsole.log(response);\n```", perLanguage: { go: { method: 'client.Rubrics.Criteria.ListVersions', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tresponse, err := client.Rubrics.Criteria.ListVersions(\n\t\tcontext.TODO(),\n\t\t"rubric_criteria_id",\n\t\tsgpdev.RubricCriterionListVersionsParams{\n\t\t\tRubricID: "rubric_id",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.HasMore)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/rubrics/$RUBRIC_ID/criteria/$RUBRIC_CRITERIA_ID/versions \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'rubrics.criteria.list_versions', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.rubrics.criteria.list_versions(\n rubric_criteria_id="rubric_criteria_id",\n rubric_id="rubric_id",\n)\nprint(response.has_more)', }, typescript: { method: 'client.rubrics.criteria.listVersions', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.rubrics.criteria.listVersions('rubric_criteria_id', {\n rubric_id: 'rubric_id',\n});\n\nconsole.log(response.has_more);", }, }, }, { name: 'create', endpoint: '/v5/evaluation-groups', httpMethod: 'post', summary: 'Create Evaluation Group', description: 'Create a new evaluation group', stainlessPath: '(resource) evaluation_groups > (method) create', qualified: 'client.evaluationGroups.create', params: [ 'evaluation_ids: string[];', 'name: string;', 'description?: string;', 'metadata?: object;', 'row_identifiers?: object;', 'tags?: string[];', ], response: "{ id: string; account_id: string; created_at: string; name: string; tags: string[]; deleted_at?: string; description?: string; members?: { id: string; created_at: string; evaluation_group_id: string; evaluation_id: string; deleted_at?: string; evaluation_created_at?: string; evaluation_name?: string; evaluation_tags?: string[]; object?: 'evaluation_group.member'; }[]; metadata?: object; object?: 'evaluation_group'; row_identifiers?: { column_name: string; evaluation_id: string; object?: 'evaluation_group.row_identifier'; }[]; }", markdown: "## create\n\n`client.evaluationGroups.create(evaluation_ids: string[], name: string, description?: string, metadata?: object, row_identifiers?: object, tags?: string[]): { id: string; account_id: string; created_at: string; name: string; tags: string[]; deleted_at?: string; description?: string; members?: evaluation_group_member[]; metadata?: object; object?: 'evaluation_group'; row_identifiers?: evaluation_group_row_identifier[]; }`\n\n**post** `/v5/evaluation-groups`\n\nCreate a new evaluation group\n\n### Parameters\n\n- `evaluation_ids: string[]`\n List of evaluation IDs to include in the group\n\n- `name: string`\n Name of the evaluation group\n\n- `description?: string`\n Optional description\n\n- `metadata?: object`\n Optional metadata key-value pairs\n\n- `row_identifiers?: object`\n Optional mapping of evaluation_id to column name for cross-dataset joins\n\n- `tags?: string[]`\n The tags associated with the entity\n\n### Returns\n\n- `{ id: string; account_id: string; created_at: string; name: string; tags: string[]; deleted_at?: string; description?: string; members?: { id: string; created_at: string; evaluation_group_id: string; evaluation_id: string; deleted_at?: string; evaluation_created_at?: string; evaluation_name?: string; evaluation_tags?: string[]; object?: 'evaluation_group.member'; }[]; metadata?: object; object?: 'evaluation_group'; row_identifiers?: { column_name: string; evaluation_id: string; object?: 'evaluation_group.row_identifier'; }[]; }`\n Response model for evaluation group\n\n - `id: string`\n - `account_id: string`\n - `created_at: string`\n - `name: string`\n - `tags: string[]`\n - `deleted_at?: string`\n - `description?: string`\n - `members?: { id: string; created_at: string; evaluation_group_id: string; evaluation_id: string; deleted_at?: string; evaluation_created_at?: string; evaluation_name?: string; evaluation_tags?: string[]; object?: 'evaluation_group.member'; }[]`\n - `metadata?: object`\n - `object?: 'evaluation_group'`\n - `row_identifiers?: { column_name: string; evaluation_id: string; object?: 'evaluation_group.row_identifier'; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst evaluationGroup = await client.evaluationGroups.create({ evaluation_ids: ['string'], name: 'name' });\n\nconsole.log(evaluationGroup);\n```", perLanguage: { go: { method: 'client.EvaluationGroups.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tevaluationGroup, err := client.EvaluationGroups.New(context.TODO(), sgpdev.EvaluationGroupNewParams{\n\t\tEvaluationIDs: []string{"string"},\n\t\tName: "name",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", evaluationGroup.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluation-groups \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "evaluation_ids": [\n "string"\n ],\n "name": "name",\n "metadata": {\n "project": "bar",\n "team": "bar"\n },\n "row_identifiers": {\n "eval-123": "user_id",\n "eval-456": "customer_id"\n }\n }\'', }, python: { method: 'evaluation_groups.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nevaluation_group = client.evaluation_groups.create(\n evaluation_ids=["string"],\n name="name",\n)\nprint(evaluation_group.id)', }, typescript: { method: 'client.evaluationGroups.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst evaluationGroup = await client.evaluationGroups.create({\n evaluation_ids: ['string'],\n name: 'name',\n});\n\nconsole.log(evaluationGroup.id);", }, }, }, { name: 'list', endpoint: '/v5/evaluation-groups', httpMethod: 'get', summary: 'List Evaluation Groups', description: 'List all evaluation groups for the current account', stainlessPath: '(resource) evaluation_groups > (method) list', qualified: 'client.evaluationGroups.list', params: [ 'cursor?: string;', 'ending_before?: string;', 'evaluation_id?: string;', 'include_deleted?: boolean;', 'limit?: number;', 'name?: string;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', 'tags?: string[];', "views?: 'members' | 'row_identifiers'[];", ], response: "{ id: string; account_id: string; created_at: string; name: string; tags: string[]; deleted_at?: string; description?: string; members?: { id: string; created_at: string; evaluation_group_id: string; evaluation_id: string; deleted_at?: string; evaluation_created_at?: string; evaluation_name?: string; evaluation_tags?: string[]; object?: 'evaluation_group.member'; }[]; metadata?: object; object?: 'evaluation_group'; row_identifiers?: { column_name: string; evaluation_id: string; object?: 'evaluation_group.row_identifier'; }[]; }", markdown: "## list\n\n`client.evaluationGroups.list(cursor?: string, ending_before?: string, evaluation_id?: string, include_deleted?: boolean, limit?: number, name?: string, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string, tags?: string[], views?: 'members' | 'row_identifiers'[]): { id: string; account_id: string; created_at: string; name: string; tags: string[]; deleted_at?: string; description?: string; members?: evaluation_group_member[]; metadata?: object; object?: 'evaluation_group'; row_identifiers?: evaluation_group_row_identifier[]; }`\n\n**get** `/v5/evaluation-groups`\n\nList all evaluation groups for the current account\n\n### Parameters\n\n- `cursor?: string`\n\n- `ending_before?: string`\n\n- `evaluation_id?: string`\n Filter to groups containing this evaluation ID\n\n- `include_deleted?: boolean`\n\n- `limit?: number`\n\n- `name?: string`\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n- `tags?: string[]`\n\n- `views?: 'members' | 'row_identifiers'[]`\n Optional relationships to include: 'members', 'row_identifiers'\n\n### Returns\n\n- `{ id: string; account_id: string; created_at: string; name: string; tags: string[]; deleted_at?: string; description?: string; members?: { id: string; created_at: string; evaluation_group_id: string; evaluation_id: string; deleted_at?: string; evaluation_created_at?: string; evaluation_name?: string; evaluation_tags?: string[]; object?: 'evaluation_group.member'; }[]; metadata?: object; object?: 'evaluation_group'; row_identifiers?: { column_name: string; evaluation_id: string; object?: 'evaluation_group.row_identifier'; }[]; }`\n Response model for evaluation group\n\n - `id: string`\n - `account_id: string`\n - `created_at: string`\n - `name: string`\n - `tags: string[]`\n - `deleted_at?: string`\n - `description?: string`\n - `members?: { id: string; created_at: string; evaluation_group_id: string; evaluation_id: string; deleted_at?: string; evaluation_created_at?: string; evaluation_name?: string; evaluation_tags?: string[]; object?: 'evaluation_group.member'; }[]`\n - `metadata?: object`\n - `object?: 'evaluation_group'`\n - `row_identifiers?: { column_name: string; evaluation_id: string; object?: 'evaluation_group.row_identifier'; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\n// Automatically fetches more pages as needed.\nfor await (const evaluationGroup of client.evaluationGroups.list()) {\n console.log(evaluationGroup);\n}\n```", perLanguage: { go: { method: 'client.EvaluationGroups.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tpage, err := client.EvaluationGroups.List(context.TODO(), sgpdev.EvaluationGroupListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluation-groups \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'evaluation_groups.list', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\npage = client.evaluation_groups.list()\npage = page.items[0]\nprint(page.id)', }, typescript: { method: 'client.evaluationGroups.list', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const evaluationGroup of client.evaluationGroups.list()) {\n console.log(evaluationGroup.id);\n}", }, }, }, { name: 'retrieve', endpoint: '/v5/evaluation-groups/{group_id}', httpMethod: 'get', summary: 'Get Evaluation Group', description: 'Get a single evaluation group by ID', stainlessPath: '(resource) evaluation_groups > (method) retrieve', qualified: 'client.evaluationGroups.retrieve', params: ['group_id: string;', 'include_deleted?: boolean;', "views?: 'members' | 'row_identifiers'[];"], response: "{ id: string; account_id: string; created_at: string; name: string; tags: string[]; deleted_at?: string; description?: string; members?: { id: string; created_at: string; evaluation_group_id: string; evaluation_id: string; deleted_at?: string; evaluation_created_at?: string; evaluation_name?: string; evaluation_tags?: string[]; object?: 'evaluation_group.member'; }[]; metadata?: object; object?: 'evaluation_group'; row_identifiers?: { column_name: string; evaluation_id: string; object?: 'evaluation_group.row_identifier'; }[]; }", markdown: "## retrieve\n\n`client.evaluationGroups.retrieve(group_id: string, include_deleted?: boolean, views?: 'members' | 'row_identifiers'[]): { id: string; account_id: string; created_at: string; name: string; tags: string[]; deleted_at?: string; description?: string; members?: evaluation_group_member[]; metadata?: object; object?: 'evaluation_group'; row_identifiers?: evaluation_group_row_identifier[]; }`\n\n**get** `/v5/evaluation-groups/{group_id}`\n\nGet a single evaluation group by ID\n\n### Parameters\n\n- `group_id: string`\n\n- `include_deleted?: boolean`\n\n- `views?: 'members' | 'row_identifiers'[]`\n Optional relationships to include: 'members', 'row_identifiers'\n\n### Returns\n\n- `{ id: string; account_id: string; created_at: string; name: string; tags: string[]; deleted_at?: string; description?: string; members?: { id: string; created_at: string; evaluation_group_id: string; evaluation_id: string; deleted_at?: string; evaluation_created_at?: string; evaluation_name?: string; evaluation_tags?: string[]; object?: 'evaluation_group.member'; }[]; metadata?: object; object?: 'evaluation_group'; row_identifiers?: { column_name: string; evaluation_id: string; object?: 'evaluation_group.row_identifier'; }[]; }`\n Response model for evaluation group\n\n - `id: string`\n - `account_id: string`\n - `created_at: string`\n - `name: string`\n - `tags: string[]`\n - `deleted_at?: string`\n - `description?: string`\n - `members?: { id: string; created_at: string; evaluation_group_id: string; evaluation_id: string; deleted_at?: string; evaluation_created_at?: string; evaluation_name?: string; evaluation_tags?: string[]; object?: 'evaluation_group.member'; }[]`\n - `metadata?: object`\n - `object?: 'evaluation_group'`\n - `row_identifiers?: { column_name: string; evaluation_id: string; object?: 'evaluation_group.row_identifier'; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst evaluationGroup = await client.evaluationGroups.retrieve('group_id');\n\nconsole.log(evaluationGroup);\n```", perLanguage: { go: { method: 'client.EvaluationGroups.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tevaluationGroup, err := client.EvaluationGroups.Get(\n\t\tcontext.TODO(),\n\t\t"group_id",\n\t\tsgpdev.EvaluationGroupGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", evaluationGroup.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluation-groups/$GROUP_ID \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'evaluation_groups.retrieve', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nevaluation_group = client.evaluation_groups.retrieve(\n group_id="group_id",\n)\nprint(evaluation_group.id)', }, typescript: { method: 'client.evaluationGroups.retrieve', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst evaluationGroup = await client.evaluationGroups.retrieve('group_id');\n\nconsole.log(evaluationGroup.id);", }, }, }, { name: 'update', endpoint: '/v5/evaluation-groups/{group_id}', httpMethod: 'patch', summary: 'Patch Evaluation Group', description: 'Partial update of evaluation group attributes (name, description, tags, metadata). Members cannot be modified via PATCH.', stainlessPath: '(resource) evaluation_groups > (method) update', qualified: 'client.evaluationGroups.update', params: [ 'group_id: string;', 'description?: string;', 'metadata?: object;', 'name?: string;', 'row_identifiers?: object;', 'tags?: string[];', ], response: "{ id: string; account_id: string; created_at: string; name: string; tags: string[]; deleted_at?: string; description?: string; members?: { id: string; created_at: string; evaluation_group_id: string; evaluation_id: string; deleted_at?: string; evaluation_created_at?: string; evaluation_name?: string; evaluation_tags?: string[]; object?: 'evaluation_group.member'; }[]; metadata?: object; object?: 'evaluation_group'; row_identifiers?: { column_name: string; evaluation_id: string; object?: 'evaluation_group.row_identifier'; }[]; }", markdown: "## update\n\n`client.evaluationGroups.update(group_id: string, description?: string, metadata?: object, name?: string, row_identifiers?: object, tags?: string[]): { id: string; account_id: string; created_at: string; name: string; tags: string[]; deleted_at?: string; description?: string; members?: evaluation_group_member[]; metadata?: object; object?: 'evaluation_group'; row_identifiers?: evaluation_group_row_identifier[]; }`\n\n**patch** `/v5/evaluation-groups/{group_id}`\n\nPartial update of evaluation group attributes (name, description, tags, metadata). Members cannot be modified via PATCH.\n\n### Parameters\n\n- `group_id: string`\n\n- `description?: string`\n Optional description\n\n- `metadata?: object`\n Optional metadata key-value pairs\n\n- `name?: string`\n Name of the evaluation group\n\n- `row_identifiers?: object`\n Optional mapping of evaluation_id to column name for cross-dataset joins\n\n- `tags?: string[]`\n The tags associated with the entity\n\n### Returns\n\n- `{ id: string; account_id: string; created_at: string; name: string; tags: string[]; deleted_at?: string; description?: string; members?: { id: string; created_at: string; evaluation_group_id: string; evaluation_id: string; deleted_at?: string; evaluation_created_at?: string; evaluation_name?: string; evaluation_tags?: string[]; object?: 'evaluation_group.member'; }[]; metadata?: object; object?: 'evaluation_group'; row_identifiers?: { column_name: string; evaluation_id: string; object?: 'evaluation_group.row_identifier'; }[]; }`\n Response model for evaluation group\n\n - `id: string`\n - `account_id: string`\n - `created_at: string`\n - `name: string`\n - `tags: string[]`\n - `deleted_at?: string`\n - `description?: string`\n - `members?: { id: string; created_at: string; evaluation_group_id: string; evaluation_id: string; deleted_at?: string; evaluation_created_at?: string; evaluation_name?: string; evaluation_tags?: string[]; object?: 'evaluation_group.member'; }[]`\n - `metadata?: object`\n - `object?: 'evaluation_group'`\n - `row_identifiers?: { column_name: string; evaluation_id: string; object?: 'evaluation_group.row_identifier'; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst evaluationGroup = await client.evaluationGroups.update('group_id');\n\nconsole.log(evaluationGroup);\n```", perLanguage: { go: { method: 'client.EvaluationGroups.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tevaluationGroup, err := client.EvaluationGroups.Update(\n\t\tcontext.TODO(),\n\t\t"group_id",\n\t\tsgpdev.EvaluationGroupUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", evaluationGroup.ID)\n}\n', }, http: { example: "curl https://api.egp.scale.com/v5/evaluation-groups/$GROUP_ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"x-api-key: $SGP_API_KEY\" \\\n -d '{}'", }, python: { method: 'evaluation_groups.update', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nevaluation_group = client.evaluation_groups.update(\n group_id="group_id",\n)\nprint(evaluation_group.id)', }, typescript: { method: 'client.evaluationGroups.update', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst evaluationGroup = await client.evaluationGroups.update('group_id');\n\nconsole.log(evaluationGroup.id);", }, }, }, { name: 'replace', endpoint: '/v5/evaluation-groups/{group_id}', httpMethod: 'put', summary: 'Update Evaluation Group', description: 'Full update of evaluation group. All fields are replaced with provided values. Omitted optional fields are cleared.', stainlessPath: '(resource) evaluation_groups > (method) replace', qualified: 'client.evaluationGroups.replace', params: [ 'group_id: string;', 'description?: string;', 'evaluation_ids?: string[];', 'metadata?: object;', 'name?: string;', 'row_identifiers?: object;', 'tags?: string[];', ], response: "{ id: string; account_id: string; created_at: string; name: string; tags: string[]; deleted_at?: string; description?: string; members?: { id: string; created_at: string; evaluation_group_id: string; evaluation_id: string; deleted_at?: string; evaluation_created_at?: string; evaluation_name?: string; evaluation_tags?: string[]; object?: 'evaluation_group.member'; }[]; metadata?: object; object?: 'evaluation_group'; row_identifiers?: { column_name: string; evaluation_id: string; object?: 'evaluation_group.row_identifier'; }[]; }", markdown: "## replace\n\n`client.evaluationGroups.replace(group_id: string, description?: string, evaluation_ids?: string[], metadata?: object, name?: string, row_identifiers?: object, tags?: string[]): { id: string; account_id: string; created_at: string; name: string; tags: string[]; deleted_at?: string; description?: string; members?: evaluation_group_member[]; metadata?: object; object?: 'evaluation_group'; row_identifiers?: evaluation_group_row_identifier[]; }`\n\n**put** `/v5/evaluation-groups/{group_id}`\n\nFull update of evaluation group. All fields are replaced with provided values. Omitted optional fields are cleared.\n\n### Parameters\n\n- `group_id: string`\n\n- `description?: string`\n Optional description\n\n- `evaluation_ids?: string[]`\n Complete list of evaluation IDs to include in group (replaces existing members)\n\n- `metadata?: object`\n Optional metadata key-value pairs\n\n- `name?: string`\n Name of the evaluation group\n\n- `row_identifiers?: object`\n Optional mapping of evaluation_id to column name for cross-dataset joins\n\n- `tags?: string[]`\n The tags associated with the entity\n\n### Returns\n\n- `{ id: string; account_id: string; created_at: string; name: string; tags: string[]; deleted_at?: string; description?: string; members?: { id: string; created_at: string; evaluation_group_id: string; evaluation_id: string; deleted_at?: string; evaluation_created_at?: string; evaluation_name?: string; evaluation_tags?: string[]; object?: 'evaluation_group.member'; }[]; metadata?: object; object?: 'evaluation_group'; row_identifiers?: { column_name: string; evaluation_id: string; object?: 'evaluation_group.row_identifier'; }[]; }`\n Response model for evaluation group\n\n - `id: string`\n - `account_id: string`\n - `created_at: string`\n - `name: string`\n - `tags: string[]`\n - `deleted_at?: string`\n - `description?: string`\n - `members?: { id: string; created_at: string; evaluation_group_id: string; evaluation_id: string; deleted_at?: string; evaluation_created_at?: string; evaluation_name?: string; evaluation_tags?: string[]; object?: 'evaluation_group.member'; }[]`\n - `metadata?: object`\n - `object?: 'evaluation_group'`\n - `row_identifiers?: { column_name: string; evaluation_id: string; object?: 'evaluation_group.row_identifier'; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst evaluationGroup = await client.evaluationGroups.replace('group_id');\n\nconsole.log(evaluationGroup);\n```", perLanguage: { go: { method: 'client.EvaluationGroups.Replace', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tevaluationGroup, err := client.EvaluationGroups.Replace(\n\t\tcontext.TODO(),\n\t\t"group_id",\n\t\tsgpdev.EvaluationGroupReplaceParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", evaluationGroup.ID)\n}\n', }, http: { example: "curl https://api.egp.scale.com/v5/evaluation-groups/$GROUP_ID \\\n -X PUT \\\n -H 'Content-Type: application/json' \\\n -H \"x-api-key: $SGP_API_KEY\" \\\n -d '{}'", }, python: { method: 'evaluation_groups.replace', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nevaluation_group = client.evaluation_groups.replace(\n group_id="group_id",\n)\nprint(evaluation_group.id)', }, typescript: { method: 'client.evaluationGroups.replace', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst evaluationGroup = await client.evaluationGroups.replace('group_id');\n\nconsole.log(evaluationGroup.id);", }, }, }, { name: 'archive', endpoint: '/v5/evaluation-groups/{group_id}', httpMethod: 'delete', summary: 'Archive Evaluation Group', description: 'Soft-delete an evaluation group and cascade to members, row identifiers, and charts', stainlessPath: '(resource) evaluation_groups > (method) archive', qualified: 'client.evaluationGroups.archive', params: ['group_id: string;'], response: "{ id: string; account_id: string; created_at: string; name: string; tags: string[]; deleted_at?: string; description?: string; members?: { id: string; created_at: string; evaluation_group_id: string; evaluation_id: string; deleted_at?: string; evaluation_created_at?: string; evaluation_name?: string; evaluation_tags?: string[]; object?: 'evaluation_group.member'; }[]; metadata?: object; object?: 'evaluation_group'; row_identifiers?: { column_name: string; evaluation_id: string; object?: 'evaluation_group.row_identifier'; }[]; }", markdown: "## archive\n\n`client.evaluationGroups.archive(group_id: string): { id: string; account_id: string; created_at: string; name: string; tags: string[]; deleted_at?: string; description?: string; members?: evaluation_group_member[]; metadata?: object; object?: 'evaluation_group'; row_identifiers?: evaluation_group_row_identifier[]; }`\n\n**delete** `/v5/evaluation-groups/{group_id}`\n\nSoft-delete an evaluation group and cascade to members, row identifiers, and charts\n\n### Parameters\n\n- `group_id: string`\n\n### Returns\n\n- `{ id: string; account_id: string; created_at: string; name: string; tags: string[]; deleted_at?: string; description?: string; members?: { id: string; created_at: string; evaluation_group_id: string; evaluation_id: string; deleted_at?: string; evaluation_created_at?: string; evaluation_name?: string; evaluation_tags?: string[]; object?: 'evaluation_group.member'; }[]; metadata?: object; object?: 'evaluation_group'; row_identifiers?: { column_name: string; evaluation_id: string; object?: 'evaluation_group.row_identifier'; }[]; }`\n Response model for evaluation group\n\n - `id: string`\n - `account_id: string`\n - `created_at: string`\n - `name: string`\n - `tags: string[]`\n - `deleted_at?: string`\n - `description?: string`\n - `members?: { id: string; created_at: string; evaluation_group_id: string; evaluation_id: string; deleted_at?: string; evaluation_created_at?: string; evaluation_name?: string; evaluation_tags?: string[]; object?: 'evaluation_group.member'; }[]`\n - `metadata?: object`\n - `object?: 'evaluation_group'`\n - `row_identifiers?: { column_name: string; evaluation_id: string; object?: 'evaluation_group.row_identifier'; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst evaluationGroup = await client.evaluationGroups.archive('group_id');\n\nconsole.log(evaluationGroup);\n```", perLanguage: { go: { method: 'client.EvaluationGroups.Archive', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tevaluationGroup, err := client.EvaluationGroups.Archive(context.TODO(), "group_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", evaluationGroup.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluation-groups/$GROUP_ID \\\n -X DELETE \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'evaluation_groups.archive', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nevaluation_group = client.evaluation_groups.archive(\n "group_id",\n)\nprint(evaluation_group.id)', }, typescript: { method: 'client.evaluationGroups.archive', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst evaluationGroup = await client.evaluationGroups.archive('group_id');\n\nconsole.log(evaluationGroup.id);", }, }, }, { name: 'retrieve_schema', endpoint: '/v5/evaluation-groups/{group_id}/schema', httpMethod: 'get', summary: 'Get Evaluation Group Schema', description: 'Get per-evaluation schemas for all members of a group. Returns individual schema for each member evaluation, enabling the frontend to filter columns by selected eval subset.', stainlessPath: '(resource) evaluation_groups > (method) retrieve_schema', qualified: 'client.evaluationGroups.retrieveSchema', params: ['group_id: string;', 'include_archived?: boolean;'], response: "{ evaluation_group_id: string; evaluation_schemas: { evaluation_id: string; fields: object[]; total_items: number; is_sampled?: boolean; object?: 'evaluation_schema'; sample_size?: number; }[]; object?: 'evaluation_group_schema'; }", markdown: "## retrieve_schema\n\n`client.evaluationGroups.retrieveSchema(group_id: string, include_archived?: boolean): { evaluation_group_id: string; evaluation_schemas: evaluation_schema_response[]; object?: 'evaluation_group_schema'; }`\n\n**get** `/v5/evaluation-groups/{group_id}/schema`\n\nGet per-evaluation schemas for all members of a group. Returns individual schema for each member evaluation, enabling the frontend to filter columns by selected eval subset.\n\n### Parameters\n\n- `group_id: string`\n\n- `include_archived?: boolean`\n Include archived items in schema analysis\n\n### Returns\n\n- `{ evaluation_group_id: string; evaluation_schemas: { evaluation_id: string; fields: object[]; total_items: number; is_sampled?: boolean; object?: 'evaluation_schema'; sample_size?: number; }[]; object?: 'evaluation_group_schema'; }`\n Per-evaluation schemas for all members of an evaluation group\n\n - `evaluation_group_id: string`\n - `evaluation_schemas: { evaluation_id: string; fields: { data_type: string; field_name: string; item_count: number; source: 'data' | 'task_result_cache'; object?: 'field_schema'; }[]; total_items: number; is_sampled?: boolean; object?: 'evaluation_schema'; sample_size?: number; }[]`\n - `object?: 'evaluation_group_schema'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst response = await client.evaluationGroups.retrieveSchema('group_id');\n\nconsole.log(response);\n```", perLanguage: { go: { method: 'client.EvaluationGroups.GetSchema', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tresponse, err := client.EvaluationGroups.GetSchema(\n\t\tcontext.TODO(),\n\t\t"group_id",\n\t\tsgpdev.EvaluationGroupGetSchemaParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.EvaluationGroupID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluation-groups/$GROUP_ID/schema \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'evaluation_groups.retrieve_schema', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.evaluation_groups.retrieve_schema(\n group_id="group_id",\n)\nprint(response.evaluation_group_id)', }, typescript: { method: 'client.evaluationGroups.retrieveSchema', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.evaluationGroups.retrieveSchema('group_id');\n\nconsole.log(response.evaluation_group_id);", }, }, }, { name: 'create', endpoint: '/v5/evaluation-dashboards', httpMethod: 'post', summary: 'Create Evaluation Dashboard', description: 'Create a new evaluation dashboard for an evaluation or evaluation group', stainlessPath: '(resource) evaluation_dashboards > (method) create', qualified: 'client.evaluationDashboards.create', params: [ 'name: string;', 'description?: string;', 'evaluation_group_id?: string;', 'evaluation_id?: string;', 'tags?: string[];', 'template_dashboard_id?: string;', 'widget_order?: string[];', ], response: "{ id: string; account_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; name: string; tags: string[]; updated_at: string; archived_at?: string; description?: string; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard'; widget_order?: string[]; widget_results?: { id: string; account_id: string; computation_status: 'pending' | 'completed' | 'failed'; created_at: string; widget_id: string; computation_job_id?: string; computed_at?: string; computed_result?: object; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard_widget_result'; widget?: evaluation_dashboard_widget; }[]; widgets?: { id: string; account_id: string; created_at: string; title: string; type: evaluation_widget_type_enum; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: series_query | metric_query; }[]; }", markdown: "## create\n\n`client.evaluationDashboards.create(name: string, description?: string, evaluation_group_id?: string, evaluation_id?: string, tags?: string[], template_dashboard_id?: string, widget_order?: string[]): { id: string; account_id: string; created_at: string; created_by: identity; name: string; tags: string[]; updated_at: string; archived_at?: string; description?: string; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard'; widget_order?: string[]; widget_results?: evaluation_dashboard_widget_result[]; widgets?: evaluation_dashboard_widget[]; }`\n\n**post** `/v5/evaluation-dashboards`\n\nCreate a new evaluation dashboard for an evaluation or evaluation group\n\n### Parameters\n\n- `name: string`\n Dashboard name\n\n- `description?: string`\n Optional description of the dashboard\n\n- `evaluation_group_id?: string`\n Evaluation group ID (XOR with evaluation_id)\n\n- `evaluation_id?: string`\n Evaluation ID (XOR with evaluation_group_id)\n\n- `tags?: string[]`\n The tags associated with the entity\n\n- `template_dashboard_id?: string`\n Optional dashboard ID to use as template. Copies widget_order from template.\n\n- `widget_order?: string[]`\n Ordered array of widget IDs to display on this dashboard\n\n### Returns\n\n- `{ id: string; account_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; name: string; tags: string[]; updated_at: string; archived_at?: string; description?: string; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard'; widget_order?: string[]; widget_results?: { id: string; account_id: string; computation_status: 'pending' | 'completed' | 'failed'; created_at: string; widget_id: string; computation_job_id?: string; computed_at?: string; computed_result?: object; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard_widget_result'; widget?: evaluation_dashboard_widget; }[]; widgets?: { id: string; account_id: string; created_at: string; title: string; type: evaluation_widget_type_enum; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: series_query | metric_query; }[]; }`\n\n - `id: string`\n - `account_id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `name: string`\n - `tags: string[]`\n - `updated_at: string`\n - `archived_at?: string`\n - `description?: string`\n - `error_message?: string`\n - `evaluation_group_id?: string`\n - `evaluation_id?: string`\n - `object?: 'evaluation_dashboard'`\n - `widget_order?: string[]`\n - `widget_results?: { id: string; account_id: string; computation_status: 'pending' | 'completed' | 'failed'; created_at: string; widget_id: string; computation_job_id?: string; computed_at?: string; computed_result?: object; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard_widget_result'; widget?: { id: string; account_id: string; created_at: string; title: string; type: evaluation_widget_type_enum; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: series_query | metric_query; }; }[]`\n - `widgets?: { id: string; account_id: string; created_at: string; title: string; type: string; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: { select: select_item[]; evaluation_ids?: string[]; filter?: filter; groupBy?: string[]; limit?: number; orderBy?: object[]; } | { select: select_item[]; evaluation_ids?: string[]; filter?: filter; }; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst evaluationDashboard = await client.evaluationDashboards.create({ name: 'x' });\n\nconsole.log(evaluationDashboard);\n```", perLanguage: { go: { method: 'client.EvaluationDashboards.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tevaluationDashboard, err := client.EvaluationDashboards.New(context.TODO(), sgpdev.EvaluationDashboardNewParams{\n\t\tName: "x",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", evaluationDashboard.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluation-dashboards \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "name": "x"\n }\'', }, python: { method: 'evaluation_dashboards.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nevaluation_dashboard = client.evaluation_dashboards.create(\n name="x",\n)\nprint(evaluation_dashboard.id)', }, typescript: { method: 'client.evaluationDashboards.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst evaluationDashboard = await client.evaluationDashboards.create({ name: 'x' });\n\nconsole.log(evaluationDashboard.id);", }, }, }, { name: 'list', endpoint: '/v5/evaluation-dashboards', httpMethod: 'get', summary: 'List Evaluation Dashboards', description: 'List dashboards filtered by evaluation_id, evaluation_group_id, tags, creators, or search', stainlessPath: '(resource) evaluation_dashboards > (method) list', qualified: 'client.evaluationDashboards.list', params: [ 'created_by_ids?: string[];', 'cursor?: string;', 'ending_before?: string;', 'evaluation_group_id?: string;', 'evaluation_id?: string;', 'include_archived?: boolean;', 'limit?: number;', 'search?: string;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', 'tags?: string[];', ], response: "{ id: string; account_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; name: string; tags: string[]; updated_at: string; archived_at?: string; description?: string; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard'; widget_order?: string[]; widget_results?: { id: string; account_id: string; computation_status: 'pending' | 'completed' | 'failed'; created_at: string; widget_id: string; computation_job_id?: string; computed_at?: string; computed_result?: object; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard_widget_result'; widget?: evaluation_dashboard_widget; }[]; widgets?: { id: string; account_id: string; created_at: string; title: string; type: evaluation_widget_type_enum; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: series_query | metric_query; }[]; }", markdown: "## list\n\n`client.evaluationDashboards.list(created_by_ids?: string[], cursor?: string, ending_before?: string, evaluation_group_id?: string, evaluation_id?: string, include_archived?: boolean, limit?: number, search?: string, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string, tags?: string[]): { id: string; account_id: string; created_at: string; created_by: identity; name: string; tags: string[]; updated_at: string; archived_at?: string; description?: string; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard'; widget_order?: string[]; widget_results?: evaluation_dashboard_widget_result[]; widgets?: evaluation_dashboard_widget[]; }`\n\n**get** `/v5/evaluation-dashboards`\n\nList dashboards filtered by evaluation_id, evaluation_group_id, tags, creators, or search\n\n### Parameters\n\n- `created_by_ids?: string[]`\n Filter by creator user IDs\n\n- `cursor?: string`\n\n- `ending_before?: string`\n\n- `evaluation_group_id?: string`\n\n- `evaluation_id?: string`\n\n- `include_archived?: boolean`\n\n- `limit?: number`\n\n- `search?: string`\n Search in name and tags\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n- `tags?: string[]`\n Filter by tags (case-insensitive)\n\n### Returns\n\n- `{ id: string; account_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; name: string; tags: string[]; updated_at: string; archived_at?: string; description?: string; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard'; widget_order?: string[]; widget_results?: { id: string; account_id: string; computation_status: 'pending' | 'completed' | 'failed'; created_at: string; widget_id: string; computation_job_id?: string; computed_at?: string; computed_result?: object; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard_widget_result'; widget?: evaluation_dashboard_widget; }[]; widgets?: { id: string; account_id: string; created_at: string; title: string; type: evaluation_widget_type_enum; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: series_query | metric_query; }[]; }`\n\n - `id: string`\n - `account_id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `name: string`\n - `tags: string[]`\n - `updated_at: string`\n - `archived_at?: string`\n - `description?: string`\n - `error_message?: string`\n - `evaluation_group_id?: string`\n - `evaluation_id?: string`\n - `object?: 'evaluation_dashboard'`\n - `widget_order?: string[]`\n - `widget_results?: { id: string; account_id: string; computation_status: 'pending' | 'completed' | 'failed'; created_at: string; widget_id: string; computation_job_id?: string; computed_at?: string; computed_result?: object; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard_widget_result'; widget?: { id: string; account_id: string; created_at: string; title: string; type: evaluation_widget_type_enum; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: series_query | metric_query; }; }[]`\n - `widgets?: { id: string; account_id: string; created_at: string; title: string; type: string; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: { select: select_item[]; evaluation_ids?: string[]; filter?: filter; groupBy?: string[]; limit?: number; orderBy?: object[]; } | { select: select_item[]; evaluation_ids?: string[]; filter?: filter; }; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\n// Automatically fetches more pages as needed.\nfor await (const evaluationDashboard of client.evaluationDashboards.list()) {\n console.log(evaluationDashboard);\n}\n```", perLanguage: { go: { method: 'client.EvaluationDashboards.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tpage, err := client.EvaluationDashboards.List(context.TODO(), sgpdev.EvaluationDashboardListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluation-dashboards \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'evaluation_dashboards.list', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\npage = client.evaluation_dashboards.list()\npage = page.items[0]\nprint(page.id)', }, typescript: { method: 'client.evaluationDashboards.list', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const evaluationDashboard of client.evaluationDashboards.list()) {\n console.log(evaluationDashboard.id);\n}", }, }, }, { name: 'retrieve', endpoint: '/v5/evaluation-dashboards/{dashboard_id}', httpMethod: 'get', summary: 'Get Evaluation Dashboard', description: 'Get a single evaluation dashboard by ID', stainlessPath: '(resource) evaluation_dashboards > (method) retrieve', qualified: 'client.evaluationDashboards.retrieve', params: [ 'dashboard_id: string;', 'include_archived?: boolean;', "views?: 'widgets' | 'widget_results'[];", ], response: "{ id: string; account_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; name: string; tags: string[]; updated_at: string; archived_at?: string; description?: string; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard'; widget_order?: string[]; widget_results?: { id: string; account_id: string; computation_status: 'pending' | 'completed' | 'failed'; created_at: string; widget_id: string; computation_job_id?: string; computed_at?: string; computed_result?: object; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard_widget_result'; widget?: evaluation_dashboard_widget; }[]; widgets?: { id: string; account_id: string; created_at: string; title: string; type: evaluation_widget_type_enum; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: series_query | metric_query; }[]; }", markdown: "## retrieve\n\n`client.evaluationDashboards.retrieve(dashboard_id: string, include_archived?: boolean, views?: 'widgets' | 'widget_results'[]): { id: string; account_id: string; created_at: string; created_by: identity; name: string; tags: string[]; updated_at: string; archived_at?: string; description?: string; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard'; widget_order?: string[]; widget_results?: evaluation_dashboard_widget_result[]; widgets?: evaluation_dashboard_widget[]; }`\n\n**get** `/v5/evaluation-dashboards/{dashboard_id}`\n\nGet a single evaluation dashboard by ID\n\n### Parameters\n\n- `dashboard_id: string`\n\n- `include_archived?: boolean`\n\n- `views?: 'widgets' | 'widget_results'[]`\n Optional relationships to include: 'widgets', 'widget_results'\n\n### Returns\n\n- `{ id: string; account_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; name: string; tags: string[]; updated_at: string; archived_at?: string; description?: string; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard'; widget_order?: string[]; widget_results?: { id: string; account_id: string; computation_status: 'pending' | 'completed' | 'failed'; created_at: string; widget_id: string; computation_job_id?: string; computed_at?: string; computed_result?: object; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard_widget_result'; widget?: evaluation_dashboard_widget; }[]; widgets?: { id: string; account_id: string; created_at: string; title: string; type: evaluation_widget_type_enum; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: series_query | metric_query; }[]; }`\n\n - `id: string`\n - `account_id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `name: string`\n - `tags: string[]`\n - `updated_at: string`\n - `archived_at?: string`\n - `description?: string`\n - `error_message?: string`\n - `evaluation_group_id?: string`\n - `evaluation_id?: string`\n - `object?: 'evaluation_dashboard'`\n - `widget_order?: string[]`\n - `widget_results?: { id: string; account_id: string; computation_status: 'pending' | 'completed' | 'failed'; created_at: string; widget_id: string; computation_job_id?: string; computed_at?: string; computed_result?: object; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard_widget_result'; widget?: { id: string; account_id: string; created_at: string; title: string; type: evaluation_widget_type_enum; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: series_query | metric_query; }; }[]`\n - `widgets?: { id: string; account_id: string; created_at: string; title: string; type: string; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: { select: select_item[]; evaluation_ids?: string[]; filter?: filter; groupBy?: string[]; limit?: number; orderBy?: object[]; } | { select: select_item[]; evaluation_ids?: string[]; filter?: filter; }; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst evaluationDashboard = await client.evaluationDashboards.retrieve('dashboard_id');\n\nconsole.log(evaluationDashboard);\n```", perLanguage: { go: { method: 'client.EvaluationDashboards.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tevaluationDashboard, err := client.EvaluationDashboards.Get(\n\t\tcontext.TODO(),\n\t\t"dashboard_id",\n\t\tsgpdev.EvaluationDashboardGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", evaluationDashboard.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluation-dashboards/$DASHBOARD_ID \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'evaluation_dashboards.retrieve', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nevaluation_dashboard = client.evaluation_dashboards.retrieve(\n dashboard_id="dashboard_id",\n)\nprint(evaluation_dashboard.id)', }, typescript: { method: 'client.evaluationDashboards.retrieve', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst evaluationDashboard = await client.evaluationDashboards.retrieve('dashboard_id');\n\nconsole.log(evaluationDashboard.id);", }, }, }, { name: 'update', endpoint: '/v5/evaluation-dashboards/{dashboard_id}', httpMethod: 'patch', summary: 'Patch Evaluation Dashboard', description: 'Partially update dashboard metadata (name, description, widget_order)', stainlessPath: '(resource) evaluation_dashboards > (method) update', qualified: 'client.evaluationDashboards.update', params: [ 'dashboard_id: string;', 'description?: string;', 'name?: string;', 'tags?: string[];', 'widget_order?: string[];', ], response: "{ id: string; account_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; name: string; tags: string[]; updated_at: string; archived_at?: string; description?: string; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard'; widget_order?: string[]; widget_results?: { id: string; account_id: string; computation_status: 'pending' | 'completed' | 'failed'; created_at: string; widget_id: string; computation_job_id?: string; computed_at?: string; computed_result?: object; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard_widget_result'; widget?: evaluation_dashboard_widget; }[]; widgets?: { id: string; account_id: string; created_at: string; title: string; type: evaluation_widget_type_enum; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: series_query | metric_query; }[]; }", markdown: "## update\n\n`client.evaluationDashboards.update(dashboard_id: string, description?: string, name?: string, tags?: string[], widget_order?: string[]): { id: string; account_id: string; created_at: string; created_by: identity; name: string; tags: string[]; updated_at: string; archived_at?: string; description?: string; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard'; widget_order?: string[]; widget_results?: evaluation_dashboard_widget_result[]; widgets?: evaluation_dashboard_widget[]; }`\n\n**patch** `/v5/evaluation-dashboards/{dashboard_id}`\n\nPartially update dashboard metadata (name, description, widget_order)\n\n### Parameters\n\n- `dashboard_id: string`\n\n- `description?: string`\n Dashboard description\n\n- `name?: string`\n Dashboard name\n\n- `tags?: string[]`\n The tags associated with the entity\n\n- `widget_order?: string[]`\n Ordered array of widget IDs (for reordering widgets)\n\n### Returns\n\n- `{ id: string; account_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; name: string; tags: string[]; updated_at: string; archived_at?: string; description?: string; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard'; widget_order?: string[]; widget_results?: { id: string; account_id: string; computation_status: 'pending' | 'completed' | 'failed'; created_at: string; widget_id: string; computation_job_id?: string; computed_at?: string; computed_result?: object; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard_widget_result'; widget?: evaluation_dashboard_widget; }[]; widgets?: { id: string; account_id: string; created_at: string; title: string; type: evaluation_widget_type_enum; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: series_query | metric_query; }[]; }`\n\n - `id: string`\n - `account_id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `name: string`\n - `tags: string[]`\n - `updated_at: string`\n - `archived_at?: string`\n - `description?: string`\n - `error_message?: string`\n - `evaluation_group_id?: string`\n - `evaluation_id?: string`\n - `object?: 'evaluation_dashboard'`\n - `widget_order?: string[]`\n - `widget_results?: { id: string; account_id: string; computation_status: 'pending' | 'completed' | 'failed'; created_at: string; widget_id: string; computation_job_id?: string; computed_at?: string; computed_result?: object; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard_widget_result'; widget?: { id: string; account_id: string; created_at: string; title: string; type: evaluation_widget_type_enum; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: series_query | metric_query; }; }[]`\n - `widgets?: { id: string; account_id: string; created_at: string; title: string; type: string; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: { select: select_item[]; evaluation_ids?: string[]; filter?: filter; groupBy?: string[]; limit?: number; orderBy?: object[]; } | { select: select_item[]; evaluation_ids?: string[]; filter?: filter; }; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst evaluationDashboard = await client.evaluationDashboards.update('dashboard_id');\n\nconsole.log(evaluationDashboard);\n```", perLanguage: { go: { method: 'client.EvaluationDashboards.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tevaluationDashboard, err := client.EvaluationDashboards.Update(\n\t\tcontext.TODO(),\n\t\t"dashboard_id",\n\t\tsgpdev.EvaluationDashboardUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", evaluationDashboard.ID)\n}\n', }, http: { example: "curl https://api.egp.scale.com/v5/evaluation-dashboards/$DASHBOARD_ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"x-api-key: $SGP_API_KEY\" \\\n -d '{}'", }, python: { method: 'evaluation_dashboards.update', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nevaluation_dashboard = client.evaluation_dashboards.update(\n dashboard_id="dashboard_id",\n)\nprint(evaluation_dashboard.id)', }, typescript: { method: 'client.evaluationDashboards.update', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst evaluationDashboard = await client.evaluationDashboards.update('dashboard_id');\n\nconsole.log(evaluationDashboard.id);", }, }, }, { name: 'archive', endpoint: '/v5/evaluation-dashboards/{dashboard_id}', httpMethod: 'delete', summary: 'Delete Evaluation Dashboard', description: 'Soft delete an evaluation dashboard', stainlessPath: '(resource) evaluation_dashboards > (method) archive', qualified: 'client.evaluationDashboards.archive', params: ['dashboard_id: string;'], response: "{ id: string; account_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; name: string; tags: string[]; updated_at: string; archived_at?: string; description?: string; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard'; widget_order?: string[]; widget_results?: { id: string; account_id: string; computation_status: 'pending' | 'completed' | 'failed'; created_at: string; widget_id: string; computation_job_id?: string; computed_at?: string; computed_result?: object; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard_widget_result'; widget?: evaluation_dashboard_widget; }[]; widgets?: { id: string; account_id: string; created_at: string; title: string; type: evaluation_widget_type_enum; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: series_query | metric_query; }[]; }", markdown: "## archive\n\n`client.evaluationDashboards.archive(dashboard_id: string): { id: string; account_id: string; created_at: string; created_by: identity; name: string; tags: string[]; updated_at: string; archived_at?: string; description?: string; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard'; widget_order?: string[]; widget_results?: evaluation_dashboard_widget_result[]; widgets?: evaluation_dashboard_widget[]; }`\n\n**delete** `/v5/evaluation-dashboards/{dashboard_id}`\n\nSoft delete an evaluation dashboard\n\n### Parameters\n\n- `dashboard_id: string`\n\n### Returns\n\n- `{ id: string; account_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; name: string; tags: string[]; updated_at: string; archived_at?: string; description?: string; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard'; widget_order?: string[]; widget_results?: { id: string; account_id: string; computation_status: 'pending' | 'completed' | 'failed'; created_at: string; widget_id: string; computation_job_id?: string; computed_at?: string; computed_result?: object; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard_widget_result'; widget?: evaluation_dashboard_widget; }[]; widgets?: { id: string; account_id: string; created_at: string; title: string; type: evaluation_widget_type_enum; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: series_query | metric_query; }[]; }`\n\n - `id: string`\n - `account_id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `name: string`\n - `tags: string[]`\n - `updated_at: string`\n - `archived_at?: string`\n - `description?: string`\n - `error_message?: string`\n - `evaluation_group_id?: string`\n - `evaluation_id?: string`\n - `object?: 'evaluation_dashboard'`\n - `widget_order?: string[]`\n - `widget_results?: { id: string; account_id: string; computation_status: 'pending' | 'completed' | 'failed'; created_at: string; widget_id: string; computation_job_id?: string; computed_at?: string; computed_result?: object; error_message?: string; evaluation_group_id?: string; evaluation_id?: string; object?: 'evaluation_dashboard_widget_result'; widget?: { id: string; account_id: string; created_at: string; title: string; type: evaluation_widget_type_enum; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: series_query | metric_query; }; }[]`\n - `widgets?: { id: string; account_id: string; created_at: string; title: string; type: string; archived_at?: string; config?: object; object?: 'evaluation_dashboard_widget'; query?: { select: select_item[]; evaluation_ids?: string[]; filter?: filter; groupBy?: string[]; limit?: number; orderBy?: object[]; } | { select: select_item[]; evaluation_ids?: string[]; filter?: filter; }; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst evaluationDashboard = await client.evaluationDashboards.archive('dashboard_id');\n\nconsole.log(evaluationDashboard);\n```", perLanguage: { go: { method: 'client.EvaluationDashboards.Archive', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tevaluationDashboard, err := client.EvaluationDashboards.Archive(context.TODO(), "dashboard_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", evaluationDashboard.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluation-dashboards/$DASHBOARD_ID \\\n -X DELETE \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'evaluation_dashboards.archive', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nevaluation_dashboard = client.evaluation_dashboards.archive(\n "dashboard_id",\n)\nprint(evaluation_dashboard.id)', }, typescript: { method: 'client.evaluationDashboards.archive', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst evaluationDashboard = await client.evaluationDashboards.archive('dashboard_id');\n\nconsole.log(evaluationDashboard.id);", }, }, }, { name: 'create', endpoint: '/v5/evaluation-dashboards/{dashboard_id}/widgets', httpMethod: 'post', summary: 'Add Widget to Dashboard', description: 'Create a new widget, add it to the dashboard, and compute its results', stainlessPath: '(resource) evaluation_dashboards.widgets > (method) create', qualified: 'client.evaluationDashboards.widgets.create', params: [ 'dashboard_id: string;', 'title: string;', 'type: string;', 'config?: object;', "query?: { select: { expression: object | object; alias?: string; }[]; evaluation_ids?: string[]; filter?: { conditions: object[]; logicalOperators?: 'AND' | 'OR'[]; }; groupBy?: string[]; limit?: number; orderBy?: { column: string; direction?: 'ASC' | 'DESC'; source?: string; }[]; } | { select: { expression: object | object; alias?: string; }[]; evaluation_ids?: string[]; filter?: { conditions: object[]; logicalOperators?: 'AND' | 'OR'[]; }; };", ], response: "{ id: string; account_id: string; created_at: string; title: string; type: string; config?: object; object?: 'evaluation_widget'; query?: { select: select_item[]; evaluation_ids?: string[]; filter?: filter; groupBy?: string[]; limit?: number; orderBy?: object[]; } | { select: select_item[]; evaluation_ids?: string[]; filter?: filter; }; result?: { id: string; computation_status: string; widget_id: string; computed_at?: string; computed_result?: object; error_message?: string; }; }", markdown: "## create\n\n`client.evaluationDashboards.widgets.create(dashboard_id: string, title: string, type: string, config?: object, query?: { select: select_item[]; evaluation_ids?: string[]; filter?: filter; groupBy?: string[]; limit?: number; orderBy?: object[]; } | { select: select_item[]; evaluation_ids?: string[]; filter?: filter; }): { id: string; account_id: string; created_at: string; title: string; type: evaluation_widget_type_enum; config?: object; object?: 'evaluation_widget'; query?: series_query | metric_query; result?: evaluation_dashboard_widget_result_response; }`\n\n**post** `/v5/evaluation-dashboards/{dashboard_id}/widgets`\n\nCreate a new widget, add it to the dashboard, and compute its results\n\n### Parameters\n\n- `dashboard_id: string`\n\n- `title: string`\n Widget title\n\n- `type: string`\n Widget type\n\n- `config?: object`\n Chart-specific display configuration\n\n- `query?: { select: { expression: object | object; alias?: string; }[]; evaluation_ids?: string[]; filter?: { conditions: object[]; logicalOperators?: 'AND' | 'OR'[]; }; groupBy?: string[]; limit?: number; orderBy?: { column: string; direction?: 'ASC' | 'DESC'; source?: string; }[]; } | { select: { expression: object | object; alias?: string; }[]; evaluation_ids?: string[]; filter?: { conditions: object[]; logicalOperators?: 'AND' | 'OR'[]; }; }`\n Structured query AST for metric computation (SeriesQuery or MetricQuery)\n\n### Returns\n\n- `{ id: string; account_id: string; created_at: string; title: string; type: string; config?: object; object?: 'evaluation_widget'; query?: { select: select_item[]; evaluation_ids?: string[]; filter?: filter; groupBy?: string[]; limit?: number; orderBy?: object[]; } | { select: select_item[]; evaluation_ids?: string[]; filter?: filter; }; result?: { id: string; computation_status: string; widget_id: string; computed_at?: string; computed_result?: object; error_message?: string; }; }`\n Response model for widget creation - includes widget and computed result\n\n - `id: string`\n - `account_id: string`\n - `created_at: string`\n - `title: string`\n - `type: string`\n - `config?: object`\n - `object?: 'evaluation_widget'`\n - `query?: { select: { expression: object | object; alias?: string; }[]; evaluation_ids?: string[]; filter?: { conditions: object[]; logicalOperators?: 'AND' | 'OR'[]; }; groupBy?: string[]; limit?: number; orderBy?: { column: string; direction?: 'ASC' | 'DESC'; source?: string; }[]; } | { select: { expression: object | object; alias?: string; }[]; evaluation_ids?: string[]; filter?: { conditions: object[]; logicalOperators?: 'AND' | 'OR'[]; }; }`\n - `result?: { id: string; computation_status: string; widget_id: string; computed_at?: string; computed_result?: object; error_message?: string; }`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst evaluationDashboardWidgetWithResult = await client.evaluationDashboards.widgets.create('dashboard_id', { title: 'x', type: 'bar' });\n\nconsole.log(evaluationDashboardWidgetWithResult);\n```", perLanguage: { go: { method: 'client.EvaluationDashboards.Widgets.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tevaluationDashboardWidgetWithResult, err := client.EvaluationDashboards.Widgets.New(\n\t\tcontext.TODO(),\n\t\t"dashboard_id",\n\t\tsgpdev.EvaluationDashboardWidgetNewParams{\n\t\t\tTitle: "x",\n\t\t\tType: sgpdev.EvaluationWidgetTypeEnumBar,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", evaluationDashboardWidgetWithResult.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluation-dashboards/$DASHBOARD_ID/widgets \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "title": "x",\n "type": "bar"\n }\'', }, python: { method: 'evaluation_dashboards.widgets.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nevaluation_dashboard_widget_with_result = client.evaluation_dashboards.widgets.create(\n dashboard_id="dashboard_id",\n title="x",\n type="bar",\n)\nprint(evaluation_dashboard_widget_with_result.id)', }, typescript: { method: 'client.evaluationDashboards.widgets.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst evaluationDashboardWidgetWithResult = await client.evaluationDashboards.widgets.create(\n 'dashboard_id',\n { title: 'x', type: 'bar' },\n);\n\nconsole.log(evaluationDashboardWidgetWithResult.id);", }, }, }, { name: 'update', endpoint: '/v5/evaluation-dashboards/{dashboard_id}/widgets/{widget_id}', httpMethod: 'patch', summary: 'Update Dashboard Widget', description: 'Update a widget and compute its results. If the widget is only used by this dashboard, it is updated in place. If shared across multiple dashboards, a copy is created.', stainlessPath: '(resource) evaluation_dashboards.widgets > (method) update', qualified: 'client.evaluationDashboards.widgets.update', params: [ 'dashboard_id: string;', 'widget_id: string;', 'config?: object;', "query?: { select: { expression: object | object; alias?: string; }[]; evaluation_ids?: string[]; filter?: { conditions: object[]; logicalOperators?: 'AND' | 'OR'[]; }; groupBy?: string[]; limit?: number; orderBy?: { column: string; direction?: 'ASC' | 'DESC'; source?: string; }[]; } | { select: { expression: object | object; alias?: string; }[]; evaluation_ids?: string[]; filter?: { conditions: object[]; logicalOperators?: 'AND' | 'OR'[]; }; };", 'title?: string;', ], response: "{ id: string; account_id: string; created_at: string; title: string; type: string; config?: object; object?: 'evaluation_widget'; query?: { select: select_item[]; evaluation_ids?: string[]; filter?: filter; groupBy?: string[]; limit?: number; orderBy?: object[]; } | { select: select_item[]; evaluation_ids?: string[]; filter?: filter; }; result?: { id: string; computation_status: string; widget_id: string; computed_at?: string; computed_result?: object; error_message?: string; }; }", markdown: "## update\n\n`client.evaluationDashboards.widgets.update(dashboard_id: string, widget_id: string, config?: object, query?: { select: select_item[]; evaluation_ids?: string[]; filter?: filter; groupBy?: string[]; limit?: number; orderBy?: object[]; } | { select: select_item[]; evaluation_ids?: string[]; filter?: filter; }, title?: string): { id: string; account_id: string; created_at: string; title: string; type: evaluation_widget_type_enum; config?: object; object?: 'evaluation_widget'; query?: series_query | metric_query; result?: evaluation_dashboard_widget_result_response; }`\n\n**patch** `/v5/evaluation-dashboards/{dashboard_id}/widgets/{widget_id}`\n\nUpdate a widget and compute its results. If the widget is only used by this dashboard, it is updated in place. If shared across multiple dashboards, a copy is created.\n\n### Parameters\n\n- `dashboard_id: string`\n\n- `widget_id: string`\n\n- `config?: object`\n Chart-specific display configuration\n\n- `query?: { select: { expression: object | object; alias?: string; }[]; evaluation_ids?: string[]; filter?: { conditions: object[]; logicalOperators?: 'AND' | 'OR'[]; }; groupBy?: string[]; limit?: number; orderBy?: { column: string; direction?: 'ASC' | 'DESC'; source?: string; }[]; } | { select: { expression: object | object; alias?: string; }[]; evaluation_ids?: string[]; filter?: { conditions: object[]; logicalOperators?: 'AND' | 'OR'[]; }; }`\n Structured query AST for metric computation (SeriesQuery or MetricQuery)\n\n- `title?: string`\n Widget title\n\n### Returns\n\n- `{ id: string; account_id: string; created_at: string; title: string; type: string; config?: object; object?: 'evaluation_widget'; query?: { select: select_item[]; evaluation_ids?: string[]; filter?: filter; groupBy?: string[]; limit?: number; orderBy?: object[]; } | { select: select_item[]; evaluation_ids?: string[]; filter?: filter; }; result?: { id: string; computation_status: string; widget_id: string; computed_at?: string; computed_result?: object; error_message?: string; }; }`\n Response model for widget creation - includes widget and computed result\n\n - `id: string`\n - `account_id: string`\n - `created_at: string`\n - `title: string`\n - `type: string`\n - `config?: object`\n - `object?: 'evaluation_widget'`\n - `query?: { select: { expression: object | object; alias?: string; }[]; evaluation_ids?: string[]; filter?: { conditions: object[]; logicalOperators?: 'AND' | 'OR'[]; }; groupBy?: string[]; limit?: number; orderBy?: { column: string; direction?: 'ASC' | 'DESC'; source?: string; }[]; } | { select: { expression: object | object; alias?: string; }[]; evaluation_ids?: string[]; filter?: { conditions: object[]; logicalOperators?: 'AND' | 'OR'[]; }; }`\n - `result?: { id: string; computation_status: string; widget_id: string; computed_at?: string; computed_result?: object; error_message?: string; }`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst evaluationDashboardWidgetWithResult = await client.evaluationDashboards.widgets.update('widget_id', { dashboard_id: 'dashboard_id' });\n\nconsole.log(evaluationDashboardWidgetWithResult);\n```", perLanguage: { go: { method: 'client.EvaluationDashboards.Widgets.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tevaluationDashboardWidgetWithResult, err := client.EvaluationDashboards.Widgets.Update(\n\t\tcontext.TODO(),\n\t\t"widget_id",\n\t\tsgpdev.EvaluationDashboardWidgetUpdateParams{\n\t\t\tDashboardID: "dashboard_id",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", evaluationDashboardWidgetWithResult.ID)\n}\n', }, http: { example: "curl https://api.egp.scale.com/v5/evaluation-dashboards/$DASHBOARD_ID/widgets/$WIDGET_ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"x-api-key: $SGP_API_KEY\" \\\n -d '{}'", }, python: { method: 'evaluation_dashboards.widgets.update', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nevaluation_dashboard_widget_with_result = client.evaluation_dashboards.widgets.update(\n widget_id="widget_id",\n dashboard_id="dashboard_id",\n)\nprint(evaluation_dashboard_widget_with_result.id)', }, typescript: { method: 'client.evaluationDashboards.widgets.update', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst evaluationDashboardWidgetWithResult = await client.evaluationDashboards.widgets.update(\n 'widget_id',\n { dashboard_id: 'dashboard_id' },\n);\n\nconsole.log(evaluationDashboardWidgetWithResult.id);", }, }, }, { name: 'remove', endpoint: '/v5/evaluation-dashboards/{dashboard_id}/widgets/{widget_id}', httpMethod: 'delete', summary: 'Remove Widget from Dashboard', description: 'Remove a widget from the dashboard (does not delete the widget)', stainlessPath: '(resource) evaluation_dashboards.widgets > (method) remove', qualified: 'client.evaluationDashboards.widgets.remove', params: ['dashboard_id: string;', 'widget_id: string;'], markdown: "## remove\n\n`client.evaluationDashboards.widgets.remove(dashboard_id: string, widget_id: string): void`\n\n**delete** `/v5/evaluation-dashboards/{dashboard_id}/widgets/{widget_id}`\n\nRemove a widget from the dashboard (does not delete the widget)\n\n### Parameters\n\n- `dashboard_id: string`\n\n- `widget_id: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nawait client.evaluationDashboards.widgets.remove('widget_id', { dashboard_id: 'dashboard_id' })\n```", perLanguage: { go: { method: 'client.EvaluationDashboards.Widgets.Remove', example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\terr := client.EvaluationDashboards.Widgets.Remove(\n\t\tcontext.TODO(),\n\t\t"widget_id",\n\t\tsgpdev.EvaluationDashboardWidgetRemoveParams{\n\t\t\tDashboardID: "dashboard_id",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/evaluation-dashboards/$DASHBOARD_ID/widgets/$WIDGET_ID \\\n -X DELETE \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'evaluation_dashboards.widgets.remove', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nclient.evaluation_dashboards.widgets.remove(\n widget_id="widget_id",\n dashboard_id="dashboard_id",\n)', }, typescript: { method: 'client.evaluationDashboards.widgets.remove', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.evaluationDashboards.widgets.remove('widget_id', { dashboard_id: 'dashboard_id' });", }, }, }, { name: 'create', endpoint: '/v5/spans', httpMethod: 'post', summary: 'Create Span', description: 'Create Span', stainlessPath: '(resource) spans > (method) create', qualified: 'client.spans.create', params: [ 'name: string;', 'start_timestamp: string;', 'trace_id: string;', 'id?: string;', 'application_interaction_id?: string;', 'application_variant_id?: string;', 'end_timestamp?: string;', 'group_id?: string;', 'input?: object;', 'metadata?: object;', 'output?: object;', 'parent_id?: string;', "status?: 'SUCCESS' | 'ERROR' | 'CANCELED';", 'type?: string;', ], response: "{ id: string; account_id: string; name: string; start_timestamp: string; trace_id: string; application_interaction_id?: string; application_variant_id?: string; created_by?: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; object?: 'span'; output?: object; parent_id?: string; status?: 'SUCCESS' | 'ERROR' | 'CANCELED'; type?: string; }", markdown: "## create\n\n`client.spans.create(name: string, start_timestamp: string, trace_id: string, id?: string, application_interaction_id?: string, application_variant_id?: string, end_timestamp?: string, group_id?: string, input?: object, metadata?: object, output?: object, parent_id?: string, status?: 'SUCCESS' | 'ERROR' | 'CANCELED', type?: string): { id: string; account_id: string; name: string; start_timestamp: string; trace_id: string; application_interaction_id?: string; application_variant_id?: string; created_by?: identity; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; object?: 'span'; output?: object; parent_id?: string; status?: span_status; type?: span_type; }`\n\n**post** `/v5/spans`\n\nCreate Span\n\n### Parameters\n\n- `name: string`\n\n- `start_timestamp: string`\n\n- `trace_id: string`\n id for grouping traces together, uuid is recommended\n\n- `id?: string`\n The id of the span\n\n- `application_interaction_id?: string`\n The optional application interaction ID this span belongs to\n\n- `application_variant_id?: string`\n The optional application variant ID this span belongs to\n\n- `end_timestamp?: string`\n\n- `group_id?: string`\n Reference to a group_id\n\n- `input?: object`\n\n- `metadata?: object`\n\n- `output?: object`\n\n- `parent_id?: string`\n Reference to a parent span_id\n\n- `status?: 'SUCCESS' | 'ERROR' | 'CANCELED'`\n\n- `type?: string`\n\n### Returns\n\n- `{ id: string; account_id: string; name: string; start_timestamp: string; trace_id: string; application_interaction_id?: string; application_variant_id?: string; created_by?: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; object?: 'span'; output?: object; parent_id?: string; status?: 'SUCCESS' | 'ERROR' | 'CANCELED'; type?: string; }`\n\n - `id: string`\n - `account_id: string`\n - `name: string`\n - `start_timestamp: string`\n - `trace_id: string`\n - `application_interaction_id?: string`\n - `application_variant_id?: string`\n - `created_by?: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `end_timestamp?: string`\n - `group_id?: string`\n - `input?: object`\n - `metadata?: object`\n - `object?: 'span'`\n - `output?: object`\n - `parent_id?: string`\n - `status?: 'SUCCESS' | 'ERROR' | 'CANCELED'`\n - `type?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst span = await client.spans.create({\n name: 'name',\n start_timestamp: '2019-12-27T18:11:19.117Z',\n trace_id: 'trace_id',\n});\n\nconsole.log(span);\n```", perLanguage: { go: { method: 'client.Spans.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tspan, err := client.Spans.New(context.TODO(), sgpdev.SpanNewParams{\n\t\tSpanCreate: sgpdev.SpanCreateParam{\n\t\t\tName: "name",\n\t\t\tStartTimestamp: time.Now(),\n\t\t\tTraceID: "trace_id",\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", span.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/spans \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "name": "name",\n "start_timestamp": "2019-12-27T18:11:19.117Z",\n "trace_id": "trace_id"\n }\'', }, python: { method: 'spans.create', example: 'import os\nfrom datetime import datetime\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nspan = client.spans.create(\n name="name",\n start_timestamp=datetime.fromisoformat("2019-12-27T18:11:19.117"),\n trace_id="trace_id",\n)\nprint(span.id)', }, typescript: { method: 'client.spans.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst span = await client.spans.create({\n name: 'name',\n start_timestamp: '2019-12-27T18:11:19.117Z',\n trace_id: 'trace_id',\n});\n\nconsole.log(span.id);", }, }, }, { name: 'retrieve', endpoint: '/v5/spans/{span_id}', httpMethod: 'get', summary: 'Get Span', description: 'Get Span', stainlessPath: '(resource) spans > (method) retrieve', qualified: 'client.spans.retrieve', params: ['span_id: string;'], response: "{ id: string; account_id: string; name: string; start_timestamp: string; trace_id: string; application_interaction_id?: string; application_variant_id?: string; created_by?: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; object?: 'span'; output?: object; parent_id?: string; status?: 'SUCCESS' | 'ERROR' | 'CANCELED'; type?: string; }", markdown: "## retrieve\n\n`client.spans.retrieve(span_id: string): { id: string; account_id: string; name: string; start_timestamp: string; trace_id: string; application_interaction_id?: string; application_variant_id?: string; created_by?: identity; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; object?: 'span'; output?: object; parent_id?: string; status?: span_status; type?: span_type; }`\n\n**get** `/v5/spans/{span_id}`\n\nGet Span\n\n### Parameters\n\n- `span_id: string`\n\n### Returns\n\n- `{ id: string; account_id: string; name: string; start_timestamp: string; trace_id: string; application_interaction_id?: string; application_variant_id?: string; created_by?: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; object?: 'span'; output?: object; parent_id?: string; status?: 'SUCCESS' | 'ERROR' | 'CANCELED'; type?: string; }`\n\n - `id: string`\n - `account_id: string`\n - `name: string`\n - `start_timestamp: string`\n - `trace_id: string`\n - `application_interaction_id?: string`\n - `application_variant_id?: string`\n - `created_by?: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `end_timestamp?: string`\n - `group_id?: string`\n - `input?: object`\n - `metadata?: object`\n - `object?: 'span'`\n - `output?: object`\n - `parent_id?: string`\n - `status?: 'SUCCESS' | 'ERROR' | 'CANCELED'`\n - `type?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst span = await client.spans.retrieve('span_id');\n\nconsole.log(span);\n```", perLanguage: { go: { method: 'client.Spans.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tspan, err := client.Spans.Get(context.TODO(), "span_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", span.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/spans/$SPAN_ID \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'spans.retrieve', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nspan = client.spans.retrieve(\n "span_id",\n)\nprint(span.id)', }, typescript: { method: 'client.spans.retrieve', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst span = await client.spans.retrieve('span_id');\n\nconsole.log(span.id);", }, }, }, { name: 'update', endpoint: '/v5/spans/{span_id}', httpMethod: 'patch', summary: 'Update Span', description: 'Update Span', stainlessPath: '(resource) spans > (method) update', qualified: 'client.spans.update', params: [ 'span_id: string;', 'end_timestamp?: string;', 'metadata?: object;', 'name?: string;', 'output?: object;', "status?: 'SUCCESS' | 'ERROR' | 'CANCELED';", ], response: "{ id: string; account_id: string; name: string; start_timestamp: string; trace_id: string; application_interaction_id?: string; application_variant_id?: string; created_by?: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; object?: 'span'; output?: object; parent_id?: string; status?: 'SUCCESS' | 'ERROR' | 'CANCELED'; type?: string; }", markdown: "## update\n\n`client.spans.update(span_id: string, end_timestamp?: string, metadata?: object, name?: string, output?: object, status?: 'SUCCESS' | 'ERROR' | 'CANCELED'): { id: string; account_id: string; name: string; start_timestamp: string; trace_id: string; application_interaction_id?: string; application_variant_id?: string; created_by?: identity; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; object?: 'span'; output?: object; parent_id?: string; status?: span_status; type?: span_type; }`\n\n**patch** `/v5/spans/{span_id}`\n\nUpdate Span\n\n### Parameters\n\n- `span_id: string`\n\n- `end_timestamp?: string`\n\n- `metadata?: object`\n\n- `name?: string`\n\n- `output?: object`\n\n- `status?: 'SUCCESS' | 'ERROR' | 'CANCELED'`\n\n### Returns\n\n- `{ id: string; account_id: string; name: string; start_timestamp: string; trace_id: string; application_interaction_id?: string; application_variant_id?: string; created_by?: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; object?: 'span'; output?: object; parent_id?: string; status?: 'SUCCESS' | 'ERROR' | 'CANCELED'; type?: string; }`\n\n - `id: string`\n - `account_id: string`\n - `name: string`\n - `start_timestamp: string`\n - `trace_id: string`\n - `application_interaction_id?: string`\n - `application_variant_id?: string`\n - `created_by?: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `end_timestamp?: string`\n - `group_id?: string`\n - `input?: object`\n - `metadata?: object`\n - `object?: 'span'`\n - `output?: object`\n - `parent_id?: string`\n - `status?: 'SUCCESS' | 'ERROR' | 'CANCELED'`\n - `type?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst span = await client.spans.update('span_id');\n\nconsole.log(span);\n```", perLanguage: { go: { method: 'client.Spans.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tspan, err := client.Spans.Update(\n\t\tcontext.TODO(),\n\t\t"span_id",\n\t\tsgpdev.SpanUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", span.ID)\n}\n', }, http: { example: "curl https://api.egp.scale.com/v5/spans/$SPAN_ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"x-api-key: $SGP_API_KEY\" \\\n -d '{}'", }, python: { method: 'spans.update', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nspan = client.spans.update(\n span_id="span_id",\n)\nprint(span.id)', }, typescript: { method: 'client.spans.update', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst span = await client.spans.update('span_id');\n\nconsole.log(span.id);", }, }, }, { name: 'batch', endpoint: '/v5/spans/batch', httpMethod: 'post', summary: 'Create Spans in Batch', description: 'Create Spans in Batch', stainlessPath: '(resource) spans > (method) batch', qualified: 'client.spans.batch', params: [ "items: { name: string; start_timestamp: string; trace_id: string; id?: string; application_interaction_id?: string; application_variant_id?: string; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; output?: object; parent_id?: string; status?: 'SUCCESS' | 'ERROR' | 'CANCELED'; type?: string; }[];", ], response: "{ items: { id: string; account_id: string; name: string; start_timestamp: string; trace_id: string; application_interaction_id?: string; application_variant_id?: string; created_by?: identity; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; object?: 'span'; output?: object; parent_id?: string; status?: span_status; type?: span_type; }[]; object?: 'list'; }", markdown: "## batch\n\n`client.spans.batch(items: { name: string; start_timestamp: string; trace_id: string; id?: string; application_interaction_id?: string; application_variant_id?: string; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; output?: object; parent_id?: string; status?: span_status; type?: span_type; }[]): { items: span[]; object?: 'list'; }`\n\n**post** `/v5/spans/batch`\n\nCreate Spans in Batch\n\n### Parameters\n\n- `items: { name: string; start_timestamp: string; trace_id: string; id?: string; application_interaction_id?: string; application_variant_id?: string; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; output?: object; parent_id?: string; status?: 'SUCCESS' | 'ERROR' | 'CANCELED'; type?: string; }[]`\n\n### Returns\n\n- `{ items: { id: string; account_id: string; name: string; start_timestamp: string; trace_id: string; application_interaction_id?: string; application_variant_id?: string; created_by?: identity; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; object?: 'span'; output?: object; parent_id?: string; status?: span_status; type?: span_type; }[]; object?: 'list'; }`\n\n - `items: { id: string; account_id: string; name: string; start_timestamp: string; trace_id: string; application_interaction_id?: string; application_variant_id?: string; created_by?: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; object?: 'span'; output?: object; parent_id?: string; status?: 'SUCCESS' | 'ERROR' | 'CANCELED'; type?: string; }[]`\n - `object?: 'list'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst apiListSpan = await client.spans.batch({ items: [{\n name: 'name',\n start_timestamp: '2019-12-27T18:11:19.117Z',\n trace_id: 'trace_id',\n}] });\n\nconsole.log(apiListSpan);\n```", perLanguage: { go: { method: 'client.Spans.Batch', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tapiListSpan, err := client.Spans.Batch(context.TODO(), sgpdev.SpanBatchParams{\n\t\tSpanBatchCreate: sgpdev.SpanBatchCreateParam{\n\t\t\tItems: []sgpdev.SpanCreateParam{{\n\t\t\t\tName: "name",\n\t\t\t\tStartTimestamp: time.Now(),\n\t\t\t\tTraceID: "trace_id",\n\t\t\t}},\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", apiListSpan.Items)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/spans/batch \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "items": [\n {\n "name": "name",\n "start_timestamp": "2019-12-27T18:11:19.117Z",\n "trace_id": "trace_id"\n }\n ]\n }\'', }, python: { method: 'spans.batch', example: 'import os\nfrom datetime import datetime\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\napi_list_span = client.spans.batch(\n items=[{\n "name": "name",\n "start_timestamp": datetime.fromisoformat("2019-12-27T18:11:19.117"),\n "trace_id": "trace_id",\n }],\n)\nprint(api_list_span.items)', }, typescript: { method: 'client.spans.batch', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst apiListSpan = await client.spans.batch({\n items: [\n {\n name: 'name',\n start_timestamp: '2019-12-27T18:11:19.117Z',\n trace_id: 'trace_id',\n },\n ],\n});\n\nconsole.log(apiListSpan.items);", }, }, }, { name: 'upsert_batch', endpoint: '/v5/spans/batch', httpMethod: 'put', summary: 'Upsert Spans in Batch', description: 'Upsert Spans in Batch', stainlessPath: '(resource) spans > (method) upsert_batch', qualified: 'client.spans.upsertBatch', params: [ "items: { name: string; start_timestamp: string; trace_id: string; id?: string; application_interaction_id?: string; application_variant_id?: string; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; output?: object; parent_id?: string; status?: 'SUCCESS' | 'ERROR' | 'CANCELED'; type?: string; }[];", ], response: "{ items: { id: string; account_id: string; name: string; start_timestamp: string; trace_id: string; application_interaction_id?: string; application_variant_id?: string; created_by?: identity; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; object?: 'span'; output?: object; parent_id?: string; status?: span_status; type?: span_type; }[]; object?: 'list'; }", markdown: "## upsert_batch\n\n`client.spans.upsertBatch(items: { name: string; start_timestamp: string; trace_id: string; id?: string; application_interaction_id?: string; application_variant_id?: string; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; output?: object; parent_id?: string; status?: span_status; type?: span_type; }[]): { items: span[]; object?: 'list'; }`\n\n**put** `/v5/spans/batch`\n\nUpsert Spans in Batch\n\n### Parameters\n\n- `items: { name: string; start_timestamp: string; trace_id: string; id?: string; application_interaction_id?: string; application_variant_id?: string; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; output?: object; parent_id?: string; status?: 'SUCCESS' | 'ERROR' | 'CANCELED'; type?: string; }[]`\n\n### Returns\n\n- `{ items: { id: string; account_id: string; name: string; start_timestamp: string; trace_id: string; application_interaction_id?: string; application_variant_id?: string; created_by?: identity; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; object?: 'span'; output?: object; parent_id?: string; status?: span_status; type?: span_type; }[]; object?: 'list'; }`\n\n - `items: { id: string; account_id: string; name: string; start_timestamp: string; trace_id: string; application_interaction_id?: string; application_variant_id?: string; created_by?: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; object?: 'span'; output?: object; parent_id?: string; status?: 'SUCCESS' | 'ERROR' | 'CANCELED'; type?: string; }[]`\n - `object?: 'list'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst apiListSpan = await client.spans.upsertBatch({ items: [{\n name: 'name',\n start_timestamp: '2019-12-27T18:11:19.117Z',\n trace_id: 'trace_id',\n}] });\n\nconsole.log(apiListSpan);\n```", perLanguage: { go: { method: 'client.Spans.UpsertBatch', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tapiListSpan, err := client.Spans.UpsertBatch(context.TODO(), sgpdev.SpanUpsertBatchParams{\n\t\tSpanBatchCreate: sgpdev.SpanBatchCreateParam{\n\t\t\tItems: []sgpdev.SpanCreateParam{{\n\t\t\t\tName: "name",\n\t\t\t\tStartTimestamp: time.Now(),\n\t\t\t\tTraceID: "trace_id",\n\t\t\t}},\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", apiListSpan.Items)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/spans/batch \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "items": [\n {\n "name": "name",\n "start_timestamp": "2019-12-27T18:11:19.117Z",\n "trace_id": "trace_id"\n }\n ]\n }\'', }, python: { method: 'spans.upsert_batch', example: 'import os\nfrom datetime import datetime\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\napi_list_span = client.spans.upsert_batch(\n items=[{\n "name": "name",\n "start_timestamp": datetime.fromisoformat("2019-12-27T18:11:19.117"),\n "trace_id": "trace_id",\n }],\n)\nprint(api_list_span.items)', }, typescript: { method: 'client.spans.upsertBatch', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst apiListSpan = await client.spans.upsertBatch({\n items: [\n {\n name: 'name',\n start_timestamp: '2019-12-27T18:11:19.117Z',\n trace_id: 'trace_id',\n },\n ],\n});\n\nconsole.log(apiListSpan.items);", }, }, }, { name: 'search', endpoint: '/v5/spans/search', httpMethod: 'post', summary: 'Search and list spans', description: 'Search and list spans', stainlessPath: '(resource) spans > (method) search', qualified: 'client.spans.search', params: [ 'cursor?: string;', 'ending_before?: string;', 'from_ts?: string;', 'limit?: number;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', 'to_ts?: string;', 'acp_types?: string[];', 'agentex_agent_ids?: string[];', 'agentex_agent_names?: string[];', 'application_variant_ids?: string[];', 'assessment_types?: string[];', 'excluded_span_ids?: string[];', 'excluded_trace_ids?: string[];', 'extra_metadata?: object;', 'group_id?: string;', 'max_duration_ms?: number;', 'min_duration_ms?: number;', 'names?: string[];', 'parents_only?: boolean;', 'search_texts?: string[];', 'span_ids?: string[];', "statuses?: 'SUCCESS' | 'ERROR' | 'CANCELED'[];", 'trace_ids?: string[];', 'types?: string[];', ], response: "{ id: string; account_id: string; name: string; start_timestamp: string; trace_id: string; application_interaction_id?: string; application_variant_id?: string; created_by?: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; object?: 'span'; output?: object; parent_id?: string; status?: 'SUCCESS' | 'ERROR' | 'CANCELED'; type?: string; }", markdown: "## search\n\n`client.spans.search(cursor?: string, ending_before?: string, from_ts?: string, limit?: number, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string, to_ts?: string, acp_types?: string[], agentex_agent_ids?: string[], agentex_agent_names?: string[], application_variant_ids?: string[], assessment_types?: string[], excluded_span_ids?: string[], excluded_trace_ids?: string[], extra_metadata?: object, group_id?: string, max_duration_ms?: number, min_duration_ms?: number, names?: string[], parents_only?: boolean, search_texts?: string[], span_ids?: string[], statuses?: 'SUCCESS' | 'ERROR' | 'CANCELED'[], trace_ids?: string[], types?: string[]): { id: string; account_id: string; name: string; start_timestamp: string; trace_id: string; application_interaction_id?: string; application_variant_id?: string; created_by?: identity; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; object?: 'span'; output?: object; parent_id?: string; status?: span_status; type?: span_type; }`\n\n**post** `/v5/spans/search`\n\nSearch and list spans\n\n### Parameters\n\n- `cursor?: string`\n\n- `ending_before?: string`\n\n- `from_ts?: string`\n The starting (oldest) timestamp in ISO format.\n\n- `limit?: number`\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n- `to_ts?: string`\n The ending (most recent) timestamp in ISO format.\n\n- `acp_types?: string[]`\n Filter by ACP types\n\n- `agentex_agent_ids?: string[]`\n Filter by Agentex agent IDs\n\n- `agentex_agent_names?: string[]`\n Filter by Agentex agent names\n\n- `application_variant_ids?: string[]`\n Filter by application variant IDs\n\n- `assessment_types?: string[]`\n Filter spans by traces that have assessments of these types\n\n- `excluded_span_ids?: string[]`\n List of span IDs to exclude from results\n\n- `excluded_trace_ids?: string[]`\n List of trace IDs to exclude from results\n\n- `extra_metadata?: object`\n Filter on custom metadata key-value pairs\n\n- `group_id?: string`\n Filter by group ID\n\n- `max_duration_ms?: number`\n Maximum span duration in milliseconds (inclusive)\n\n- `min_duration_ms?: number`\n Minimum span duration in milliseconds (inclusive)\n\n- `names?: string[]`\n Filter by trace/span name\n\n- `parents_only?: boolean`\n Only fetch spans that are the top-level (ie. have no parent_id)\n\n- `search_texts?: string[]`\n Free text search across span input and output fields\n\n- `span_ids?: string[]`\n Filter by span IDs\n\n- `statuses?: 'SUCCESS' | 'ERROR' | 'CANCELED'[]`\n Filter on span status\n\n- `trace_ids?: string[]`\n Filter by trace IDs\n\n- `types?: string[]`\n\n### Returns\n\n- `{ id: string; account_id: string; name: string; start_timestamp: string; trace_id: string; application_interaction_id?: string; application_variant_id?: string; created_by?: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; end_timestamp?: string; group_id?: string; input?: object; metadata?: object; object?: 'span'; output?: object; parent_id?: string; status?: 'SUCCESS' | 'ERROR' | 'CANCELED'; type?: string; }`\n\n - `id: string`\n - `account_id: string`\n - `name: string`\n - `start_timestamp: string`\n - `trace_id: string`\n - `application_interaction_id?: string`\n - `application_variant_id?: string`\n - `created_by?: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `end_timestamp?: string`\n - `group_id?: string`\n - `input?: object`\n - `metadata?: object`\n - `object?: 'span'`\n - `output?: object`\n - `parent_id?: string`\n - `status?: 'SUCCESS' | 'ERROR' | 'CANCELED'`\n - `type?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\n// Automatically fetches more pages as needed.\nfor await (const span of client.spans.search()) {\n console.log(span);\n}\n```", perLanguage: { go: { method: 'client.Spans.Search', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tpage, err := client.Spans.Search(context.TODO(), sgpdev.SpanSearchParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, http: { example: "curl https://api.egp.scale.com/v5/spans/search \\\n -H 'Content-Type: application/json' \\\n -H \"x-api-key: $SGP_API_KEY\" \\\n -d '{}'", }, python: { method: 'spans.search', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\npage = client.spans.search()\npage = page.items[0]\nprint(page.id)', }, typescript: { method: 'client.spans.search', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const span of client.spans.search()) {\n console.log(span.id);\n}", }, }, }, { name: 'create', endpoint: '/v5/span-assessments', httpMethod: 'post', summary: 'Create Span Assessment', description: 'Create new assessment for a span (comment, rating, approval, rubric, overwrite, or metadata)', stainlessPath: '(resource) span_assessments > (method) create', qualified: 'client.spanAssessments.create', params: [ "assessment_type: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite';", 'span_id: string;', 'trace_id: string;', "approval?: 'approved' | 'rejected';", 'comment?: string;', 'metadata?: object;', 'overwrite?: object;', 'rating?: number;', 'rubric?: object;', ], response: "{ assessment_id: string; assessment_type: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite'; created_by: string; span_id: string; trace_id: string; account_id?: string; approval?: 'approved' | 'rejected'; comment?: string; created_at?: string; metadata?: object; object?: 'span.assessment'; overwrite?: object; rating?: number; rubric?: object; updated_at?: string; }", markdown: "## create\n\n`client.spanAssessments.create(assessment_type: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite', span_id: string, trace_id: string, approval?: 'approved' | 'rejected', comment?: string, metadata?: object, overwrite?: object, rating?: number, rubric?: object): { assessment_id: string; assessment_type: assessment_type; created_by: string; span_id: string; trace_id: string; account_id?: string; approval?: approval_status; comment?: string; created_at?: string; metadata?: object; object?: 'span.assessment'; overwrite?: object; rating?: number; rubric?: object; updated_at?: string; }`\n\n**post** `/v5/span-assessments`\n\nCreate new assessment for a span (comment, rating, approval, rubric, overwrite, or metadata)\n\n### Parameters\n\n- `assessment_type: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite'`\n Type of assessment\n\n- `span_id: string`\n The ID of the span this assessment is attached to\n\n- `trace_id: string`\n The ID of the trace this assessment is attached to\n\n- `approval?: 'approved' | 'rejected'`\n Approval status (approved/rejected)\n\n- `comment?: string`\n Raw text feedback\n\n- `metadata?: object`\n Arbitrary JSON object for additional data\n\n- `overwrite?: object`\n User corrections to span output\n\n- `rating?: number`\n Numerical rating (1-5)\n\n- `rubric?: object`\n Rule key-value pairs for rubric evaluation\n\n### Returns\n\n- `{ assessment_id: string; assessment_type: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite'; created_by: string; span_id: string; trace_id: string; account_id?: string; approval?: 'approved' | 'rejected'; comment?: string; created_at?: string; metadata?: object; object?: 'span.assessment'; overwrite?: object; rating?: number; rubric?: object; updated_at?: string; }`\n Response model for span assessment\n\n - `assessment_id: string`\n - `assessment_type: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite'`\n - `created_by: string`\n - `span_id: string`\n - `trace_id: string`\n - `account_id?: string`\n - `approval?: 'approved' | 'rejected'`\n - `comment?: string`\n - `created_at?: string`\n - `metadata?: object`\n - `object?: 'span.assessment'`\n - `overwrite?: object`\n - `rating?: number`\n - `rubric?: object`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst spanAssessment = await client.spanAssessments.create({\n assessment_type: 'comment',\n span_id: 'span_id',\n trace_id: 'trace_id',\n});\n\nconsole.log(spanAssessment);\n```", perLanguage: { go: { method: 'client.SpanAssessments.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tspanAssessment, err := client.SpanAssessments.New(context.TODO(), sgpdev.SpanAssessmentNewParams{\n\t\tAssessmentType: sgpdev.AssessmentTypeComment,\n\t\tSpanID: "span_id",\n\t\tTraceID: "trace_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", spanAssessment.AssessmentID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/span-assessments \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "assessment_type": "comment",\n "span_id": "span_id",\n "trace_id": "trace_id"\n }\'', }, python: { method: 'span_assessments.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nspan_assessment = client.span_assessments.create(\n assessment_type="comment",\n span_id="span_id",\n trace_id="trace_id",\n)\nprint(span_assessment.assessment_id)', }, typescript: { method: 'client.spanAssessments.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst spanAssessment = await client.spanAssessments.create({\n assessment_type: 'comment',\n span_id: 'span_id',\n trace_id: 'trace_id',\n});\n\nconsole.log(spanAssessment.assessment_id);", }, }, }, { name: 'retrieve', endpoint: '/v5/span-assessments/{span_assessment_id}', httpMethod: 'get', summary: 'Get Span Assessment', description: 'Get an assessment by ID', stainlessPath: '(resource) span_assessments > (method) retrieve', qualified: 'client.spanAssessments.retrieve', params: ['span_assessment_id: string;'], response: "{ assessment_id: string; assessment_type: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite'; created_by: string; span_id: string; trace_id: string; account_id?: string; approval?: 'approved' | 'rejected'; comment?: string; created_at?: string; metadata?: object; object?: 'span.assessment'; overwrite?: object; rating?: number; rubric?: object; updated_at?: string; }", markdown: "## retrieve\n\n`client.spanAssessments.retrieve(span_assessment_id: string): { assessment_id: string; assessment_type: assessment_type; created_by: string; span_id: string; trace_id: string; account_id?: string; approval?: approval_status; comment?: string; created_at?: string; metadata?: object; object?: 'span.assessment'; overwrite?: object; rating?: number; rubric?: object; updated_at?: string; }`\n\n**get** `/v5/span-assessments/{span_assessment_id}`\n\nGet an assessment by ID\n\n### Parameters\n\n- `span_assessment_id: string`\n\n### Returns\n\n- `{ assessment_id: string; assessment_type: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite'; created_by: string; span_id: string; trace_id: string; account_id?: string; approval?: 'approved' | 'rejected'; comment?: string; created_at?: string; metadata?: object; object?: 'span.assessment'; overwrite?: object; rating?: number; rubric?: object; updated_at?: string; }`\n Response model for span assessment\n\n - `assessment_id: string`\n - `assessment_type: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite'`\n - `created_by: string`\n - `span_id: string`\n - `trace_id: string`\n - `account_id?: string`\n - `approval?: 'approved' | 'rejected'`\n - `comment?: string`\n - `created_at?: string`\n - `metadata?: object`\n - `object?: 'span.assessment'`\n - `overwrite?: object`\n - `rating?: number`\n - `rubric?: object`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst spanAssessment = await client.spanAssessments.retrieve('span_assessment_id');\n\nconsole.log(spanAssessment);\n```", perLanguage: { go: { method: 'client.SpanAssessments.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tspanAssessment, err := client.SpanAssessments.Get(context.TODO(), "span_assessment_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", spanAssessment.AssessmentID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/span-assessments/$SPAN_ASSESSMENT_ID \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'span_assessments.retrieve', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nspan_assessment = client.span_assessments.retrieve(\n "span_assessment_id",\n)\nprint(span_assessment.assessment_id)', }, typescript: { method: 'client.spanAssessments.retrieve', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst spanAssessment = await client.spanAssessments.retrieve('span_assessment_id');\n\nconsole.log(spanAssessment.assessment_id);", }, }, }, { name: 'list', endpoint: '/v5/span-assessments', httpMethod: 'get', summary: 'List Span Assessments', description: 'Get all assessments for a specific span or trace, optionally filtered by assessment type', stainlessPath: '(resource) span_assessments > (method) list', qualified: 'client.spanAssessments.list', params: [ "assessment_type?: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite';", 'span_id?: string;', 'trace_id?: string;', ], response: "{ assessment_id: string; assessment_type: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite'; created_by: string; span_id: string; trace_id: string; account_id?: string; approval?: 'approved' | 'rejected'; comment?: string; created_at?: string; metadata?: object; object?: 'span.assessment'; overwrite?: object; rating?: number; rubric?: object; updated_at?: string; }", markdown: "## list\n\n`client.spanAssessments.list(assessment_type?: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite', span_id?: string, trace_id?: string): { assessment_id: string; assessment_type: assessment_type; created_by: string; span_id: string; trace_id: string; account_id?: string; approval?: approval_status; comment?: string; created_at?: string; metadata?: object; object?: 'span.assessment'; overwrite?: object; rating?: number; rubric?: object; updated_at?: string; }`\n\n**get** `/v5/span-assessments`\n\nGet all assessments for a specific span or trace, optionally filtered by assessment type\n\n### Parameters\n\n- `assessment_type?: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite'`\n Filter by assessment type\n\n- `span_id?: string`\n Filter by span ID. Either span_id or trace_id must be provided as a query parameter.\n\n- `trace_id?: string`\n Filter by trace ID. Either span_id or trace_id must be provided as a query parameter.\n\n### Returns\n\n- `{ assessment_id: string; assessment_type: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite'; created_by: string; span_id: string; trace_id: string; account_id?: string; approval?: 'approved' | 'rejected'; comment?: string; created_at?: string; metadata?: object; object?: 'span.assessment'; overwrite?: object; rating?: number; rubric?: object; updated_at?: string; }`\n Response model for span assessment\n\n - `assessment_id: string`\n - `assessment_type: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite'`\n - `created_by: string`\n - `span_id: string`\n - `trace_id: string`\n - `account_id?: string`\n - `approval?: 'approved' | 'rejected'`\n - `comment?: string`\n - `created_at?: string`\n - `metadata?: object`\n - `object?: 'span.assessment'`\n - `overwrite?: object`\n - `rating?: number`\n - `rubric?: object`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\n// Automatically fetches more pages as needed.\nfor await (const spanAssessment of client.spanAssessments.list()) {\n console.log(spanAssessment);\n}\n```", perLanguage: { go: { method: 'client.SpanAssessments.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tpage, err := client.SpanAssessments.List(context.TODO(), sgpdev.SpanAssessmentListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/span-assessments \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'span_assessments.list', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\npage = client.span_assessments.list()\npage = page.items[0]\nprint(page.assessment_id)', }, typescript: { method: 'client.spanAssessments.list', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const spanAssessment of client.spanAssessments.list()) {\n console.log(spanAssessment.assessment_id);\n}", }, }, }, { name: 'update', endpoint: '/v5/span-assessments/{span_assessment_id}', httpMethod: 'patch', summary: 'Update Span Assessment', description: 'Update existing assessment (only by the original creator)', stainlessPath: '(resource) span_assessments > (method) update', qualified: 'client.spanAssessments.update', params: [ 'span_assessment_id: string;', "approval?: 'approved' | 'rejected';", "assessment_type?: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite';", 'comment?: string;', 'metadata?: object;', 'overwrite?: object;', 'rating?: number;', 'rubric?: object;', ], response: "{ assessment_id: string; assessment_type: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite'; created_by: string; span_id: string; trace_id: string; account_id?: string; approval?: 'approved' | 'rejected'; comment?: string; created_at?: string; metadata?: object; object?: 'span.assessment'; overwrite?: object; rating?: number; rubric?: object; updated_at?: string; }", markdown: "## update\n\n`client.spanAssessments.update(span_assessment_id: string, approval?: 'approved' | 'rejected', assessment_type?: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite', comment?: string, metadata?: object, overwrite?: object, rating?: number, rubric?: object): { assessment_id: string; assessment_type: assessment_type; created_by: string; span_id: string; trace_id: string; account_id?: string; approval?: approval_status; comment?: string; created_at?: string; metadata?: object; object?: 'span.assessment'; overwrite?: object; rating?: number; rubric?: object; updated_at?: string; }`\n\n**patch** `/v5/span-assessments/{span_assessment_id}`\n\nUpdate existing assessment (only by the original creator)\n\n### Parameters\n\n- `span_assessment_id: string`\n\n- `approval?: 'approved' | 'rejected'`\n Approval status (approved/rejected)\n\n- `assessment_type?: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite'`\n Type of assessment\n\n- `comment?: string`\n Raw text feedback\n\n- `metadata?: object`\n Arbitrary JSON object for additional data\n\n- `overwrite?: object`\n User corrections to span output\n\n- `rating?: number`\n Numerical rating (1-5)\n\n- `rubric?: object`\n Rule key-value pairs for rubric evaluation\n\n### Returns\n\n- `{ assessment_id: string; assessment_type: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite'; created_by: string; span_id: string; trace_id: string; account_id?: string; approval?: 'approved' | 'rejected'; comment?: string; created_at?: string; metadata?: object; object?: 'span.assessment'; overwrite?: object; rating?: number; rubric?: object; updated_at?: string; }`\n Response model for span assessment\n\n - `assessment_id: string`\n - `assessment_type: 'comment' | 'rating' | 'approval' | 'rubric' | 'metadata' | 'overwrite'`\n - `created_by: string`\n - `span_id: string`\n - `trace_id: string`\n - `account_id?: string`\n - `approval?: 'approved' | 'rejected'`\n - `comment?: string`\n - `created_at?: string`\n - `metadata?: object`\n - `object?: 'span.assessment'`\n - `overwrite?: object`\n - `rating?: number`\n - `rubric?: object`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst spanAssessment = await client.spanAssessments.update('span_assessment_id');\n\nconsole.log(spanAssessment);\n```", perLanguage: { go: { method: 'client.SpanAssessments.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tspanAssessment, err := client.SpanAssessments.Update(\n\t\tcontext.TODO(),\n\t\t"span_assessment_id",\n\t\tsgpdev.SpanAssessmentUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", spanAssessment.AssessmentID)\n}\n', }, http: { example: "curl https://api.egp.scale.com/v5/span-assessments/$SPAN_ASSESSMENT_ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"x-api-key: $SGP_API_KEY\" \\\n -d '{}'", }, python: { method: 'span_assessments.update', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nspan_assessment = client.span_assessments.update(\n span_assessment_id="span_assessment_id",\n)\nprint(span_assessment.assessment_id)', }, typescript: { method: 'client.spanAssessments.update', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst spanAssessment = await client.spanAssessments.update('span_assessment_id');\n\nconsole.log(spanAssessment.assessment_id);", }, }, }, { name: 'delete', endpoint: '/v5/span-assessments/{span_assessment_id}', httpMethod: 'delete', summary: 'Delete Span Assessment', description: 'Delete assessment', stainlessPath: '(resource) span_assessments > (method) delete', qualified: 'client.spanAssessments.delete', params: ['span_assessment_id: string;'], response: "{ id: string; deleted: boolean; object?: 'span.assessment'; }", markdown: "## delete\n\n`client.spanAssessments.delete(span_assessment_id: string): { id: string; deleted: boolean; object?: 'span.assessment'; }`\n\n**delete** `/v5/span-assessments/{span_assessment_id}`\n\nDelete assessment\n\n### Parameters\n\n- `span_assessment_id: string`\n\n### Returns\n\n- `{ id: string; deleted: boolean; object?: 'span.assessment'; }`\n\n - `id: string`\n - `deleted: boolean`\n - `object?: 'span.assessment'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst spanAssessment = await client.spanAssessments.delete('span_assessment_id');\n\nconsole.log(spanAssessment);\n```", perLanguage: { go: { method: 'client.SpanAssessments.Delete', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tspanAssessment, err := client.SpanAssessments.Delete(context.TODO(), "span_assessment_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", spanAssessment.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/span-assessments/$SPAN_ASSESSMENT_ID \\\n -X DELETE \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'span_assessments.delete', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nspan_assessment = client.span_assessments.delete(\n "span_assessment_id",\n)\nprint(span_assessment.id)', }, typescript: { method: 'client.spanAssessments.delete', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst spanAssessment = await client.spanAssessments.delete('span_assessment_id');\n\nconsole.log(spanAssessment.id);", }, }, }, { name: 'create', endpoint: '/v5/credentials', httpMethod: 'post', summary: 'Create Credential', description: 'Create a new credential for storing sensitive data like API keys, tokens, or other secrets.', stainlessPath: '(resource) credentials > (method) create', qualified: 'client.credentials.create', params: [ 'name: string;', 'payload: string;', 'type: string;', 'credential_metadata?: object;', 'description?: string;', ], response: '{ id: string; created_at: string; created_by_identity_type: string; created_by_user_id: string; credential_metadata: object; description: string; name: string; type: string; updated_at: string; object?: string; }', markdown: "## create\n\n`client.credentials.create(name: string, payload: string, type: string, credential_metadata?: object, description?: string): { id: string; created_at: string; created_by_identity_type: string; created_by_user_id: string; credential_metadata: object; description: string; name: string; type: string; updated_at: string; object?: string; }`\n\n**post** `/v5/credentials`\n\nCreate a new credential for storing sensitive data like API keys, tokens, or other secrets.\n\n### Parameters\n\n- `name: string`\n User-friendly name for the credential\n\n- `payload: string`\n The credential payload to be encrypted\n\n- `type: string`\n Type of credential: key or json\n\n- `credential_metadata?: object`\n Optional unencrypted credential_metadata\n\n- `description?: string`\n Optional description\n\n### Returns\n\n- `{ id: string; created_at: string; created_by_identity_type: string; created_by_user_id: string; credential_metadata: object; description: string; name: string; type: string; updated_at: string; object?: string; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by_identity_type: string`\n - `created_by_user_id: string`\n - `credential_metadata: object`\n - `description: string`\n - `name: string`\n - `type: string`\n - `updated_at: string`\n - `object?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst credential = await client.credentials.create({\n name: 'x',\n payload: 'x',\n type: 'x',\n});\n\nconsole.log(credential);\n```", perLanguage: { go: { method: 'client.Credentials.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tcredential, err := client.Credentials.New(context.TODO(), sgpdev.CredentialNewParams{\n\t\tName: "x",\n\t\tPayload: "x",\n\t\tType: "x",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", credential.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/credentials \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "name": "x",\n "payload": "x",\n "type": "x"\n }\'', }, python: { method: 'credentials.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\ncredential = client.credentials.create(\n name="x",\n payload="x",\n type="x",\n)\nprint(credential.id)', }, typescript: { method: 'client.credentials.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst credential = await client.credentials.create({\n name: 'x',\n payload: 'x',\n type: 'x',\n});\n\nconsole.log(credential.id);", }, }, }, { name: 'retrieve', endpoint: '/v5/credentials/{credential_id}', httpMethod: 'get', summary: 'Get Credential by ID', description: 'Retrieve a specific credential by its unique identifier.', stainlessPath: '(resource) credentials > (method) retrieve', qualified: 'client.credentials.retrieve', params: ['credential_id: string;'], response: '{ id: string; created_at: string; created_by_identity_type: string; created_by_user_id: string; credential_metadata: object; description: string; name: string; type: string; updated_at: string; object?: string; }', markdown: "## retrieve\n\n`client.credentials.retrieve(credential_id: string): { id: string; created_at: string; created_by_identity_type: string; created_by_user_id: string; credential_metadata: object; description: string; name: string; type: string; updated_at: string; object?: string; }`\n\n**get** `/v5/credentials/{credential_id}`\n\nRetrieve a specific credential by its unique identifier.\n\n### Parameters\n\n- `credential_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by_identity_type: string; created_by_user_id: string; credential_metadata: object; description: string; name: string; type: string; updated_at: string; object?: string; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by_identity_type: string`\n - `created_by_user_id: string`\n - `credential_metadata: object`\n - `description: string`\n - `name: string`\n - `type: string`\n - `updated_at: string`\n - `object?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst credential = await client.credentials.retrieve('credential_id');\n\nconsole.log(credential);\n```", perLanguage: { go: { method: 'client.Credentials.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tcredential, err := client.Credentials.Get(context.TODO(), "credential_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", credential.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/credentials/$CREDENTIAL_ID \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'credentials.retrieve', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\ncredential = client.credentials.retrieve(\n "credential_id",\n)\nprint(credential.id)', }, typescript: { method: 'client.credentials.retrieve', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst credential = await client.credentials.retrieve('credential_id');\n\nconsole.log(credential.id);", }, }, }, { name: 'retrieve_by_name', endpoint: '/v5/credentials/name/{credential_name}', httpMethod: 'get', summary: 'Get Credential by Name', description: 'Retrieve a specific credential by its name.', stainlessPath: '(resource) credentials > (method) retrieve_by_name', qualified: 'client.credentials.retrieveByName', params: ['credential_name: string;'], response: '{ id: string; created_at: string; created_by_identity_type: string; created_by_user_id: string; credential_metadata: object; description: string; name: string; type: string; updated_at: string; object?: string; }', markdown: "## retrieve_by_name\n\n`client.credentials.retrieveByName(credential_name: string): { id: string; created_at: string; created_by_identity_type: string; created_by_user_id: string; credential_metadata: object; description: string; name: string; type: string; updated_at: string; object?: string; }`\n\n**get** `/v5/credentials/name/{credential_name}`\n\nRetrieve a specific credential by its name.\n\n### Parameters\n\n- `credential_name: string`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by_identity_type: string; created_by_user_id: string; credential_metadata: object; description: string; name: string; type: string; updated_at: string; object?: string; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by_identity_type: string`\n - `created_by_user_id: string`\n - `credential_metadata: object`\n - `description: string`\n - `name: string`\n - `type: string`\n - `updated_at: string`\n - `object?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst credential = await client.credentials.retrieveByName('credential_name');\n\nconsole.log(credential);\n```", perLanguage: { go: { method: 'client.Credentials.GetByName', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tcredential, err := client.Credentials.GetByName(context.TODO(), "credential_name")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", credential.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/credentials/name/$CREDENTIAL_NAME \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'credentials.retrieve_by_name', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\ncredential = client.credentials.retrieve_by_name(\n "credential_name",\n)\nprint(credential.id)', }, typescript: { method: 'client.credentials.retrieveByName', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst credential = await client.credentials.retrieveByName('credential_name');\n\nconsole.log(credential.id);", }, }, }, { name: 'decrypt', endpoint: '/v5/credentials/{credential_id}/secret', httpMethod: 'post', summary: 'Get Credential Secret by ID', description: 'Retrieve the plaintext payload of a credential by its ID.', stainlessPath: '(resource) credentials > (method) decrypt', qualified: 'client.credentials.decrypt', params: ['credential_id: string;'], response: '{ result: string; object?: string; }', markdown: "## decrypt\n\n`client.credentials.decrypt(credential_id: string): { result: string; object?: string; }`\n\n**post** `/v5/credentials/{credential_id}/secret`\n\nRetrieve the plaintext payload of a credential by its ID.\n\n### Parameters\n\n- `credential_id: string`\n\n### Returns\n\n- `{ result: string; object?: string; }`\n\n - `result: string`\n - `object?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst credentialSecret = await client.credentials.decrypt('credential_id');\n\nconsole.log(credentialSecret);\n```", perLanguage: { go: { method: 'client.Credentials.Decrypt', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tcredentialSecret, err := client.Credentials.Decrypt(context.TODO(), "credential_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", credentialSecret.Result)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/credentials/$CREDENTIAL_ID/secret \\\n -X POST \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'credentials.decrypt', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\ncredential_secret = client.credentials.decrypt(\n "credential_id",\n)\nprint(credential_secret.result)', }, typescript: { method: 'client.credentials.decrypt', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst credentialSecret = await client.credentials.decrypt('credential_id');\n\nconsole.log(credentialSecret.result);", }, }, }, { name: 'decrypt_by_name', endpoint: '/v5/credentials/name/{credential_name}/secret', httpMethod: 'post', summary: 'Get Credential Secret by Name', description: 'Retrieve the plaintext payload of a credential by its name.', stainlessPath: '(resource) credentials > (method) decrypt_by_name', qualified: 'client.credentials.decryptByName', params: ['credential_name: string;'], response: '{ result: string; object?: string; }', markdown: "## decrypt_by_name\n\n`client.credentials.decryptByName(credential_name: string): { result: string; object?: string; }`\n\n**post** `/v5/credentials/name/{credential_name}/secret`\n\nRetrieve the plaintext payload of a credential by its name.\n\n### Parameters\n\n- `credential_name: string`\n\n### Returns\n\n- `{ result: string; object?: string; }`\n\n - `result: string`\n - `object?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst credentialSecret = await client.credentials.decryptByName('credential_name');\n\nconsole.log(credentialSecret);\n```", perLanguage: { go: { method: 'client.Credentials.DecryptByName', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tcredentialSecret, err := client.Credentials.DecryptByName(context.TODO(), "credential_name")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", credentialSecret.Result)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/credentials/name/$CREDENTIAL_NAME/secret \\\n -X POST \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'credentials.decrypt_by_name', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\ncredential_secret = client.credentials.decrypt_by_name(\n "credential_name",\n)\nprint(credential_secret.result)', }, typescript: { method: 'client.credentials.decryptByName', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst credentialSecret = await client.credentials.decryptByName('credential_name');\n\nconsole.log(credentialSecret.result);", }, }, }, { name: 'list', endpoint: '/v5/credentials', httpMethod: 'get', summary: 'List Credentials', description: 'Retrieve a paginated list of all credentials for the current account with optional name filtering.', stainlessPath: '(resource) credentials > (method) list', qualified: 'client.credentials.list', params: [ 'cursor?: string;', 'ending_before?: string;', 'limit?: number;', 'name?: string;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', ], response: '{ id: string; created_at: string; created_by_identity_type: string; created_by_user_id: string; credential_metadata: object; description: string; name: string; type: string; updated_at: string; object?: string; }', markdown: "## list\n\n`client.credentials.list(cursor?: string, ending_before?: string, limit?: number, name?: string, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string): { id: string; created_at: string; created_by_identity_type: string; created_by_user_id: string; credential_metadata: object; description: string; name: string; type: string; updated_at: string; object?: string; }`\n\n**get** `/v5/credentials`\n\nRetrieve a paginated list of all credentials for the current account with optional name filtering.\n\n### Parameters\n\n- `cursor?: string`\n\n- `ending_before?: string`\n\n- `limit?: number`\n\n- `name?: string`\n Filter credentials by name\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n### Returns\n\n- `{ id: string; created_at: string; created_by_identity_type: string; created_by_user_id: string; credential_metadata: object; description: string; name: string; type: string; updated_at: string; object?: string; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by_identity_type: string`\n - `created_by_user_id: string`\n - `credential_metadata: object`\n - `description: string`\n - `name: string`\n - `type: string`\n - `updated_at: string`\n - `object?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\n// Automatically fetches more pages as needed.\nfor await (const credential of client.credentials.list()) {\n console.log(credential);\n}\n```", perLanguage: { go: { method: 'client.Credentials.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tpage, err := client.Credentials.List(context.TODO(), sgpdev.CredentialListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/credentials \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'credentials.list', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\npage = client.credentials.list()\npage = page.items[0]\nprint(page.id)', }, typescript: { method: 'client.credentials.list', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const credential of client.credentials.list()) {\n console.log(credential.id);\n}", }, }, }, { name: 'update', endpoint: '/v5/credentials/{credential_id}', httpMethod: 'patch', summary: 'Update Credential', description: "Update an existing credential's properties including name, description, type, payload, and metadata.", stainlessPath: '(resource) credentials > (method) update', qualified: 'client.credentials.update', params: [ 'credential_id: string;', 'credential_metadata?: object;', 'description?: string;', 'name?: string;', 'payload?: string;', 'type?: string;', ], response: '{ id: string; created_at: string; created_by_identity_type: string; created_by_user_id: string; credential_metadata: object; description: string; name: string; type: string; updated_at: string; object?: string; }', markdown: "## update\n\n`client.credentials.update(credential_id: string, credential_metadata?: object, description?: string, name?: string, payload?: string, type?: string): { id: string; created_at: string; created_by_identity_type: string; created_by_user_id: string; credential_metadata: object; description: string; name: string; type: string; updated_at: string; object?: string; }`\n\n**patch** `/v5/credentials/{credential_id}`\n\nUpdate an existing credential's properties including name, description, type, payload, and metadata.\n\n### Parameters\n\n- `credential_id: string`\n\n- `credential_metadata?: object`\n Optional unencrypted credential_metadata\n\n- `description?: string`\n Optional description\n\n- `name?: string`\n User-friendly name for the credential\n\n- `payload?: string`\n The credential payload to be encrypted\n\n- `type?: string`\n Type of credential: key or json\n\n### Returns\n\n- `{ id: string; created_at: string; created_by_identity_type: string; created_by_user_id: string; credential_metadata: object; description: string; name: string; type: string; updated_at: string; object?: string; }`\n\n - `id: string`\n - `created_at: string`\n - `created_by_identity_type: string`\n - `created_by_user_id: string`\n - `credential_metadata: object`\n - `description: string`\n - `name: string`\n - `type: string`\n - `updated_at: string`\n - `object?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst credential = await client.credentials.update('credential_id');\n\nconsole.log(credential);\n```", perLanguage: { go: { method: 'client.Credentials.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tcredential, err := client.Credentials.Update(\n\t\tcontext.TODO(),\n\t\t"credential_id",\n\t\tsgpdev.CredentialUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", credential.ID)\n}\n', }, http: { example: "curl https://api.egp.scale.com/v5/credentials/$CREDENTIAL_ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"x-api-key: $SGP_API_KEY\" \\\n -d '{}'", }, python: { method: 'credentials.update', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\ncredential = client.credentials.update(\n credential_id="credential_id",\n)\nprint(credential.id)', }, typescript: { method: 'client.credentials.update', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst credential = await client.credentials.update('credential_id');\n\nconsole.log(credential.id);", }, }, }, { name: 'delete', endpoint: '/v5/credentials/{credential_id}', httpMethod: 'delete', summary: 'Delete Credential', description: 'Permanently delete a credential and all its associated data.', stainlessPath: '(resource) credentials > (method) delete', qualified: 'client.credentials.delete', params: ['credential_id: string;'], response: '{ id: string; deleted: boolean; object?: string; }', markdown: "## delete\n\n`client.credentials.delete(credential_id: string): { id: string; deleted: boolean; object?: string; }`\n\n**delete** `/v5/credentials/{credential_id}`\n\nPermanently delete a credential and all its associated data.\n\n### Parameters\n\n- `credential_id: string`\n\n### Returns\n\n- `{ id: string; deleted: boolean; object?: string; }`\n\n - `id: string`\n - `deleted: boolean`\n - `object?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst credential = await client.credentials.delete('credential_id');\n\nconsole.log(credential);\n```", perLanguage: { go: { method: 'client.Credentials.Delete', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tcredential, err := client.Credentials.Delete(context.TODO(), "credential_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", credential.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/credentials/$CREDENTIAL_ID \\\n -X DELETE \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'credentials.delete', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\ncredential = client.credentials.delete(\n "credential_id",\n)\nprint(credential.id)', }, typescript: { method: 'client.credentials.delete', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst credential = await client.credentials.delete('credential_id');\n\nconsole.log(credential.id);", }, }, }, { name: 'create', endpoint: '/v5/builds', httpMethod: 'post', summary: 'Submit Build', description: 'Submit a container image build.\n\nUpload a tar.gz archive containing the build context (Dockerfile and any files\nneeded for the build) along with image name, tag, and optional build arguments.\n\nMaximum file size: 500MB', stainlessPath: '(resource) build > (method) create', qualified: 'client.build.create', params: [ 'agent_name: string;', 'context_archive: string;', 'image_name: string;', 'build_args?: string;', 'image_tag?: string;', ], response: "{ id: string; account_id: string; agent_name: string; build_status: string; cloud_provider_build_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; image_name: string; image_tag: string; build_end_time?: string; build_start_time?: string; image_url?: string; object?: 'agentex_cloud_build'; }", markdown: "## create\n\n`client.build.create(agent_name: string, context_archive: string, image_name: string, build_args?: string, image_tag?: string): { id: string; account_id: string; agent_name: string; build_status: string; cloud_provider_build_id: string; created_at: string; created_by: identity; image_name: string; image_tag: string; build_end_time?: string; build_start_time?: string; image_url?: string; object?: 'agentex_cloud_build'; }`\n\n**post** `/v5/builds`\n\nSubmit a container image build.\n\nUpload a tar.gz archive containing the build context (Dockerfile and any files\nneeded for the build) along with image name, tag, and optional build arguments.\n\nMaximum file size: 500MB\n\n### Parameters\n\n- `agent_name: string`\n Name of the agent that this build belongs to\n\n- `context_archive: string`\n tar.gz archive containing the build context (Dockerfile and any files needed for the build)\n\n- `image_name: string`\n Name for the built image\n\n- `build_args?: string`\n JSON string of build arguments\n\n- `image_tag?: string`\n Tag for the built image\n\n### Returns\n\n- `{ id: string; account_id: string; agent_name: string; build_status: string; cloud_provider_build_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; image_name: string; image_tag: string; build_end_time?: string; build_start_time?: string; image_url?: string; object?: 'agentex_cloud_build'; }`\n\n - `id: string`\n - `account_id: string`\n - `agent_name: string`\n - `build_status: string`\n - `cloud_provider_build_id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `image_name: string`\n - `image_tag: string`\n - `build_end_time?: string`\n - `build_start_time?: string`\n - `image_url?: string`\n - `object?: 'agentex_cloud_build'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst agentexCloudBuild = await client.build.create({\n agent_name: 'agent_name',\n context_archive: fs.createReadStream('path/to/file'),\n image_name: 'image_name',\n});\n\nconsole.log(agentexCloudBuild);\n```", perLanguage: { go: { method: 'client.Build.New', example: 'package main\n\nimport (\n\t"bytes"\n\t"context"\n\t"fmt"\n\t"io"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tagentexCloudBuild, err := client.Build.New(context.TODO(), sgpdev.BuildNewParams{\n\t\tAgentName: "agent_name",\n\t\tContextArchive: io.Reader(bytes.NewBuffer([]byte("Example data"))),\n\t\tImageName: "image_name",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", agentexCloudBuild.ID)\n}\n', }, http: { example: "curl https://api.egp.scale.com/v5/builds \\\n -H 'Content-Type: multipart/form-data' \\\n -H \"x-api-key: $SGP_API_KEY\" \\\n -F agent_name=agent_name \\\n -F 'context_archive=@/path/to/context_archive' \\\n -F image_name=image_name", }, python: { method: 'build.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nagentex_cloud_build = client.build.create(\n agent_name="agent_name",\n context_archive=b"Example data",\n image_name="image_name",\n)\nprint(agentex_cloud_build.id)', }, typescript: { method: 'client.build.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentexCloudBuild = await client.build.create({\n agent_name: 'agent_name',\n context_archive: fs.createReadStream('path/to/file'),\n image_name: 'image_name',\n});\n\nconsole.log(agentexCloudBuild.id);", }, }, }, { name: 'retrieve', endpoint: '/v5/builds/{build_id}', httpMethod: 'get', summary: 'Get Build', description: 'Get a build by ID, including current status from the cloud provider.', stainlessPath: '(resource) build > (method) retrieve', qualified: 'client.build.retrieve', params: ['build_id: string;'], response: "{ id: string; account_id: string; agent_name: string; build_status: string; cloud_provider_build_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; image_name: string; image_tag: string; build_end_time?: string; build_start_time?: string; image_url?: string; object?: 'agentex_cloud_build'; }", markdown: "## retrieve\n\n`client.build.retrieve(build_id: string): { id: string; account_id: string; agent_name: string; build_status: string; cloud_provider_build_id: string; created_at: string; created_by: identity; image_name: string; image_tag: string; build_end_time?: string; build_start_time?: string; image_url?: string; object?: 'agentex_cloud_build'; }`\n\n**get** `/v5/builds/{build_id}`\n\nGet a build by ID, including current status from the cloud provider.\n\n### Parameters\n\n- `build_id: string`\n\n### Returns\n\n- `{ id: string; account_id: string; agent_name: string; build_status: string; cloud_provider_build_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; image_name: string; image_tag: string; build_end_time?: string; build_start_time?: string; image_url?: string; object?: 'agentex_cloud_build'; }`\n\n - `id: string`\n - `account_id: string`\n - `agent_name: string`\n - `build_status: string`\n - `cloud_provider_build_id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `image_name: string`\n - `image_tag: string`\n - `build_end_time?: string`\n - `build_start_time?: string`\n - `image_url?: string`\n - `object?: 'agentex_cloud_build'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst agentexCloudBuild = await client.build.retrieve('build_id');\n\nconsole.log(agentexCloudBuild);\n```", perLanguage: { go: { method: 'client.Build.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tagentexCloudBuild, err := client.Build.Get(context.TODO(), "build_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", agentexCloudBuild.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/builds/$BUILD_ID \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'build.retrieve', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nagentex_cloud_build = client.build.retrieve(\n "build_id",\n)\nprint(agentex_cloud_build.id)', }, typescript: { method: 'client.build.retrieve', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentexCloudBuild = await client.build.retrieve('build_id');\n\nconsole.log(agentexCloudBuild.id);", }, }, }, { name: 'list', endpoint: '/v5/builds', httpMethod: 'get', summary: 'List Builds', description: 'List Builds', stainlessPath: '(resource) build > (method) list', qualified: 'client.build.list', params: [ 'agent_name?: string;', 'cursor?: string;', 'ending_before?: string;', 'limit?: number;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', ], response: "{ id: string; account_id: string; agent_name: string; build_status: string; cloud_provider_build_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; image_name: string; image_tag: string; build_end_time?: string; build_start_time?: string; image_url?: string; object?: 'agentex_cloud_build'; }", markdown: "## list\n\n`client.build.list(agent_name?: string, cursor?: string, ending_before?: string, limit?: number, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string): { id: string; account_id: string; agent_name: string; build_status: string; cloud_provider_build_id: string; created_at: string; created_by: identity; image_name: string; image_tag: string; build_end_time?: string; build_start_time?: string; image_url?: string; object?: 'agentex_cloud_build'; }`\n\n**get** `/v5/builds`\n\nList Builds\n\n### Parameters\n\n- `agent_name?: string`\n Filter builds by agent name\n\n- `cursor?: string`\n\n- `ending_before?: string`\n\n- `limit?: number`\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n### Returns\n\n- `{ id: string; account_id: string; agent_name: string; build_status: string; cloud_provider_build_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; image_name: string; image_tag: string; build_end_time?: string; build_start_time?: string; image_url?: string; object?: 'agentex_cloud_build'; }`\n\n - `id: string`\n - `account_id: string`\n - `agent_name: string`\n - `build_status: string`\n - `cloud_provider_build_id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `image_name: string`\n - `image_tag: string`\n - `build_end_time?: string`\n - `build_start_time?: string`\n - `image_url?: string`\n - `object?: 'agentex_cloud_build'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\n// Automatically fetches more pages as needed.\nfor await (const agentexCloudBuild of client.build.list()) {\n console.log(agentexCloudBuild);\n}\n```", perLanguage: { go: { method: 'client.Build.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tpage, err := client.Build.List(context.TODO(), sgpdev.BuildListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/builds \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'build.list', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\npage = client.build.list()\npage = page.items[0]\nprint(page.id)', }, typescript: { method: 'client.build.list', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const agentexCloudBuild of client.build.list()) {\n console.log(agentexCloudBuild.id);\n}", }, }, }, { name: 'logs', endpoint: '/v5/builds/{build_id}/logs', httpMethod: 'get', summary: 'Stream Build Logs', description: 'Stream build logs via Server-Sent Events (SSE).\n\nReturns a streaming response with content-type text/event-stream.\nEach log line is sent as an SSE data event.', stainlessPath: '(resource) build > (method) logs', qualified: 'client.build.logs', params: ['build_id: string;'], response: '{ line: string; }', markdown: "## logs\n\n`client.build.logs(build_id: string): { line: string; }`\n\n**get** `/v5/builds/{build_id}/logs`\n\nStream build logs via Server-Sent Events (SSE).\n\nReturns a streaming response with content-type text/event-stream.\nEach log line is sent as an SSE data event.\n\n### Parameters\n\n- `build_id: string`\n\n### Returns\n\n- `{ line: string; }`\n A single log line from the build process.\n\n - `line: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst stream = await client.build.logs('build_id');\nfor await (const streamChunk of stream) {\n console.log(streamChunk);\n}\n```", perLanguage: { go: { method: 'client.Build.Logs', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tstream := client.Build.LogsStreaming(context.TODO(), "build_id")\n\tfor stream.Next() {\n\t\tfmt.Printf("%+v\\n", stream.Current())\n\t}\n\terr := stream.Err()\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/builds/$BUILD_ID/logs \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'build.logs', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nfor build in client.build.logs(\n "build_id",\n):\n print(build)', }, typescript: { method: 'client.build.logs', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst streamChunk = await client.build.logs('build_id');\n\nconsole.log(streamChunk.line);", }, }, }, { name: 'cancel', endpoint: '/v5/builds/{build_id}/cancel', httpMethod: 'post', summary: 'Cancel Build', description: 'Cancel a pending or running build.\n\nReturns 202 Accepted — the actual cancellation happens asynchronously\nvia a Temporal workflow.', stainlessPath: '(resource) build > (method) cancel', qualified: 'client.build.cancel', params: ['build_id: string;'], response: "{ id: string; account_id: string; agent_name: string; build_status: string; cloud_provider_build_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; image_name: string; image_tag: string; build_end_time?: string; build_start_time?: string; image_url?: string; object?: 'agentex_cloud_build'; }", markdown: "## cancel\n\n`client.build.cancel(build_id: string): { id: string; account_id: string; agent_name: string; build_status: string; cloud_provider_build_id: string; created_at: string; created_by: identity; image_name: string; image_tag: string; build_end_time?: string; build_start_time?: string; image_url?: string; object?: 'agentex_cloud_build'; }`\n\n**post** `/v5/builds/{build_id}/cancel`\n\nCancel a pending or running build.\n\nReturns 202 Accepted — the actual cancellation happens asynchronously\nvia a Temporal workflow.\n\n### Parameters\n\n- `build_id: string`\n\n### Returns\n\n- `{ id: string; account_id: string; agent_name: string; build_status: string; cloud_provider_build_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; image_name: string; image_tag: string; build_end_time?: string; build_start_time?: string; image_url?: string; object?: 'agentex_cloud_build'; }`\n\n - `id: string`\n - `account_id: string`\n - `agent_name: string`\n - `build_status: string`\n - `cloud_provider_build_id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `image_name: string`\n - `image_tag: string`\n - `build_end_time?: string`\n - `build_start_time?: string`\n - `image_url?: string`\n - `object?: 'agentex_cloud_build'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst agentexCloudBuild = await client.build.cancel('build_id');\n\nconsole.log(agentexCloudBuild);\n```", perLanguage: { go: { method: 'client.Build.Cancel', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tagentexCloudBuild, err := client.Build.Cancel(context.TODO(), "build_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", agentexCloudBuild.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/builds/$BUILD_ID/cancel \\\n -X POST \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'build.cancel', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nagentex_cloud_build = client.build.cancel(\n "build_id",\n)\nprint(agentex_cloud_build.id)', }, typescript: { method: 'client.build.cancel', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentexCloudBuild = await client.build.cancel('build_id');\n\nconsole.log(agentexCloudBuild.id);", }, }, }, { name: 'create', endpoint: '/v5/agentex/deployments', httpMethod: 'post', summary: 'Create Deployment', description: 'Create a new deployment.\n\nSubmits a deployment request. The deployment will:\n1. Parse and merge configuration files\n2. Create a Kubernetes Job running helm install\n3. Wait for deployment completion\n4. Return results', stainlessPath: '(resource) deploy > (method) create', qualified: 'client.deploy.create', params: [ 'environment_config: string;', 'manifest_file: string;', 'build_id?: string;', 'image_name?: string;', 'image_tag?: string;', 'preview?: boolean;', ], response: "{ id: string; account_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; environment_config: string; manifest_file: string; namespace: string; status: string; build_id?: string; deploy_events?: { message?: string; reason?: string; timestamp?: string; type?: string; }[]; helm_release_name?: string; object?: 'agentex_cloud_deploy'; }", markdown: "## create\n\n`client.deploy.create(environment_config: string, manifest_file: string, build_id?: string, image_name?: string, image_tag?: string, preview?: boolean): { id: string; account_id: string; created_at: string; created_by: identity; environment_config: string; manifest_file: string; namespace: string; status: string; build_id?: string; deploy_events?: agentex_cloud_deploy_event[]; helm_release_name?: string; object?: 'agentex_cloud_deploy'; }`\n\n**post** `/v5/agentex/deployments`\n\nCreate a new deployment.\n\nSubmits a deployment request. The deployment will:\n1. Parse and merge configuration files\n2. Create a Kubernetes Job running helm install\n3. Wait for deployment completion\n4. Return results\n\n### Parameters\n\n- `environment_config: string`\n\n- `manifest_file: string`\n\n- `build_id?: string`\n The build_id of the cloud build. Required if image_name and image_tag are not provided.\n\n- `image_name?: string`\n Name of the image to deploy. Required if build_id is not provided.\n\n- `image_tag?: string`\n Tag of the image to deploy. Required if build_id is not provided.\n\n- `preview?: boolean`\n When True, creates a preview deployment with a unique slug appended to the helm release name.\n\n### Returns\n\n- `{ id: string; account_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; environment_config: string; manifest_file: string; namespace: string; status: string; build_id?: string; deploy_events?: { message?: string; reason?: string; timestamp?: string; type?: string; }[]; helm_release_name?: string; object?: 'agentex_cloud_deploy'; }`\n\n - `id: string`\n - `account_id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `environment_config: string`\n - `manifest_file: string`\n - `namespace: string`\n - `status: string`\n - `build_id?: string`\n - `deploy_events?: { message?: string; reason?: string; timestamp?: string; type?: string; }[]`\n - `helm_release_name?: string`\n - `object?: 'agentex_cloud_deploy'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst agentexCloudDeploy = await client.deploy.create({ environment_config: 'environment_config', manifest_file: 'manifest_file' });\n\nconsole.log(agentexCloudDeploy);\n```", perLanguage: { go: { method: 'client.Deploy.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tagentexCloudDeploy, err := client.Deploy.New(context.TODO(), sgpdev.DeployNewParams{\n\t\tEnvironmentConfig: "environment_config",\n\t\tManifestFile: "manifest_file",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", agentexCloudDeploy.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/agentex/deployments \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "environment_config": "environment_config",\n "manifest_file": "manifest_file"\n }\'', }, python: { method: 'deploy.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nagentex_cloud_deploy = client.deploy.create(\n environment_config="environment_config",\n manifest_file="manifest_file",\n)\nprint(agentex_cloud_deploy.id)', }, typescript: { method: 'client.deploy.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentexCloudDeploy = await client.deploy.create({\n environment_config: 'environment_config',\n manifest_file: 'manifest_file',\n});\n\nconsole.log(agentexCloudDeploy.id);", }, }, }, { name: 'retrieve', endpoint: '/v5/agentex/deployments/{deployment_id}', httpMethod: 'get', summary: 'Get Deployment', description: 'Get a deployment by its ID.', stainlessPath: '(resource) deploy > (method) retrieve', qualified: 'client.deploy.retrieve', params: ['deployment_id: string;'], response: "{ id: string; account_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; environment_config: string; manifest_file: string; namespace: string; status: string; build_id?: string; deploy_events?: { message?: string; reason?: string; timestamp?: string; type?: string; }[]; helm_release_name?: string; object?: 'agentex_cloud_deploy'; }", markdown: "## retrieve\n\n`client.deploy.retrieve(deployment_id: string): { id: string; account_id: string; created_at: string; created_by: identity; environment_config: string; manifest_file: string; namespace: string; status: string; build_id?: string; deploy_events?: agentex_cloud_deploy_event[]; helm_release_name?: string; object?: 'agentex_cloud_deploy'; }`\n\n**get** `/v5/agentex/deployments/{deployment_id}`\n\nGet a deployment by its ID.\n\n### Parameters\n\n- `deployment_id: string`\n\n### Returns\n\n- `{ id: string; account_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; environment_config: string; manifest_file: string; namespace: string; status: string; build_id?: string; deploy_events?: { message?: string; reason?: string; timestamp?: string; type?: string; }[]; helm_release_name?: string; object?: 'agentex_cloud_deploy'; }`\n\n - `id: string`\n - `account_id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `environment_config: string`\n - `manifest_file: string`\n - `namespace: string`\n - `status: string`\n - `build_id?: string`\n - `deploy_events?: { message?: string; reason?: string; timestamp?: string; type?: string; }[]`\n - `helm_release_name?: string`\n - `object?: 'agentex_cloud_deploy'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst agentexCloudDeploy = await client.deploy.retrieve('deployment_id');\n\nconsole.log(agentexCloudDeploy);\n```", perLanguage: { go: { method: 'client.Deploy.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tagentexCloudDeploy, err := client.Deploy.Get(context.TODO(), "deployment_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", agentexCloudDeploy.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/agentex/deployments/$DEPLOYMENT_ID \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'deploy.retrieve', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nagentex_cloud_deploy = client.deploy.retrieve(\n "deployment_id",\n)\nprint(agentex_cloud_deploy.id)', }, typescript: { method: 'client.deploy.retrieve', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentexCloudDeploy = await client.deploy.retrieve('deployment_id');\n\nconsole.log(agentexCloudDeploy.id);", }, }, }, { name: 'list', endpoint: '/v5/agentex/deployments', httpMethod: 'get', summary: 'List Deployments', description: 'List all deployments with pagination and optional filters.', stainlessPath: '(resource) deploy > (method) list', qualified: 'client.deploy.list', params: [ 'agent_name?: string;', 'build_id?: string;', 'cursor?: string;', 'ending_before?: string;', 'limit?: number;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', ], response: "{ id: string; account_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; environment_config: string; manifest_file: string; namespace: string; status: string; build_id?: string; deploy_events?: { message?: string; reason?: string; timestamp?: string; type?: string; }[]; helm_release_name?: string; object?: 'agentex_cloud_deploy'; }", markdown: "## list\n\n`client.deploy.list(agent_name?: string, build_id?: string, cursor?: string, ending_before?: string, limit?: number, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string): { id: string; account_id: string; created_at: string; created_by: identity; environment_config: string; manifest_file: string; namespace: string; status: string; build_id?: string; deploy_events?: agentex_cloud_deploy_event[]; helm_release_name?: string; object?: 'agentex_cloud_deploy'; }`\n\n**get** `/v5/agentex/deployments`\n\nList all deployments with pagination and optional filters.\n\n### Parameters\n\n- `agent_name?: string`\n Filter deployments by agent name (via associated build)\n\n- `build_id?: string`\n Filter deployments by build ID\n\n- `cursor?: string`\n\n- `ending_before?: string`\n\n- `limit?: number`\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n### Returns\n\n- `{ id: string; account_id: string; created_at: string; created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }; environment_config: string; manifest_file: string; namespace: string; status: string; build_id?: string; deploy_events?: { message?: string; reason?: string; timestamp?: string; type?: string; }[]; helm_release_name?: string; object?: 'agentex_cloud_deploy'; }`\n\n - `id: string`\n - `account_id: string`\n - `created_at: string`\n - `created_by: { id: string; type: 'user' | 'service_account'; object?: 'identity'; }`\n - `environment_config: string`\n - `manifest_file: string`\n - `namespace: string`\n - `status: string`\n - `build_id?: string`\n - `deploy_events?: { message?: string; reason?: string; timestamp?: string; type?: string; }[]`\n - `helm_release_name?: string`\n - `object?: 'agentex_cloud_deploy'`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\n// Automatically fetches more pages as needed.\nfor await (const agentexCloudDeploy of client.deploy.list()) {\n console.log(agentexCloudDeploy);\n}\n```", perLanguage: { go: { method: 'client.Deploy.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tpage, err := client.Deploy.List(context.TODO(), sgpdev.DeployListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/agentex/deployments \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'deploy.list', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\npage = client.deploy.list()\npage = page.items[0]\nprint(page.id)', }, typescript: { method: 'client.deploy.list', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const agentexCloudDeploy of client.deploy.list()) {\n console.log(agentexCloudDeploy.id);\n}", }, }, }, { name: 'logs', endpoint: '/v5/agentex/deployments/{deployment_id}/logs', httpMethod: 'get', summary: 'Get Deployment Logs', description: 'Get structured log lines for a deployment with cursor-based pagination.\n\nThe CLI can poll this endpoint to stream logs incrementally:\n1. First call: no cursor\n2. Subsequent calls: cursor=next_cursor from the previous response\n3. Stop polling when the deployment reaches a terminal status', stainlessPath: '(resource) deploy > (method) logs', qualified: 'client.deploy.logs', params: ['deployment_id: string;', 'cursor?: string;', 'limit?: number;'], response: '{ deployment_id: string; has_more: boolean; lines?: { id: string; message: string; log_level?: string; timestamp?: string; }[]; next_cursor?: string; }', markdown: "## logs\n\n`client.deploy.logs(deployment_id: string, cursor?: string, limit?: number): { deployment_id: string; has_more: boolean; lines?: object[]; next_cursor?: string; }`\n\n**get** `/v5/agentex/deployments/{deployment_id}/logs`\n\nGet structured log lines for a deployment with cursor-based pagination.\n\nThe CLI can poll this endpoint to stream logs incrementally:\n1. First call: no cursor\n2. Subsequent calls: cursor=next_cursor from the previous response\n3. Stop polling when the deployment reaches a terminal status\n\n### Parameters\n\n- `deployment_id: string`\n\n- `cursor?: string`\n Cursor from previous response's next_cursor field\n\n- `limit?: number`\n Maximum number of log lines to return\n\n### Returns\n\n- `{ deployment_id: string; has_more: boolean; lines?: { id: string; message: string; log_level?: string; timestamp?: string; }[]; next_cursor?: string; }`\n Response containing structured deployment log lines with cursor-based pagination.\n\nThe CLI can poll this endpoint to stream logs incrementally:\n1. First call: no after_id\n2. Subsequent calls: after_id=next_cursor from previous response\n3. Stop polling when has_more is False and the deployment reaches a terminal status\n\n - `deployment_id: string`\n - `has_more: boolean`\n - `lines?: { id: string; message: string; log_level?: string; timestamp?: string; }[]`\n - `next_cursor?: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst response = await client.deploy.logs('deployment_id');\n\nconsole.log(response);\n```", perLanguage: { go: { method: 'client.Deploy.Logs', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tresponse, err := client.Deploy.Logs(\n\t\tcontext.TODO(),\n\t\t"deployment_id",\n\t\tsgpdev.DeployLogsParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.DeploymentID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/agentex/deployments/$DEPLOYMENT_ID/logs \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'deploy.logs', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.deploy.logs(\n deployment_id="deployment_id",\n)\nprint(response.deployment_id)', }, typescript: { method: 'client.deploy.logs', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.deploy.logs('deployment_id');\n\nconsole.log(response.deployment_id);", }, }, }, { name: 'list', endpoint: '/v5/vector-stores', httpMethod: 'get', summary: 'List Vector Stores', description: 'List all vector stores in your account with pagination.\n\nReturns vector stores sorted by creation date (newest first). Each store includes its configuration,\nembedding model, dimensions, indexed fields, and timestamps.', stainlessPath: '(resource) vector_stores > (method) list', qualified: 'client.vectorStores.list', params: [ 'cursor?: string;', 'ending_before?: string;', 'limit?: number;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', ], response: '{ created_at: string; embedding_dimensions: number; name: string; updated_at: string; embedding_config?: object | object; indexed_metadata_fields?: object; }', markdown: "## list\n\n`client.vectorStores.list(cursor?: string, ending_before?: string, limit?: number, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string): { created_at: string; embedding_dimensions: number; name: string; updated_at: string; embedding_config?: embedding_config; indexed_metadata_fields?: object; }`\n\n**get** `/v5/vector-stores`\n\nList all vector stores in your account with pagination.\n\nReturns vector stores sorted by creation date (newest first). Each store includes its configuration,\nembedding model, dimensions, indexed fields, and timestamps.\n\n### Parameters\n\n- `cursor?: string`\n\n- `ending_before?: string`\n\n- `limit?: number`\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n### Returns\n\n- `{ created_at: string; embedding_dimensions: number; name: string; updated_at: string; embedding_config?: object | object; indexed_metadata_fields?: object; }`\n Response model for vector store operations.\n\n - `created_at: string`\n - `embedding_dimensions: number`\n - `name: string`\n - `updated_at: string`\n - `embedding_config?: { model_deployment_id: string; type: 'models_api'; } | { embedding_model: string; type?: 'base'; }`\n - `indexed_metadata_fields?: object`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\n// Automatically fetches more pages as needed.\nfor await (const vectorStore of client.vectorStores.list()) {\n console.log(vectorStore);\n}\n```", perLanguage: { go: { method: 'client.VectorStores.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tpage, err := client.VectorStores.List(context.TODO(), sgpdev.VectorStoreListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/vector-stores \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'vector_stores.list', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\npage = client.vector_stores.list()\npage = page.items[0]\nprint(page.created_at)', }, typescript: { method: 'client.vectorStores.list', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const vectorStore of client.vectorStores.list()) {\n console.log(vectorStore.created_at);\n}", }, }, }, { name: 'create', endpoint: '/v5/vector-stores/create', httpMethod: 'post', summary: 'Create Vector Store', description: 'Create a new vector store for storing and querying document embeddings.\n\nThe vector store name must be unique within your account and follow naming conventions (3-63 characters,\nalphanumeric with hyphens/underscores). Once created, the embedding configuration and dimensions\nare immutable and cannot be changed. To use a different model, you must create a new vector store.\n\n**Embedding Configuration:** Provide `embedding_config` (for base or custom model deployments),\n`embedding_model` (shorthand for a base model), or `dimensions` only (raw embeddings).\n- With `embedding_config` or `embedding_model`: dimensions are auto-derived, and documents can be\n upserted with text content (auto-embedded) or with pre-computed embeddings.\n- With `dimensions` only: the store accepts only pre-computed embeddings. Semantic/hybrid queries\n are not supported (lexical search only).\n\n**Indexed Fields:** Optionally specify metadata fields to index at creation time. Only indexed fields\ncan be used for filtering -- indexing is required, not just a performance optimization. Additional indexed\nfields can be added later using the configure endpoint, but cannot be removed once added. Keep in mind\nthat each indexed field increases write latency and storage overhead, so only index fields you actively filter on.', stainlessPath: '(resource) vector_stores > (method) create', qualified: 'client.vectorStores.create', params: [ 'name: string;', 'dimensions?: number;', "embedding_config?: { model_deployment_id: string; type: 'models_api'; } | { embedding_model: string; type?: 'base'; };", 'embedding_model?: string;', 'indexed_metadata_fields?: object;', ], response: '{ created_at: string; embedding_dimensions: number; name: string; updated_at: string; embedding_config?: object | object; indexed_metadata_fields?: object; }', markdown: "## create\n\n`client.vectorStores.create(name: string, dimensions?: number, embedding_config?: object | object, embedding_model?: string, indexed_metadata_fields?: object): { created_at: string; embedding_dimensions: number; name: string; updated_at: string; embedding_config?: embedding_config; indexed_metadata_fields?: object; }`\n\n**post** `/v5/vector-stores/create`\n\nCreate a new vector store for storing and querying document embeddings.\n\nThe vector store name must be unique within your account and follow naming conventions (3-63 characters,\nalphanumeric with hyphens/underscores). Once created, the embedding configuration and dimensions\nare immutable and cannot be changed. To use a different model, you must create a new vector store.\n\n**Embedding Configuration:** Provide `embedding_config` (for base or custom model deployments),\n`embedding_model` (shorthand for a base model), or `dimensions` only (raw embeddings).\n- With `embedding_config` or `embedding_model`: dimensions are auto-derived, and documents can be\n upserted with text content (auto-embedded) or with pre-computed embeddings.\n- With `dimensions` only: the store accepts only pre-computed embeddings. Semantic/hybrid queries\n are not supported (lexical search only).\n\n**Indexed Fields:** Optionally specify metadata fields to index at creation time. Only indexed fields\ncan be used for filtering -- indexing is required, not just a performance optimization. Additional indexed\nfields can be added later using the configure endpoint, but cannot be removed once added. Keep in mind\nthat each indexed field increases write latency and storage overhead, so only index fields you actively filter on.\n\n### Parameters\n\n- `name: string`\n A unique name for the vector store within the account\n\n- `dimensions?: number`\n Dimension size of embedding vectors. Required when neither 'embedding_config' nor 'embedding_model' is set. Automatically derived when an embedding model is provided.\n\n- `embedding_config?: { model_deployment_id: string; type: 'models_api'; } | { embedding_model: string; type?: 'base'; }`\n The embedding configuration. Either 'base' type with an embedding_model, or 'models_api' type with a model_deployment_id for custom models.\n\n- `embedding_model?: string`\n The base embedding model to use. Shorthand for embedding_config with type 'base'. Provide either embedding_config or embedding_model, not both.\n\n- `indexed_metadata_fields?: object`\n Dictionary mapping metadata field names to their types for efficient filtering. Only STRING, NUMBER, and BOOLEAN types can be indexed.\n\n### Returns\n\n- `{ created_at: string; embedding_dimensions: number; name: string; updated_at: string; embedding_config?: object | object; indexed_metadata_fields?: object; }`\n Response model for vector store operations.\n\n - `created_at: string`\n - `embedding_dimensions: number`\n - `name: string`\n - `updated_at: string`\n - `embedding_config?: { model_deployment_id: string; type: 'models_api'; } | { embedding_model: string; type?: 'base'; }`\n - `indexed_metadata_fields?: object`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst vectorStore = await client.vectorStores.create({ name: 'name' });\n\nconsole.log(vectorStore);\n```", perLanguage: { go: { method: 'client.VectorStores.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tvectorStore, err := client.VectorStores.New(context.TODO(), sgpdev.VectorStoreNewParams{\n\t\tName: "name",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", vectorStore.CreatedAt)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/vector-stores/create \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "name": "name"\n }\'', }, python: { method: 'vector_stores.create', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nvector_store = client.vector_stores.create(\n name="name",\n)\nprint(vector_store.created_at)', }, typescript: { method: 'client.vectorStores.create', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst vectorStore = await client.vectorStores.create({ name: 'name' });\n\nconsole.log(vectorStore.created_at);", }, }, }, { name: 'retrieve', endpoint: '/v5/vector-stores/{vector_store_name}', httpMethod: 'get', summary: 'Get Vector Store', description: "Retrieve detailed configuration and metadata for a specific vector store.\n\nReturns the store's embedding model, dimensions, indexed metadata field definitions,\ncreation timestamp, and last update timestamp. Use this to verify store settings before\nperforming operations or to display store information in your application.", stainlessPath: '(resource) vector_stores > (method) retrieve', qualified: 'client.vectorStores.retrieve', params: ['vector_store_name: string;'], response: '{ created_at: string; embedding_dimensions: number; name: string; updated_at: string; embedding_config?: object | object; indexed_metadata_fields?: object; }', markdown: "## retrieve\n\n`client.vectorStores.retrieve(vector_store_name: string): { created_at: string; embedding_dimensions: number; name: string; updated_at: string; embedding_config?: embedding_config; indexed_metadata_fields?: object; }`\n\n**get** `/v5/vector-stores/{vector_store_name}`\n\nRetrieve detailed configuration and metadata for a specific vector store.\n\nReturns the store's embedding model, dimensions, indexed metadata field definitions,\ncreation timestamp, and last update timestamp. Use this to verify store settings before\nperforming operations or to display store information in your application.\n\n### Parameters\n\n- `vector_store_name: string`\n The name of the vector store\n\n### Returns\n\n- `{ created_at: string; embedding_dimensions: number; name: string; updated_at: string; embedding_config?: object | object; indexed_metadata_fields?: object; }`\n Response model for vector store operations.\n\n - `created_at: string`\n - `embedding_dimensions: number`\n - `name: string`\n - `updated_at: string`\n - `embedding_config?: { model_deployment_id: string; type: 'models_api'; } | { embedding_model: string; type?: 'base'; }`\n - `indexed_metadata_fields?: object`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst vectorStore = await client.vectorStores.retrieve('vector_store_name');\n\nconsole.log(vectorStore);\n```", perLanguage: { go: { method: 'client.VectorStores.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tvectorStore, err := client.VectorStores.Get(context.TODO(), "vector_store_name")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", vectorStore.CreatedAt)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/vector-stores/$VECTOR_STORE_NAME \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'vector_stores.retrieve', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nvector_store = client.vector_stores.retrieve(\n "vector_store_name",\n)\nprint(vector_store.created_at)', }, typescript: { method: 'client.vectorStores.retrieve', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst vectorStore = await client.vectorStores.retrieve('vector_store_name');\n\nconsole.log(vectorStore.created_at);", }, }, }, { name: 'configure', endpoint: '/v5/vector-stores/{vector_store_name}/configure', httpMethod: 'post', summary: 'Configure Vector Store', description: 'Update the indexed metadata fields configuration for a vector store.\n\nOnly indexed metadata fields can be used for filtering during query, list, and count operations.\nNon-indexed fields cannot be filtered on.\n\n**Field Types:** Only STRING, NUMBER, and BOOLEAN fields can be indexed (maximum 20 fields). OBJECT and LIST\ntypes are stored but cannot be indexed for filtering purposes.\n\n**Adding Fields:** New indexed fields can be added at any time. Existing documents containing those fields\nwill have their metadata automatically indexed.\n\n**Removing Fields:** Indexed fields cannot be removed once added. Each indexed field increases write\nlatency and storage overhead, so only index fields you actively filter on.\n\n**Note:** The `name` and `embedding_config` are immutable after creation.', stainlessPath: '(resource) vector_stores > (method) configure', qualified: 'client.vectorStores.configure', params: ['vector_store_name: string;', 'indexed_metadata_fields: object;'], response: '{ created_at: string; embedding_dimensions: number; name: string; updated_at: string; embedding_config?: object | object; indexed_metadata_fields?: object; }', markdown: "## configure\n\n`client.vectorStores.configure(vector_store_name: string, indexed_metadata_fields: object): { created_at: string; embedding_dimensions: number; name: string; updated_at: string; embedding_config?: embedding_config; indexed_metadata_fields?: object; }`\n\n**post** `/v5/vector-stores/{vector_store_name}/configure`\n\nUpdate the indexed metadata fields configuration for a vector store.\n\nOnly indexed metadata fields can be used for filtering during query, list, and count operations.\nNon-indexed fields cannot be filtered on.\n\n**Field Types:** Only STRING, NUMBER, and BOOLEAN fields can be indexed (maximum 20 fields). OBJECT and LIST\ntypes are stored but cannot be indexed for filtering purposes.\n\n**Adding Fields:** New indexed fields can be added at any time. Existing documents containing those fields\nwill have their metadata automatically indexed.\n\n**Removing Fields:** Indexed fields cannot be removed once added. Each indexed field increases write\nlatency and storage overhead, so only index fields you actively filter on.\n\n**Note:** The `name` and `embedding_config` are immutable after creation.\n\n### Parameters\n\n- `vector_store_name: string`\n The name of the vector store\n\n- `indexed_metadata_fields: object`\n Dictionary mapping metadata field names to their types. Only STRING, NUMBER, and BOOLEAN types can be indexed.\n\n### Returns\n\n- `{ created_at: string; embedding_dimensions: number; name: string; updated_at: string; embedding_config?: object | object; indexed_metadata_fields?: object; }`\n Response model for vector store operations.\n\n - `created_at: string`\n - `embedding_dimensions: number`\n - `name: string`\n - `updated_at: string`\n - `embedding_config?: { model_deployment_id: string; type: 'models_api'; } | { embedding_model: string; type?: 'base'; }`\n - `indexed_metadata_fields?: object`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst vectorStore = await client.vectorStores.configure('vector_store_name', { indexed_metadata_fields: { foo: 'string' } });\n\nconsole.log(vectorStore);\n```", perLanguage: { go: { method: 'client.VectorStores.Configure', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tvectorStore, err := client.VectorStores.Configure(\n\t\tcontext.TODO(),\n\t\t"vector_store_name",\n\t\tsgpdev.VectorStoreConfigureParams{\n\t\t\tIndexedMetadataFields: map[string]string{\n\t\t\t\t"foo": "string",\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", vectorStore.CreatedAt)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/vector-stores/$VECTOR_STORE_NAME/configure \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "indexed_metadata_fields": {\n "foo": "string"\n }\n }\'', }, python: { method: 'vector_stores.configure', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nvector_store = client.vector_stores.configure(\n vector_store_name="vector_store_name",\n indexed_metadata_fields={\n "foo": "string"\n },\n)\nprint(vector_store.created_at)', }, typescript: { method: 'client.vectorStores.configure', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst vectorStore = await client.vectorStores.configure('vector_store_name', {\n indexed_metadata_fields: { foo: 'string' },\n});\n\nconsole.log(vectorStore.created_at);", }, }, }, { name: 'drop', endpoint: '/v5/vector-stores/{vector_store_name}/drop', httpMethod: 'post', summary: 'Drop Vector Store', description: 'Permanently delete a vector store and all its contents.\n\n**⚠️ WARNING:** This is a destructive operation that cannot be undone. All documents, embeddings, metadata,\nand index configurations will be permanently deleted. Data recovery is not possible after deletion.', stainlessPath: '(resource) vector_stores > (method) drop', qualified: 'client.vectorStores.drop', params: ['vector_store_name: string;'], response: '{ name: string; }', markdown: "## drop\n\n`client.vectorStores.drop(vector_store_name: string): { name: string; }`\n\n**post** `/v5/vector-stores/{vector_store_name}/drop`\n\nPermanently delete a vector store and all its contents.\n\n**⚠️ WARNING:** This is a destructive operation that cannot be undone. All documents, embeddings, metadata,\nand index configurations will be permanently deleted. Data recovery is not possible after deletion.\n\n### Parameters\n\n- `vector_store_name: string`\n The name of the vector store\n\n### Returns\n\n- `{ name: string; }`\n Response for vector store deletion.\n\n - `name: string`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst response = await client.vectorStores.drop('vector_store_name');\n\nconsole.log(response);\n```", perLanguage: { go: { method: 'client.VectorStores.Drop', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tresponse, err := client.VectorStores.Drop(context.TODO(), "vector_store_name")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Name)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/vector-stores/$VECTOR_STORE_NAME/drop \\\n -X POST \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'vector_stores.drop', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.vector_stores.drop(\n "vector_store_name",\n)\nprint(response.name)', }, typescript: { method: 'client.vectorStores.drop', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.vectorStores.drop('vector_store_name');\n\nconsole.log(response.name);", }, }, }, { name: 'upsert', endpoint: '/v5/vector-stores/{vector_store_name}/upsert', httpMethod: 'post', summary: 'Upsert Vectors', description: "Insert new documents or update existing documents in a vector store.\n\n**Upsert Behavior:** If a document ID already exists, it will be completely replaced with the new content\nand metadata. The previous document's text, embedding, and all metadata fields are discarded. If the ID\ndoes not exist, a new document is created.\n\n**Document Content:** Each document supports several modes:\n- `content` only: text is automatically embedded using the store's configured model.\n- `embedding` only: pre-computed embedding vector is used directly. Dimension must match the store's configuration.\n- Both `content` and `embedding`: the pre-computed embedding is stored and text is kept for retrieval/search.\n- Neither (metadata-only): only metadata is updated on an existing document without re-embedding.\n If the document does not exist, it will appear as a failure in the batch response.\n\nA store created without an embedding model (dimensions-only) only accepts documents with pre-computed `embedding`.\n\n**Batch Operations:** This endpoint supports batch operations with partial success handling and mixed\ndocument types (some with raw embeddings, some with content) in the same call.\n\n**Metadata:** Supports nested metadata with string, number, boolean, object, and array types. Null values\nare not permitted—omit the field or use an empty string instead.", stainlessPath: '(resource) vector_stores > (method) upsert', qualified: 'client.vectorStores.upsert', params: [ 'vector_store_name: string;', "vectors: { id: string; content?: { text: string; type?: 'text'; }; embedding?: number[]; metadata?: object; }[];", ], response: '{ failure_count: number; success_count: number; failed?: { id: string; error: string; }[]; succeeded?: string[]; }', markdown: "## upsert\n\n`client.vectorStores.upsert(vector_store_name: string, vectors: { id: string; content?: object; embedding?: number[]; metadata?: object; }[]): { failure_count: number; success_count: number; failed?: object[]; succeeded?: string[]; }`\n\n**post** `/v5/vector-stores/{vector_store_name}/upsert`\n\nInsert new documents or update existing documents in a vector store.\n\n**Upsert Behavior:** If a document ID already exists, it will be completely replaced with the new content\nand metadata. The previous document's text, embedding, and all metadata fields are discarded. If the ID\ndoes not exist, a new document is created.\n\n**Document Content:** Each document supports several modes:\n- `content` only: text is automatically embedded using the store's configured model.\n- `embedding` only: pre-computed embedding vector is used directly. Dimension must match the store's configuration.\n- Both `content` and `embedding`: the pre-computed embedding is stored and text is kept for retrieval/search.\n- Neither (metadata-only): only metadata is updated on an existing document without re-embedding.\n If the document does not exist, it will appear as a failure in the batch response.\n\nA store created without an embedding model (dimensions-only) only accepts documents with pre-computed `embedding`.\n\n**Batch Operations:** This endpoint supports batch operations with partial success handling and mixed\ndocument types (some with raw embeddings, some with content) in the same call.\n\n**Metadata:** Supports nested metadata with string, number, boolean, object, and array types. Null values\nare not permitted—omit the field or use an empty string instead.\n\n### Parameters\n\n- `vector_store_name: string`\n The name of the vector store\n\n- `vectors: { id: string; content?: { text: string; type?: 'text'; }; embedding?: number[]; metadata?: object; }[]`\n Array of documents to upsert\n\n### Returns\n\n- `{ failure_count: number; success_count: number; failed?: { id: string; error: string; }[]; succeeded?: string[]; }`\n Response for batch insert/upsert operations.\n\n - `failure_count: number`\n - `success_count: number`\n - `failed?: { id: string; error: string; }[]`\n - `succeeded?: string[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst response = await client.vectorStores.upsert('vector_store_name', { vectors: [{ id: 'id' }] });\n\nconsole.log(response);\n```", perLanguage: { go: { method: 'client.VectorStores.Upsert', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tresponse, err := client.VectorStores.Upsert(\n\t\tcontext.TODO(),\n\t\t"vector_store_name",\n\t\tsgpdev.VectorStoreUpsertParams{\n\t\t\tVectors: []sgpdev.VectorStoreUpsertParamsVector{{\n\t\t\t\tID: "id",\n\t\t\t}},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.FailureCount)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/vector-stores/$VECTOR_STORE_NAME/upsert \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "vectors": [\n {\n "id": "id"\n }\n ]\n }\'', }, python: { method: 'vector_stores.upsert', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.vector_stores.upsert(\n vector_store_name="vector_store_name",\n vectors=[{\n "id": "id"\n }],\n)\nprint(response.failure_count)', }, typescript: { method: 'client.vectorStores.upsert', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.vectorStores.upsert('vector_store_name', { vectors: [{ id: 'id' }] });\n\nconsole.log(response.failure_count);", }, }, }, { name: 'delete', endpoint: '/v5/vector-stores/{vector_store_name}/delete', httpMethod: 'post', summary: 'Delete Vectors', description: 'Delete documents from a vector store by document IDs or metadata filter criteria.\n\n**Delete by IDs:** Provide an array of document IDs to delete specific documents. Non-existent documents\nare silently skipped.\n\n**Delete by Filter:** Use metadata filters to delete all documents matching the specified criteria (e.g.,\ndelete all documents where `status: "archived"`). The filter must specify at least one condition and cannot\nbe empty. To delete all documents, use the drop endpoint instead.\n\n**Filter Operators:** Supports MongoDB-style operators including equality (`{"field": "value"}`),\ncomparison (`$gt`, `$gte`, `$lt`, `$lte`, `$eq`, `$ne`), logical (`$and`, `$or`, `$not`),\nand membership (`$in`, `$nin`). Only indexed metadata fields can be used for filtering.\n\n**Best Practice:** Use the count endpoint with the same filter to preview the number of documents that\nwill be deleted before executing the deletion operation.', stainlessPath: '(resource) vector_stores > (method) delete', qualified: 'client.vectorStores.delete', params: ['vector_store_name: string;', 'filter?: object;', 'ids?: string[];'], response: '{ deleted_count: number; }', markdown: '## delete\n\n`client.vectorStores.delete(vector_store_name: string, filter?: object, ids?: string[]): { deleted_count: number; }`\n\n**post** `/v5/vector-stores/{vector_store_name}/delete`\n\nDelete documents from a vector store by document IDs or metadata filter criteria.\n\n**Delete by IDs:** Provide an array of document IDs to delete specific documents. Non-existent documents\nare silently skipped.\n\n**Delete by Filter:** Use metadata filters to delete all documents matching the specified criteria (e.g.,\ndelete all documents where `status: "archived"`). The filter must specify at least one condition and cannot\nbe empty. To delete all documents, use the drop endpoint instead.\n\n**Filter Operators:** Supports MongoDB-style operators including equality (`{"field": "value"}`),\ncomparison (`$gt`, `$gte`, `$lt`, `$lte`, `$eq`, `$ne`), logical (`$and`, `$or`, `$not`),\nand membership (`$in`, `$nin`). Only indexed metadata fields can be used for filtering.\n\n**Best Practice:** Use the count endpoint with the same filter to preview the number of documents that\nwill be deleted before executing the deletion operation.\n\n### Parameters\n\n- `vector_store_name: string`\n The name of the vector store\n\n- `filter?: object`\n Metadata filter expression for deletion\n\n- `ids?: string[]`\n Array of document IDs to delete\n\n### Returns\n\n- `{ deleted_count: number; }`\n Response for delete operation.\n\n - `deleted_count: number`\n\n### Example\n\n```typescript\nimport SGPClient from \'scale-gp\';\n\nconst client = new SGPClient();\n\nconst vectorStore = await client.vectorStores.delete(\'vector_store_name\');\n\nconsole.log(vectorStore);\n```', perLanguage: { go: { method: 'client.VectorStores.Delete', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tvectorStore, err := client.VectorStores.Delete(\n\t\tcontext.TODO(),\n\t\t"vector_store_name",\n\t\tsgpdev.VectorStoreDeleteParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", vectorStore.DeletedCount)\n}\n', }, http: { example: "curl https://api.egp.scale.com/v5/vector-stores/$VECTOR_STORE_NAME/delete \\\n -H 'Content-Type: application/json' \\\n -H \"x-api-key: $SGP_API_KEY\" \\\n -d '{}'", }, python: { method: 'vector_stores.delete', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nvector_store = client.vector_stores.delete(\n vector_store_name="vector_store_name",\n)\nprint(vector_store.deleted_count)', }, typescript: { method: 'client.vectorStores.delete', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst vectorStore = await client.vectorStores.delete('vector_store_name');\n\nconsole.log(vectorStore.deleted_count);", }, }, }, { name: 'count', endpoint: '/v5/vector-stores/{vector_store_name}/count', httpMethod: 'post', summary: 'Count Vectors', description: 'Count documents in a vector store, optionally filtered by metadata.\n\n**Use Cases:**\n- Monitor vector store size and growth over time\n- Preview the number of documents matching a filter before deletion\n- Validate data ingestion by comparing expected versus actual document counts\n- Analyze document distribution across metadata categories\n\n**Filtering:** Apply the same metadata filter syntax as delete and list operations. Only indexed fields\ncan be used for filtering. An empty filter counts all documents in the store.', stainlessPath: '(resource) vector_stores > (method) count', qualified: 'client.vectorStores.count', params: ['vector_store_name: string;', 'filter?: object;'], response: '{ count: number; }', markdown: "## count\n\n`client.vectorStores.count(vector_store_name: string, filter?: object): { count: number; }`\n\n**post** `/v5/vector-stores/{vector_store_name}/count`\n\nCount documents in a vector store, optionally filtered by metadata.\n\n**Use Cases:**\n- Monitor vector store size and growth over time\n- Preview the number of documents matching a filter before deletion\n- Validate data ingestion by comparing expected versus actual document counts\n- Analyze document distribution across metadata categories\n\n**Filtering:** Apply the same metadata filter syntax as delete and list operations. Only indexed fields\ncan be used for filtering. An empty filter counts all documents in the store.\n\n### Parameters\n\n- `vector_store_name: string`\n The name of the vector store\n\n- `filter?: object`\n Metadata filter expression\n\n### Returns\n\n- `{ count: number; }`\n Response for count operation.\n\n - `count: number`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst response = await client.vectorStores.count('vector_store_name');\n\nconsole.log(response);\n```", perLanguage: { go: { method: 'client.VectorStores.Count', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tresponse, err := client.VectorStores.Count(\n\t\tcontext.TODO(),\n\t\t"vector_store_name",\n\t\tsgpdev.VectorStoreCountParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Count)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/vector-stores/$VECTOR_STORE_NAME/count \\\n -X POST \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'vector_stores.count', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.vector_stores.count(\n vector_store_name="vector_store_name",\n)\nprint(response.count)', }, typescript: { method: 'client.vectorStores.count', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.vectorStores.count('vector_store_name');\n\nconsole.log(response.count);", }, }, }, { name: 'query', endpoint: '/v5/vector-stores/{vector_store_name}/query', httpMethod: 'post', summary: 'Query Vectors', description: 'Query documents using similarity search with optional reranking.\n\nPrimary endpoint for semantic search, question-answering, and RAG (Retrieval-Augmented Generation)\napplications. Returns documents ranked by relevance to the query text with similarity scores.\n\n**Query Types:**\n- `semantic` (default): Approximate nearest-neighbor search using HNSW over cosine similarity of document embeddings. Optimal for question-answering, conceptual search,\n and finding semantically related content without requiring exact keyword matches.\n- `lexical`: Keyword-based text search (BM25 algorithm). Optimal for exact phrase matching, proper nouns,\n and scenarios where keyword presence is more important than semantic similarity.\n- `hybrid`: Combines semantic and lexical approaches with weighted scoring. Provides maximum recall by\n identifying documents matching either semantically or lexically.\n\n**Metadata Filtering:** Narrow the search scope by applying metadata filters (e.g., search only documents\nwhere `category: "technical"`). Only indexed fields can be used for filtering.\nFilters are applied before similarity search for optimal efficiency.\n\n**Reranking (Advanced):** Optionally enhance result quality using a cross-encoder reranking model.\nThe reranker rescores the initial results using a more sophisticated model that evaluates the complete\nquery-document pair (not solely embeddings). This adds 100-500ms latency but significantly improves\nprecision for high-stakes applications.\n\n**Reranking Strategy:** Set `top_k` higher than the desired final count (e.g., 50) to retrieve more\ncandidates from the initial search. Then configure `rerank_top_n` to the desired final count (e.g., 10)\nto return only the most relevant documents after reranking. This two-stage approach maximizes both recall\nand precision.\n\n**Performance Metrics:** The response includes detailed timing breakdowns (embedding generation time,\nindex query time, reranking time) to facilitate search pipeline optimization and latency analysis.\n\n**Similarity Scores:** Each result includes a `score` field indicating relevance. Higher scores indicate\ngreater relevance. Score ranges and semantics vary by query type (semantic scores use cosine similarity,\nlexical scores use BM25, hybrid scores combine both approaches).', stainlessPath: '(resource) vector_stores > (method) query', qualified: 'client.vectorStores.query', params: [ 'vector_store_name: string;', "content: { text: string; type?: 'text'; };", 'filter?: object;', 'include_vectors?: boolean;', "query_type?: 'semantic' | 'lexical' | 'hybrid';", 'rerank?: boolean;', "rerank_config?: { instruction?: string; model?: string; top_n?: number; type?: 'base'; };", 'rerank_instruction?: string;', 'rerank_model?: string;', 'rerank_top_n?: number;', 'top_k?: number;', ], response: '{ metadata: { search_type: string; total_query_time_ms: number; embedding_config?: embedding_config_models_api | embedding_config_base; embedding_time_ms?: number; index_query_time_ms?: number; reranking_model?: string; reranking_time_ms?: number; }; vectors: { id: string; score: number; content?: object; metadata?: object; vector?: number[]; }[]; }', markdown: "## query\n\n`client.vectorStores.query(vector_store_name: string, content: { text: string; type?: 'text'; }, filter?: object, include_vectors?: boolean, query_type?: 'semantic' | 'lexical' | 'hybrid', rerank?: boolean, rerank_config?: { instruction?: string; model?: string; top_n?: number; type?: 'base'; }, rerank_instruction?: string, rerank_model?: string, rerank_top_n?: number, top_k?: number): { metadata: object; vectors: object[]; }`\n\n**post** `/v5/vector-stores/{vector_store_name}/query`\n\nQuery documents using similarity search with optional reranking.\n\nPrimary endpoint for semantic search, question-answering, and RAG (Retrieval-Augmented Generation)\napplications. Returns documents ranked by relevance to the query text with similarity scores.\n\n**Query Types:**\n- `semantic` (default): Approximate nearest-neighbor search using HNSW over cosine similarity of document embeddings. Optimal for question-answering, conceptual search,\n and finding semantically related content without requiring exact keyword matches.\n- `lexical`: Keyword-based text search (BM25 algorithm). Optimal for exact phrase matching, proper nouns,\n and scenarios where keyword presence is more important than semantic similarity.\n- `hybrid`: Combines semantic and lexical approaches with weighted scoring. Provides maximum recall by\n identifying documents matching either semantically or lexically.\n\n**Metadata Filtering:** Narrow the search scope by applying metadata filters (e.g., search only documents\nwhere `category: \"technical\"`). Only indexed fields can be used for filtering.\nFilters are applied before similarity search for optimal efficiency.\n\n**Reranking (Advanced):** Optionally enhance result quality using a cross-encoder reranking model.\nThe reranker rescores the initial results using a more sophisticated model that evaluates the complete\nquery-document pair (not solely embeddings). This adds 100-500ms latency but significantly improves\nprecision for high-stakes applications.\n\n**Reranking Strategy:** Set `top_k` higher than the desired final count (e.g., 50) to retrieve more\ncandidates from the initial search. Then configure `rerank_top_n` to the desired final count (e.g., 10)\nto return only the most relevant documents after reranking. This two-stage approach maximizes both recall\nand precision.\n\n**Performance Metrics:** The response includes detailed timing breakdowns (embedding generation time,\nindex query time, reranking time) to facilitate search pipeline optimization and latency analysis.\n\n**Similarity Scores:** Each result includes a `score` field indicating relevance. Higher scores indicate\ngreater relevance. Score ranges and semantics vary by query type (semantic scores use cosine similarity,\nlexical scores use BM25, hybrid scores combine both approaches).\n\n### Parameters\n\n- `vector_store_name: string`\n The name of the vector store\n\n- `content: { text: string; type?: 'text'; }`\n Text content for documents.\n - `text: string`\n Text content to be embedded\n - `type?: 'text'`\n Content type identifier\n\n- `filter?: object`\n Metadata filter expression\n\n- `include_vectors?: boolean`\n Include embedding vectors in response\n\n- `query_type?: 'semantic' | 'lexical' | 'hybrid'`\n Query type: semantic, lexical, or hybrid\n\n- `rerank?: boolean`\n [Deprecated: use rerank_config] Enable reranking of search results\n\n- `rerank_config?: { instruction?: string; model?: string; top_n?: number; type?: 'base'; }`\n Reranking configuration. Presence enables reranking; omit to disable. Pass an empty object ({}) to enable reranking with system defaults.\n - `instruction?: string`\n Custom instruction for the reranking model (e.g., 'Given a medical question, retrieve relevant clinical passages'). Only applies to instruction-following rerankers like Qwen3.\n - `model?: string`\n Reranking model to use (uses system default if not specified)\n - `top_n?: number`\n Number of results to keep after reranking (defaults to top_k)\n - `type?: 'base'`\n Reranking configuration type. Currently only 'base' is supported.\n\n- `rerank_instruction?: string`\n [Deprecated: use rerank_config.instruction] Custom instruction for reranker\n\n- `rerank_model?: string`\n [Deprecated: use rerank_config.model] Reranking model to use\n\n- `rerank_top_n?: number`\n [Deprecated: use rerank_config.top_n] Number of results after reranking\n\n- `top_k?: number`\n Number of search results to return\n\n### Returns\n\n- `{ metadata: { search_type: string; total_query_time_ms: number; embedding_config?: embedding_config_models_api | embedding_config_base; embedding_time_ms?: number; index_query_time_ms?: number; reranking_model?: string; reranking_time_ms?: number; }; vectors: { id: string; score: number; content?: object; metadata?: object; vector?: number[]; }[]; }`\n Response for query operation.\n\n - `metadata: { search_type: string; total_query_time_ms: number; embedding_config?: { model_deployment_id: string; type: 'models_api'; } | { embedding_model: embedding_model_name; type?: 'base'; }; embedding_time_ms?: number; index_query_time_ms?: number; reranking_model?: string; reranking_time_ms?: number; }`\n - `vectors: { id: string; score: number; content?: { text: string; type?: 'text'; }; metadata?: object; vector?: number[]; }[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst response = await client.vectorStores.query('vector_store_name', { content: { text: 'text' } });\n\nconsole.log(response);\n```", perLanguage: { go: { method: 'client.VectorStores.Query', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tresponse, err := client.VectorStores.Query(\n\t\tcontext.TODO(),\n\t\t"vector_store_name",\n\t\tsgpdev.VectorStoreQueryParams{\n\t\t\tContent: sgpdev.TextContentParam{\n\t\t\t\tText: "text",\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Metadata)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/vector-stores/$VECTOR_STORE_NAME/query \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SGP_API_KEY" \\\n -d \'{\n "content": {\n "text": "text"\n }\n }\'', }, python: { method: 'vector_stores.query', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.vector_stores.query(\n vector_store_name="vector_store_name",\n content={\n "text": "text"\n },\n)\nprint(response.metadata)', }, typescript: { method: 'client.vectorStores.query', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.vectorStores.query('vector_store_name', {\n content: { text: 'text' },\n});\n\nconsole.log(response.metadata);", }, }, }, { name: 'list', endpoint: '/v5/vector-stores/{vector_store_name}/vectors', httpMethod: 'get', summary: 'List Vectors', description: 'List documents in a vector store with cursor-based pagination.\n\n**Use Cases:** Browse documents, export content, audit stored data, or retrieve documents by metadata\nwithout semantic search.\n\n**Ordering:** Documents are returned in storage order (insertion order), not ranked by similarity.\nFor similarity-based retrieval, use the query endpoint.\n\n**Filtering:** Apply metadata filters to narrow results to specific subsets (e.g., all documents\nwhere `category: "research"`). Only indexed fields can be used for filtering.\n\n**Pagination:** Uses cursor-based pagination for efficient traversal of large datasets. Pass the\n`next_cursor` from each response as `starting_after` to retrieve the next page, or `prev_cursor`\nas `ending_before` to retrieve the previous page. A null cursor indicates no further pages exist.\n\n**Embedding Vectors:** Setting `include_vectors=true` includes the full embedding vector arrays in\nthe response. This significantly increases payload size and reduces the maximum page size from 1000 to\n100 documents. Enable only when raw vectors are required for external processing.', stainlessPath: '(resource) vector_stores.vectors > (method) list', qualified: 'client.vectorStores.vectors.list', params: [ 'vector_store_name: string;', 'cursor?: string;', 'ending_before?: string;', 'filter?: string;', 'include_vectors?: boolean;', 'limit?: number;', 'sort_by?: string;', "sort_order?: 'asc' | 'desc';", 'starting_after?: string;', ], response: "{ id: string; content?: { text: string; type?: 'text'; }; metadata?: object; vector?: number[]; }", markdown: "## list\n\n`client.vectorStores.vectors.list(vector_store_name: string, cursor?: string, ending_before?: string, filter?: string, include_vectors?: boolean, limit?: number, sort_by?: string, sort_order?: 'asc' | 'desc', starting_after?: string): { id: string; content?: text_content; metadata?: object; vector?: number[]; }`\n\n**get** `/v5/vector-stores/{vector_store_name}/vectors`\n\nList documents in a vector store with cursor-based pagination.\n\n**Use Cases:** Browse documents, export content, audit stored data, or retrieve documents by metadata\nwithout semantic search.\n\n**Ordering:** Documents are returned in storage order (insertion order), not ranked by similarity.\nFor similarity-based retrieval, use the query endpoint.\n\n**Filtering:** Apply metadata filters to narrow results to specific subsets (e.g., all documents\nwhere `category: \"research\"`). Only indexed fields can be used for filtering.\n\n**Pagination:** Uses cursor-based pagination for efficient traversal of large datasets. Pass the\n`next_cursor` from each response as `starting_after` to retrieve the next page, or `prev_cursor`\nas `ending_before` to retrieve the previous page. A null cursor indicates no further pages exist.\n\n**Embedding Vectors:** Setting `include_vectors=true` includes the full embedding vector arrays in\nthe response. This significantly increases payload size and reduces the maximum page size from 1000 to\n100 documents. Enable only when raw vectors are required for external processing.\n\n### Parameters\n\n- `vector_store_name: string`\n The name of the vector store\n\n- `cursor?: string`\n\n- `ending_before?: string`\n\n- `filter?: string`\n Metadata filter expression (JSON)\n\n- `include_vectors?: boolean`\n Include embedding vectors\n\n- `limit?: number`\n\n- `sort_by?: string`\n\n- `sort_order?: 'asc' | 'desc'`\n\n- `starting_after?: string`\n\n### Returns\n\n- `{ id: string; content?: { text: string; type?: 'text'; }; metadata?: object; vector?: number[]; }`\n A document returned from direct lookups (get/list operations).\n\n - `id: string`\n - `content?: { text: string; type?: 'text'; }`\n - `metadata?: object`\n - `vector?: number[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\n// Automatically fetches more pages as needed.\nfor await (const vectorDocument of client.vectorStores.vectors.list('vector_store_name')) {\n console.log(vectorDocument);\n}\n```", perLanguage: { go: { method: 'client.VectorStores.Vectors.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tpage, err := client.VectorStores.Vectors.List(\n\t\tcontext.TODO(),\n\t\t"vector_store_name",\n\t\tsgpdev.VectorStoreVectorListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/vector-stores/$VECTOR_STORE_NAME/vectors \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'vector_stores.vectors.list', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\npage = client.vector_stores.vectors.list(\n vector_store_name="vector_store_name",\n)\npage = page.vectors[0]\nprint(page.id)', }, typescript: { method: 'client.vectorStores.vectors.list', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const vectorDocument of client.vectorStores.vectors.list('vector_store_name')) {\n console.log(vectorDocument.id);\n}", }, }, }, { name: 'retrieve', endpoint: '/v5/vector-stores/{vector_store_name}/vectors/{vector_id}', httpMethod: 'get', summary: 'Get Vector', description: "Retrieve a single document by its unique ID.\n\nReturns the document's full content, metadata, and optionally its embedding vector. Use this endpoint\nfor direct lookups when the exact document ID is known. For content similarity search,\nuse the query endpoint.", stainlessPath: '(resource) vector_stores.vectors > (method) retrieve', qualified: 'client.vectorStores.vectors.retrieve', params: ['vector_store_name: string;', 'vector_id: string;', 'include_vectors?: boolean;'], response: "{ id: string; content?: { text: string; type?: 'text'; }; metadata?: object; vector?: number[]; }", markdown: "## retrieve\n\n`client.vectorStores.vectors.retrieve(vector_store_name: string, vector_id: string, include_vectors?: boolean): { id: string; content?: text_content; metadata?: object; vector?: number[]; }`\n\n**get** `/v5/vector-stores/{vector_store_name}/vectors/{vector_id}`\n\nRetrieve a single document by its unique ID.\n\nReturns the document's full content, metadata, and optionally its embedding vector. Use this endpoint\nfor direct lookups when the exact document ID is known. For content similarity search,\nuse the query endpoint.\n\n### Parameters\n\n- `vector_store_name: string`\n The name of the vector store\n\n- `vector_id: string`\n The ID of the vector to retrieve\n\n- `include_vectors?: boolean`\n Include embedding vectors\n\n### Returns\n\n- `{ id: string; content?: { text: string; type?: 'text'; }; metadata?: object; vector?: number[]; }`\n A document returned from direct lookups (get/list operations).\n\n - `id: string`\n - `content?: { text: string; type?: 'text'; }`\n - `metadata?: object`\n - `vector?: number[]`\n\n### Example\n\n```typescript\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst vectorDocument = await client.vectorStores.vectors.retrieve('vector_id', { vector_store_name: 'vector_store_name' });\n\nconsole.log(vectorDocument);\n```", perLanguage: { go: { method: 'client.VectorStores.Vectors.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t\toption.WithAccountID("My Account ID"),\n\t)\n\tvectorDocument, err := client.VectorStores.Vectors.Get(\n\t\tcontext.TODO(),\n\t\t"vector_id",\n\t\tsgpdev.VectorStoreVectorGetParams{\n\t\t\tVectorStoreName: "vector_store_name",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", vectorDocument.ID)\n}\n', }, http: { example: 'curl https://api.egp.scale.com/v5/vector-stores/$VECTOR_STORE_NAME/vectors/$VECTOR_ID \\\n -H "x-api-key: $SGP_API_KEY"', }, python: { method: 'vector_stores.vectors.retrieve', example: 'import os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n)\nvector_document = client.vector_stores.vectors.retrieve(\n vector_id="vector_id",\n vector_store_name="vector_store_name",\n)\nprint(vector_document.id)', }, typescript: { method: 'client.vectorStores.vectors.retrieve', example: "import SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n});\n\nconst vectorDocument = await client.vectorStores.vectors.retrieve('vector_id', {\n vector_store_name: 'vector_store_name',\n});\n\nconsole.log(vectorDocument.id);", }, }, }, ]; const EMBEDDED_READMES: { language: string; content: string }[] = [ { language: 'python', content: '# Scale GP Python API library\n\n\n[![PyPI version](https://img.shields.io/pypi/v/scale-gp-beta.svg?label=pypi%20(stable))](https://pypi.org/project/scale-gp-beta/)\n\nThe Scale GP Python library provides convenient access to the Scale GP REST API from any Python 3.9+\napplication. The library includes type definitions for all request params and response fields,\nand offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Scale GP MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=scale-gp-mcp&config=eyJuYW1lIjoic2NhbGUtZ3AtbWNwIiwidHJhbnNwb3J0IjoiaHR0cCIsInVybCI6Imh0dHBzOi8vc2dwLWRldi5zdGxtY3AuY29tIiwiaGVhZGVycyI6eyJ4LWFwaS1rZXkiOiJNeSBBUEkgS2V5In19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22scale-gp-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fsgp-dev.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nThe REST API documentation can be found on [docs.gp.scale.com](https://docs.gp.scale.com). The full API of this library can be found in [api.md](api.md).\n\n## Installation\n\n```sh\n# install from PyPI\npip install scale-gp-beta\n```\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```python\nimport os\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n account_id="My Account ID",\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n # or \'production\' | \'staging\' | \'development\' | \'local\'; defaults to "production".\n environment="production-multitenant",\n)\n\ncompletion = client.chat.completions.create(\n messages=[{\n "role": "user",\n "content": "Hello, how are you?",\n }],\n model="openai/gpt-4o-mini",\n top_k=2,\n)\n```\n\nWhile you can provide an `api_key` keyword argument,\nwe recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)\nto add `SGP_API_KEY="My API Key"` to your `.env` file\nso that your API Key is not stored in source control.\n\n## Async usage\n\nSimply import `AsyncSGPClient` instead of `SGPClient` and use `await` with each API call:\n\n```python\nimport os\nimport asyncio\nfrom scale_gp_beta import AsyncSGPClient\n\nclient = AsyncSGPClient(\n account_id="My Account ID",\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n # or \'production\' | \'staging\' | \'development\' | \'local\'; defaults to "production".\n environment="production-multitenant",\n)\n\nasync def main() -> None:\n completion = await client.chat.completions.create(\n messages=[{\n "role": "user",\n "content": "Hello, how are you?",\n }],\n model="openai/gpt-4o-mini",\n top_k=2,\n )\n\nasyncio.run(main())\n```\n\nFunctionality between the synchronous and asynchronous clients is otherwise identical.\n\n### With aiohttp\n\nBy default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.\n\nYou can enable this by installing `aiohttp`:\n\n```sh\n# install from PyPI\npip install scale-gp-beta[aiohttp]\n```\n\nThen you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:\n\n```python\nimport os\nimport asyncio\nfrom scale_gp_beta import DefaultAioHttpClient\nfrom scale_gp_beta import AsyncSGPClient\n\nasync def main() -> None:\n async with AsyncSGPClient(\n account_id="My Account ID",\n api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted\n http_client=DefaultAioHttpClient(),\n) as client:\n completion = await client.chat.completions.create(\n messages=[{\n "role": "user",\n "content": "Hello, how are you?",\n }],\n model="openai/gpt-4o-mini",\n top_k=2,\n )\n\nasyncio.run(main())\n```\n\n## Streaming responses\n\nWe provide support for streaming responses using Server Side Events (SSE).\n\n```python\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n account_id="My Account ID",\n)\n\nstream = client.chat.completions.create(\n messages=[{\n "role": "user",\n "content": "Hello, how are you?",\n }],\n model="openai/gpt-4o-mini",\n stream=True,\n)\nfor completion in stream:\n print(completion)\n```\n\nThe async client uses the exact same interface.\n\n```python\nfrom scale_gp_beta import AsyncSGPClient\n\nclient = AsyncSGPClient(\n account_id="My Account ID",\n)\n\nstream = await client.chat.completions.create(\n messages=[{\n "role": "user",\n "content": "Hello, how are you?",\n }],\n model="openai/gpt-4o-mini",\n stream=True,\n)\nasync for completion in stream:\n print(completion)\n```\n\n## Using types\n\nNested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:\n\n- Serializing back into JSON, `model.to_json()`\n- Converting to a dictionary, `model.to_dict()`\n\nTyped requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.\n\n## Pagination\n\nList methods in the Scale GP API are paginated.\n\nThis library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:\n\n```python\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n account_id="My Account ID",\n)\n\nall_models = []\n# Automatically fetches more pages as needed.\nfor model in client.models.list(\n limit=10,\n):\n # Do something with model here\n all_models.append(model)\nprint(all_models)\n```\n\nOr, asynchronously:\n\n```python\nimport asyncio\nfrom scale_gp_beta import AsyncSGPClient\n\nclient = AsyncSGPClient(\n account_id="My Account ID",\n)\n\nasync def main() -> None:\n all_models = []\n # Iterate through items across all pages, issuing requests as needed.\n async for model in client.models.list(\n limit=10,\n):\n all_models.append(model)\n print(all_models)\n\nasyncio.run(main())\n```\n\nAlternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:\n\n```python\nfirst_page = await client.models.list(\n limit=10,\n)\nif first_page.has_next_page():\n print(f"will fetch next page using these details: {first_page.next_page_info()}")\n next_page = await first_page.get_next_page()\n print(f"number of items we just fetched: {len(next_page.items)}")\n\n# Remove `await` for non-async usage.\n```\n\nOr just work directly with the returned data:\n\n```python\nfirst_page = await client.models.list(\n limit=10,\n)\n\nprint(f"next page cursor: {first_page.starting_after}") # => "next page cursor: ..."\nfor model in first_page.items:\n print(model.id)\n\n# Remove `await` for non-async usage.\n```\n\n## Nested params\n\nNested parameters are dictionaries, typed using `TypedDict`, for example:\n\n```python\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n account_id="My Account ID",\n)\n\ninference = client.inference.create(\n model="model",\n inference_configuration={},\n)\nprint(inference.inference_configuration)\n```\n\n## File uploads\n\nRequest parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.\n\n```python\nfrom pathlib import Path\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n account_id="My Account ID",\n)\n\nclient.files.create(\n file=Path("/path/to/file"),\n)\n```\n\nThe async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.\n\n## Handling errors\n\nWhen the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `scale_gp_beta.APIConnectionError` is raised.\n\nWhen the API returns a non-success status code (that is, 4xx or 5xx\nresponse), a subclass of `scale_gp_beta.APIStatusError` is raised, containing `status_code` and `response` properties.\n\nAll errors inherit from `scale_gp_beta.APIError`.\n\n```python\nimport scale_gp_beta\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n account_id="My Account ID",\n)\n\ntry:\n client.chat.completions.create(\n messages=[{\n "role": "user",\n "content": "Hello, how are you?",\n }],\n model="openai/gpt-4o-mini",\n )\nexcept scale_gp_beta.APIConnectionError as e:\n print("The server could not be reached")\n print(e.__cause__) # an underlying Exception, likely raised within httpx.\nexcept scale_gp_beta.RateLimitError as e:\n print("A 429 status code was received; we should back off a bit.")\nexcept scale_gp_beta.APIStatusError as e:\n print("Another non-200-range status code was received")\n print(e.status_code)\n print(e.response)\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors are automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors are all retried by default.\n\nYou can use the `max_retries` option to configure or disable retry settings:\n\n```python\nfrom scale_gp_beta import SGPClient\n\n# Configure the default for all requests:\nclient = SGPClient(\n account_id="My Account ID",\n # default is 2\n max_retries=0,\n)\n\n# Or, configure per-request:\nclient.with_options(max_retries = 5).chat.completions.create(\n messages=[{\n "role": "user",\n "content": "Hello, how are you?",\n }],\n model="openai/gpt-4o-mini",\n)\n```\n\n### Timeouts\n\nBy default requests time out after 1 minute. You can configure this with a `timeout` option,\nwhich accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:\n\n```python\nfrom scale_gp_beta import SGPClient\n\n# Configure the default for all requests:\nclient = SGPClient(\n account_id="My Account ID",\n # 20 seconds (default is 1 minute)\n timeout=20.0,\n)\n\n# More granular control:\nclient = SGPClient(\n account_id="My Account ID",\n timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),\n)\n\n# Override per-request:\nclient.with_options(timeout = 5.0).chat.completions.create(\n messages=[{\n "role": "user",\n "content": "Hello, how are you?",\n }],\n model="openai/gpt-4o-mini",\n)\n```\n\nOn timeout, an `APITimeoutError` is thrown.\n\nNote that requests that time out are [retried twice by default](#retries).\n\n\n\n## Advanced\n\n### Logging\n\nWe use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.\n\nYou can enable logging by setting the environment variable `SGP_CLIENT_LOG` to `info`.\n\n```shell\n$ export SGP_CLIENT_LOG=info\n```\n\nOr to `debug` for more verbose logging.\n\n### How to tell whether `None` means `null` or missing\n\nIn an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:\n\n```py\nif response.my_field is None:\n if \'my_field\' not in response.model_fields_set:\n print(\'Got json like {}, without a "my_field" key present at all.\')\n else:\n print(\'Got json like {"my_field": null}.\')\n```\n\n### Accessing raw response data (e.g. headers)\n\nThe "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,\n\n```py\nfrom scale_gp_beta import SGPClient\n\nclient = SGPClient(\n account_id="My Account ID",\n)\nresponse = client.chat.completions.with_raw_response.create(\n messages=[{\n "role": "user",\n "content": "Hello, how are you?",\n }],\n model="openai/gpt-4o-mini",\n)\nprint(response.headers.get(\'X-My-Header\'))\n\ncompletion = response.parse() # get the object that `chat.completions.create()` would have returned\nprint(completion)\n```\n\nThese methods return an [`APIResponse`](https://github.com/scaleapi/sgp-python-beta/tree/main/src/scale_gp_beta/_response.py) object.\n\nThe async client returns an [`AsyncAPIResponse`](https://github.com/scaleapi/sgp-python-beta/tree/main/src/scale_gp_beta/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.\n\n#### `.with_streaming_response`\n\nThe above interface eagerly reads the full response body when you make the request, which may not always be what you want.\n\nTo stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.\n\n```python\nwith client.chat.completions.with_streaming_response.create(\n messages=[{\n "role": "user",\n "content": "Hello, how are you?",\n }],\n model="openai/gpt-4o-mini",\n) as response :\n print(response.headers.get(\'X-My-Header\'))\n\n for line in response.iter_lines():\n print(line)\n```\n\nThe context manager is required so that the response will reliably be closed.\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API.\n\nIf you need to access undocumented endpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other\nhttp verbs. Options on the client will be respected (such as retries) when making this request.\n\n```py\nimport httpx\n\nresponse = client.post(\n "/foo",\n cast_to=httpx.Response,\n body={"my_param": True},\n)\n\nprint(response.headers.get("x-foo"))\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You\ncan also get all the extra fields on the Pydantic model as a dict with\n[`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).\n\n### Configuring the HTTP client\n\nYou can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:\n\n- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)\n- Custom [transports](https://www.python-httpx.org/advanced/transports/)\n- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality\n\n```python\nimport httpx\nfrom scale_gp_beta import SGPClient, DefaultHttpxClient\n\nclient = SGPClient(\n account_id="My Account ID",\n # Or use the `SGP_CLIENT_BASE_URL` env var\n base_url="http://my.test.server.example.com:8083",\n http_client=DefaultHttpxClient(proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")),\n)\n```\n\nYou can also customize the client on a per-request basis by using `with_options()`:\n\n```python\nclient.with_options(http_client=DefaultHttpxClient(...))\n```\n\n### Managing HTTP resources\n\nBy default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.\n\n```py\nfrom scale_gp_beta import SGPClient\n\nwith SGPClient(\n account_id="My Account ID",\n) as client:\n # make requests here\n ...\n\n# HTTP client is now closed\n```\n\n## Versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/scaleapi/sgp-python-beta/issues) with questions, bugs, or suggestions.\n\n### Determining the installed version\n\nIf you\'ve upgraded to the latest version but aren\'t seeing any new features you were expecting then your python environment is likely still using an older version.\n\nYou can determine the version that is being used at runtime with:\n\n```py\nimport scale_gp_beta\nprint(scale_gp_beta.__version__)\n```\n\n## Requirements\n\nPython 3.9 or higher.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n', }, { language: 'go', content: '# Scale GP Go API Library\n\nGo Reference\n\nThe Scale GP Go library provides convenient access to the [Scale GP REST API](https://docs.gp.scale.com)\nfrom applications written in Go.\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Scale GP MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=scale-gp-mcp&config=eyJuYW1lIjoic2NhbGUtZ3AtbWNwIiwidHJhbnNwb3J0IjoiaHR0cCIsInVybCI6Imh0dHBzOi8vc2dwLWRldi5zdGxtY3AuY29tIiwiaGVhZGVycyI6eyJ4LWFwaS1rZXkiOiJNeSBBUEkgS2V5In19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22scale-gp-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fsgp-dev.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n\n\n```go\nimport (\n\t"github.com/scaleapi/sgp-dev-go" // imported as SDK_PackageName\n)\n```\n\n\n\nOr to pin the version:\n\n\n\n```sh\ngo get -u \'github.com/scaleapi/sgp-dev-go@v0.0.1\'\n```\n\n\n\n## Requirements\n\nThis library requires Go 1.22+.\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```go\npackage main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/scaleapi/sgp-dev-go"\n\t"github.com/scaleapi/sgp-dev-go/option"\n)\n\nfunc main() {\n\tclient := sgpdev.NewClient(\n\t\toption.WithAPIKey("My API Key"), // defaults to os.LookupEnv("SGP_API_KEY")\n\t\toption.WithAccountID("My Account ID"), // defaults to os.LookupEnv("SGP_ACCOUNT_ID")\n\t\toption.WithEnvironmentProductionMultitenant(), // or option.WithEnvironmentProduction() | option.WithEnvironmentStaging() | option.WithEnvironmentDevelopment() | option.WithEnvironmentLocal(); defaults to option.WithEnvironmentProduction()\n\t)\n\tcompletion, err := client.Chat.Completions.New(context.TODO(), sgpdev.ChatCompletionNewParams{\n\t\tMessages: []map[string]any{{\n\t\t\t"role": "user",\n\t\t\t"content": "Hello, how are you?",\n\t\t}},\n\t\tModel: "openai/gpt-4o-mini",\n\t\tTopK: sgpdev.Int(2),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", completion)\n}\n\n```\n\n### Request fields\n\nAll request parameters are wrapped in a generic `Field` type,\nwhich we use to distinguish zero values from null or omitted fields.\n\nThis prevents accidentally sending a zero value if you forget a required parameter,\nand enables explicitly sending `null`, `false`, `\'\'`, or `0` on optional parameters.\nAny field not specified is not sent.\n\nTo construct fields with values, use the helpers `String()`, `Int()`, `Float()`, or most commonly, the generic `F[T]()`.\nTo send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T](any)`. For example:\n\n```go\nparams := FooParams{\n\tName: SDK_PackageName.F("hello"),\n\n\t// Explicitly send `"description": null`\n\tDescription: SDK_PackageName.Null[string](),\n\n\tPoint: SDK_PackageName.F(SDK_PackageName.Point{\n\t\tX: SDK_PackageName.Int(0),\n\t\tY: SDK_PackageName.Int(1),\n\n\t\t// In cases where the API specifies a given type,\n\t\t// but you want to send something else, use `Raw`:\n\t\tZ: SDK_PackageName.Raw[int64](0.01), // sends a float\n\t}),\n}\n```\n\n### Response objects\n\nAll fields in response structs are value types (not pointers or wrappers).\n\nIf a given field is `null`, not present, or invalid, the corresponding field\nwill simply be its zero value.\n\nAll response structs also include a special `JSON` field, containing more detailed\ninformation about each property, which you can use like so:\n\n```go\nif res.Name == "" {\n\t// true if `"name"` is either not present or explicitly null\n\tres.JSON.Name.IsNull()\n\n\t// true if the `"name"` key was not present in the response JSON at all\n\tres.JSON.Name.IsMissing()\n\n\t// When the API returns data that cannot be coerced to the expected type:\n\tif res.JSON.Name.IsInvalid() {\n\t\traw := res.JSON.Name.Raw()\n\n\t\tlegacyName := struct{\n\t\t\tFirst string `json:"first"`\n\t\t\tLast string `json:"last"`\n\t\t}{}\n\t\tjson.Unmarshal([]byte(raw), &legacyName)\n\t\tname = legacyName.First + " " + legacyName.Last\n\t}\n}\n```\n\nThese `.JSON` structs also include an `Extras` map containing\nany properties in the json response that were not specified\nin the struct. This can be useful for API features not yet\npresent in the SDK.\n\n```go\nbody := res.JSON.ExtraFields["my_unexpected_field"].Raw()\n```\n\n### RequestOptions\n\nThis library uses the functional options pattern. Functions defined in the\n`SDK_PackageOptionName` package return a `RequestOption`, which is a closure that mutates a\n`RequestConfig`. These options can be supplied to the client or at individual\nrequests. For example:\n\n```go\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\t// Adds a header to every request made by the client\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "custom_header_info"),\n)\n\nclient.Chat.Completions.New(context.TODO(), ...,\n\t// Override the header\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "some_other_custom_header_info"),\n\t// Add an undocumented field to the request body, using sjson syntax\n\tSDK_PackageOptionName.WithJSONSet("some.json.path", map[string]string{"my": "object"}),\n)\n```\n\nSee the [full list of request options](https://pkg.go.dev/github.com/scaleapi/sgp-dev-go/SDK_PackageOptionName).\n\n### Pagination\n\nThis library provides some conveniences for working with paginated list endpoints.\n\nYou can use `.ListAutoPaging()` methods to iterate through items across all pages:\n\n```go\niter := client.Models.ListAutoPaging(context.TODO(), sgpdev.ModelListParams{\n\tLimit: sgpdev.Int(10),\n})\n// Automatically fetches more pages as needed.\nfor iter.Next() {\n\tinferenceModel := iter.Current()\n\tfmt.Printf("%+v\\n", inferenceModel)\n}\nif err := iter.Err(); err != nil {\n\tpanic(err.Error())\n}\n```\n\nOr you can use simple `.List()` methods to fetch a single page and receive a standard response object\nwith additional helper methods like `.GetNextPage()`, e.g.:\n\n```go\npage, err := client.Models.List(context.TODO(), sgpdev.ModelListParams{\n\tLimit: sgpdev.Int(10),\n})\nfor page != nil {\n\tfor _, model := range page.Items {\n\t\tfmt.Printf("%+v\\n", model)\n\t}\n\tpage, err = page.GetNextPage()\n}\nif err != nil {\n\tpanic(err.Error())\n}\n```\n\n### Errors\n\nWhen the API returns a non-success status code, we return an error with type\n`*SDK_PackageName.Error`. This contains the `StatusCode`, `*http.Request`, and\n`*http.Response` values of the request, as well as the JSON of the error body\n(much like other response objects in the SDK).\n\nTo handle errors, we recommend that you use the `errors.As` pattern:\n\n```go\n_, err := client.Chat.Completions.New(context.TODO(), sgpdev.ChatCompletionNewParams{\n\tMessages: []map[string]any{{\n\t\t"role": "user",\n\t\t"content": "Hello, how are you?",\n\t}},\n\tModel: "openai/gpt-4o-mini",\n})\nif err != nil {\n\tvar apierr *sgpdev.Error\n\tif errors.As(err, &apierr) {\n\t\tprintln(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request\n\t\tprintln(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response\n\t}\n\tpanic(err.Error()) // GET "/v5/chat/completions": 400 Bad Request { ... }\n}\n```\n\nWhen other errors occur, they are returned unwrapped; for example,\nif HTTP transport fails, you might receive `*url.Error` wrapping `*net.OpError`.\n\n### Timeouts\n\nRequests do not time out by default; use context to configure a timeout for a request lifecycle.\n\nNote that if a request is [retried](#retries), the context timeout does not start over.\nTo set a per-retry timeout, use `SDK_PackageOptionName.WithRequestTimeout()`.\n\n```go\n// This sets the timeout for the request, including all the retries.\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()\nclient.Chat.Completions.New(\n\tctx,\n\tsgpdev.ChatCompletionNewParams{\n\t\tMessages: []map[string]any{{\n\t\t\t"role": "user",\n\t\t\t"content": "Hello, how are you?",\n\t\t}},\n\t\tModel: "openai/gpt-4o-mini",\n\t},\n\t// This sets the per-retry timeout\n\toption.WithRequestTimeout(20*time.Second),\n)\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads in multipart requests are typed as\n`param.Field[io.Reader]`. The contents of the `io.Reader` will by default be sent as a multipart form\npart with the file name of "anonymous_file" and content-type of "application/octet-stream".\n\nThe file name and content-type can be customized by implementing `Name() string` or `ContentType()\nstring` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a\nfile returned by `os.Open` will be sent with the file name on disk.\n\nWe also provide a helper `SDK_PackageName.FileParam(reader io.Reader, filename string, contentType string)`\nwhich can be used to wrap any `io.Reader` with the appropriate file name and content type.\n\n```go\n// A file from the file system\nfile, err := os.Open("/path/to/file")\nsgpdev.FileNewParams{\n\tFile: file,\n}\n\n// A file from a string\nsgpdev.FileNewParams{\n\tFile: strings.NewReader("my file contents"),\n}\n\n// With a custom filename and contentType\nsgpdev.FileNewParams{\n\tFile: sgpdev.File(strings.NewReader(`{"hello": "foo"}`), "file.go", "application/json"),\n}\n```\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nWe retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,\nand >=500 Internal errors.\n\nYou can use the `WithMaxRetries` option to configure or disable this:\n\n```go\n// Configure the default for all requests:\nclient := sgpdev.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.Chat.Completions.New(\n\tcontext.TODO(),\n\tsgpdev.ChatCompletionNewParams{\n\t\tMessages: []map[string]any{{\n\t\t\t"role": "user",\n\t\t\t"content": "Hello, how are you?",\n\t\t}},\n\t\tModel: "openai/gpt-4o-mini",\n\t},\n\toption.WithMaxRetries(5),\n)\n```\n\n\n### Accessing raw response data (e.g. response headers)\n\nYou can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when\nyou need to examine response headers, status codes, or other details.\n\n```go\n// Create a variable to store the HTTP response\nvar response *http.Response\ncompletion, err := client.Chat.Completions.New(\n\tcontext.TODO(),\n\tsgpdev.ChatCompletionNewParams{\n\t\tMessages: []map[string]any{{\n\t\t\t"role": "user",\n\t\t\t"content": "Hello, how are you?",\n\t\t}},\n\t\tModel: "openai/gpt-4o-mini",\n\t},\n\toption.WithResponseInto(&response),\n)\nif err != nil {\n\t// handle error\n}\nfmt.Printf("%+v\\n", completion)\n\nfmt.Printf("Status Code: %d\\n", response.StatusCode)\nfmt.Printf("Headers: %+#v\\n", response.Header)\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.\n`RequestOptions` on the client, such as retries, will be respected when making these requests.\n\n```go\nvar (\n // params can be an io.Reader, a []byte, an encoding/json serializable object,\n // or a "…Params" struct defined in this library.\n params map[string]interface{}\n\n // result can be an []byte, *http.Response, a encoding/json deserializable object,\n // or a model defined in this library.\n result *http.Response\n)\nerr := client.Post(context.Background(), "/unspecified", params, &result)\nif err != nil {\n …\n}\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use either the `SDK_PackageOptionName.WithQuerySet()`\nor the `SDK_PackageOptionName.WithJSONSet()` methods.\n\n```go\nparams := FooNewParams{\n ID: SDK_PackageName.F("id_xxxx"),\n Data: SDK_PackageName.F(FooNewParamsData{\n FirstName: SDK_PackageName.F("John"),\n }),\n}\nclient.Foo.New(context.Background(), params, SDK_PackageOptionName.WithJSONSet("data.last_name", "Doe"))\n```\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may either access the raw JSON of the response as a string\nwith `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with\n`result.JSON.Foo.Raw()`.\n\nAny fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.\n\n### Middleware\n\nWe provide `SDK_PackageOptionName.WithMiddleware` which applies the given\nmiddleware to requests.\n\n```go\nfunc Logger(req *http.Request, next SDK_PackageOptionName.MiddlewareNext) (res *http.Response, err error) {\n\t// Before the request\n\tstart := time.Now()\n\tLogReq(req)\n\n\t// Forward the request to the next handler\n\tres, err = next(req)\n\n\t// Handle stuff after the request\n\tend := time.Now()\n\tLogRes(res, err, start - end)\n\n return res, err\n}\n\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\tSDK_PackageOptionName.WithMiddleware(Logger),\n)\n```\n\nWhen multiple middlewares are provided as variadic arguments, the middlewares\nare applied left to right. If `SDK_PackageOptionName.WithMiddleware` is given\nmultiple times, for example first in the client then the method, the\nmiddleware in the client will run first and the middleware given in the method\nwill run next.\n\nYou may also replace the default `http.Client` with\n`SDK_PackageOptionName.WithHTTPClient(client)`. Only one http client is\naccepted (this overwrites any previous client) and receives requests after any\nmiddleware has been applied.\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/scaleapi/sgp-dev-go/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n', }, { language: 'typescript', content: "# Scale GP TypeScript API Library\n\n[![NPM version](https://img.shields.io/npm/v/scale-gp.svg?label=npm%20(stable))](https://npmjs.org/package/scale-gp) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/scale-gp)\n\nThis library provides convenient access to the Scale GP REST API from server-side TypeScript or JavaScript.\n\n\n\nThe REST API documentation can be found on [docs.gp.scale.com](https://docs.gp.scale.com). The full API of this library can be found in [api.md](api.md).\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Scale GP MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=scale-gp-mcp&config=eyJuYW1lIjoic2NhbGUtZ3AtbWNwIiwidHJhbnNwb3J0IjoiaHR0cCIsInVybCI6Imh0dHBzOi8vc2dwLWRldi5zdGxtY3AuY29tIiwiaGVhZGVycyI6eyJ4LWFwaS1rZXkiOiJNeSBBUEkgS2V5In19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22scale-gp-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fsgp-dev.stlmcp.com%22%2C%22headers%22%3A%7B%22x-api-key%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install scale-gp\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n\n```js\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n environment: 'production-multitenant', // or 'production' | 'staging' | 'development' | 'local'; defaults to 'production'\n});\n\nconst completion = await client.chat.completions.create({\n messages: [{ role: 'user', content: 'Hello, how are you?' }],\n model: 'openai/gpt-4o-mini',\n top_k: 2,\n});\n```\n\n## Streaming responses\n\nWe provide support for streaming responses using Server Sent Events (SSE).\n\n```ts\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient();\n\nconst stream = await client.chat.completions.create({\n messages: [{ role: 'user', content: 'Hello, how are you?' }],\n model: 'openai/gpt-4o-mini',\n stream: true,\n});\nfor await (const chatCompletionChunk of stream) {\n console.log(chatCompletionChunk);\n}\n```\n\nIf you need to cancel a stream, you can `break` from the loop\nor call `stream.controller.abort()`.\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n\n```ts\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n accountID: 'My Account ID',\n apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted\n environment: 'production-multitenant', // or 'production' | 'staging' | 'development' | 'local'; defaults to 'production'\n});\n\nconst params: SGPClient.Chat.CompletionCreateParams = {\n messages: [{ role: 'user', content: 'Hello, how are you?' }],\n model: 'openai/gpt-4o-mini',\n};\nconst completion: SGPClient.Chat.CompletionCreateResponse = await client.chat.completions.create(\n params,\n);\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n## File uploads\n\nRequest parameters that correspond to file uploads can be passed in many different forms:\n- `File` (or an object with the same structure)\n- a `fetch` `Response` (or an object with the same structure)\n- an `fs.ReadStream`\n- the return value of our `toFile` helper\n\n```ts\nimport fs from 'fs';\nimport SGPClient, { toFile } from 'scale-gp';\n\nconst client = new SGPClient();\n\n// If you have access to Node `fs` we recommend using `fs.createReadStream()`:\nawait client.files.create({ file: fs.createReadStream('/path/to/file') });\n\n// Or if you have the web `File` API you can pass a `File` instance:\nawait client.files.create({ file: new File(['my bytes'], 'file') });\n\n// You can also pass a `fetch` `Response`:\nawait client.files.create({ file: await fetch('https://somesite/file') });\n\n// Finally, if none of the above are convenient, you can use our `toFile` helper:\nawait client.files.create({ file: await toFile(Buffer.from('my bytes'), 'file') });\nawait client.files.create({ file: await toFile(new Uint8Array([0, 1, 2]), 'file') });\n```\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n\n```ts\nconst completion = await client.chat.completions\n .create({\n messages: [{ role: 'user', content: 'Hello, how are you?' }],\n model: 'openai/gpt-4o-mini',\n })\n .catch(async (err) => {\n if (err instanceof SGPClient.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n });\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n\n```js\n// Configure the default for all requests:\nconst client = new SGPClient({\n accountID: 'My Account ID',\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.chat.completions.create({ messages: [{ role: 'user', content: 'Hello, how are you?' }], model: 'openai/gpt-4o-mini' }, {\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n\n```ts\n// Configure the default for all requests:\nconst client = new SGPClient({\n accountID: 'My Account ID',\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.chat.completions.create({ messages: [{ role: 'user', content: 'Hello, how are you?' }], model: 'openai/gpt-4o-mini' }, {\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n## Auto-pagination\n\nList methods in the SGPClient API are paginated.\nYou can use the `for await … of` syntax to iterate through items across all pages:\n\n```ts\nasync function fetchAllInferenceModels(params) {\n const allInferenceModels = [];\n // Automatically fetches more pages as needed.\n for await (const inferenceModel of client.models.list({ limit: 10 })) {\n allInferenceModels.push(inferenceModel);\n }\n return allInferenceModels;\n}\n```\n\nAlternatively, you can request a single page at a time:\n\n```ts\nlet page = await client.models.list({ limit: 10 });\nfor (const inferenceModel of page.items) {\n console.log(inferenceModel);\n}\n\n// Convenience methods are provided for manually paginating:\nwhile (page.hasNextPage()) {\n page = await page.getNextPage();\n // ...\n}\n```\n\n\n\n## Advanced Usage\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n\n```ts\nconst client = new SGPClient();\n\nconst response = await client.chat.completions\n .create({\n messages: [{ role: 'user', content: 'Hello, how are you?' }],\n model: 'openai/gpt-4o-mini',\n })\n .asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: completion, response: raw } = await client.chat.completions\n .create({\n messages: [{ role: 'user', content: 'Hello, how are you?' }],\n model: 'openai/gpt-4o-mini',\n })\n .withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nconsole.log(completion);\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `SGP_CLIENT_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport SGPClient from 'scale-gp';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new SGPClient({\n logger: logger.child({ name: 'SGPClient' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.chat.completions.create({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport SGPClient from 'scale-gp';\nimport fetch from 'my-fetch';\n\nconst client = new SGPClient({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n **Node** [[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]\n\n```ts\nimport SGPClient from 'scale-gp';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new SGPClient({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n **Bun** [[docs](https://bun.sh/guides/http/proxy)]\n\n```ts\nimport SGPClient from 'scale-gp';\n\nconst client = new SGPClient({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n **Deno** [[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]\n\n```ts\nimport SGPClient from 'npm:scale-gp';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new SGPClient({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/scaleapi/sgp-typescript/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n", }, ]; const INDEX_OPTIONS = { fields: [ 'name', 'endpoint', 'summary', 'description', 'qualified', 'stainlessPath', 'content', 'sectionContext', ], storeFields: ['kind', '_original'], searchOptions: { prefix: true, fuzzy: 0.1, boost: { name: 5, stainlessPath: 3, endpoint: 3, qualified: 3, summary: 2, content: 1, description: 1, } as Record, }, }; /** * Self-contained local search engine backed by MiniSearch. * Method data is embedded at SDK build time; prose documents * can be loaded from an optional docs directory at runtime. */ export class LocalDocsSearch { private methodIndex: MiniSearch; private proseIndex: MiniSearch; private constructor() { this.methodIndex = new MiniSearch(INDEX_OPTIONS); this.proseIndex = new MiniSearch(INDEX_OPTIONS); } static async create(opts?: { docsDir?: string }): Promise { const instance = new LocalDocsSearch(); instance.indexMethods(EMBEDDED_METHODS); for (const readme of EMBEDDED_READMES) { instance.indexProse(readme.content, `readme:${readme.language}`); } if (opts?.docsDir) { await instance.loadDocsDirectory(opts.docsDir); } return instance; } search(props: { query: string; language?: string; detail?: string; maxResults?: number; maxLength?: number; }): SearchResult { const { query, language = 'typescript', detail = 'default', maxResults = 5, maxLength = 100_000 } = props; const useMarkdown = detail === 'verbose' || detail === 'high'; // Search both indices and merge results by score. // Filter prose hits so language-tagged content (READMEs and docs with // frontmatter) only matches the requested language. const methodHits = this.methodIndex .search(query) .map((hit) => ({ ...hit, _kind: 'http_method' as const })); const proseHits = this.proseIndex .search(query) .filter((hit) => { const source = ((hit as Record)['_original'] as ProseChunk | undefined)?.source; if (!source) return true; // Check for language-tagged sources: "readme:" or "lang::" let taggedLang: string | undefined; if (source.startsWith('readme:')) taggedLang = source.slice('readme:'.length); else if (source.startsWith('lang:')) taggedLang = source.split(':')[1]; if (!taggedLang) return true; return taggedLang === language || (language === 'javascript' && taggedLang === 'typescript'); }) .map((hit) => ({ ...hit, _kind: 'prose' as const })); const merged = [...methodHits, ...proseHits].sort((a, b) => b.score - a.score); const top = merged.slice(0, maxResults); const fullResults: (string | Record)[] = []; for (const hit of top) { const original = (hit as Record)['_original']; if (hit._kind === 'http_method') { const m = original as MethodEntry; if (useMarkdown && m.markdown) { fullResults.push(m.markdown); } else { // Use per-language data when available, falling back to the // top-level fields (which are TypeScript-specific in the // legacy codepath). const langData = m.perLanguage?.[language]; fullResults.push({ method: langData?.method ?? m.qualified, summary: m.summary, description: m.description, endpoint: `${m.httpMethod.toUpperCase()} ${m.endpoint}`, ...(langData?.example ? { example: langData.example } : {}), ...(m.params ? { params: m.params } : {}), ...(m.response ? { response: m.response } : {}), }); } } else { const c = original as ProseChunk; fullResults.push({ content: c.content, ...(c.source ? { source: c.source } : {}), }); } } let totalLength = 0; const results: (string | Record)[] = []; for (const result of fullResults) { const len = typeof result === 'string' ? result.length : JSON.stringify(result).length; totalLength += len; if (totalLength > maxLength) break; results.push(result); } if (results.length < fullResults.length) { results.unshift(`Truncated; showing ${results.length} of ${fullResults.length} results.`); } return { results }; } private indexMethods(methods: MethodEntry[]): void { const docs: MiniSearchDocument[] = methods.map((m, i) => ({ id: `method-${i}`, kind: 'http_method' as const, name: m.name, endpoint: m.endpoint, summary: m.summary, description: m.description, qualified: m.qualified, stainlessPath: m.stainlessPath, _original: m as unknown as Record, })); if (docs.length > 0) { this.methodIndex.addAll(docs); } } private async loadDocsDirectory(docsDir: string): Promise { let entries; try { entries = await fs.readdir(docsDir, { withFileTypes: true }); } catch (err) { getLogger().warn({ err, docsDir }, 'Could not read docs directory'); return; } const files = entries .filter((e) => e.isFile()) .filter((e) => e.name.endsWith('.md') || e.name.endsWith('.markdown') || e.name.endsWith('.json')); for (const file of files) { try { const filePath = path.join(docsDir, file.name); const content = await fs.readFile(filePath, 'utf-8'); if (file.name.endsWith('.json')) { const texts = extractTexts(JSON.parse(content)); if (texts.length > 0) { this.indexProse(texts.join('\n\n'), file.name); } } else { // Parse optional YAML frontmatter for language tagging. // Files with a "language" field in frontmatter will only // surface in searches for that language. // // Example: // --- // language: python // --- // # Error handling in Python // ... const frontmatter = parseFrontmatter(content); const source = frontmatter.language ? `lang:${frontmatter.language}:${file.name}` : file.name; this.indexProse(content, source); } } catch (err) { getLogger().warn({ err, file: file.name }, 'Failed to index docs file'); } } } private indexProse(markdown: string, source: string): void { const chunks = chunkMarkdown(markdown); const baseId = this.proseIndex.documentCount; const docs: MiniSearchDocument[] = chunks.map((chunk, i) => ({ id: `prose-${baseId + i}`, kind: 'prose' as const, content: chunk.content, ...(chunk.sectionContext != null ? { sectionContext: chunk.sectionContext } : {}), _original: { ...chunk, source } as unknown as Record, })); if (docs.length > 0) { this.proseIndex.addAll(docs); } } } /** Lightweight markdown chunker — splits on headers, chunks by word count. */ function chunkMarkdown(markdown: string): { content: string; tag: string; sectionContext?: string }[] { // Strip YAML frontmatter const stripped = markdown.replace(/^---\n[\s\S]*?\n---\n?/, ''); const lines = stripped.split('\n'); const chunks: { content: string; tag: string; sectionContext?: string }[] = []; const headers: string[] = []; let current: string[] = []; const flush = () => { const text = current.join('\n').trim(); if (!text) return; const sectionContext = headers.length > 0 ? headers.join(' > ') : undefined; // Split into ~200-word chunks const words = text.split(/\s+/); for (let i = 0; i < words.length; i += 200) { const slice = words.slice(i, i + 200).join(' '); if (slice) { chunks.push({ content: slice, tag: 'p', ...(sectionContext != null ? { sectionContext } : {}) }); } } current = []; }; for (const line of lines) { const headerMatch = line.match(/^(#{1,6})\s+(.+)/); if (headerMatch) { flush(); const level = headerMatch[1]!.length; const text = headerMatch[2]!.trim(); while (headers.length >= level) headers.pop(); headers.push(text); } else { current.push(line); } } flush(); return chunks; } /** Recursively extracts string values from a JSON structure. */ function extractTexts(data: unknown, depth = 0): string[] { if (depth > 10) return []; if (typeof data === 'string') return data.trim() ? [data] : []; if (Array.isArray(data)) return data.flatMap((item) => extractTexts(item, depth + 1)); if (typeof data === 'object' && data !== null) { return Object.values(data).flatMap((v) => extractTexts(v, depth + 1)); } return []; } /** Parses YAML frontmatter from a markdown string, extracting the language field if present. */ function parseFrontmatter(markdown: string): { language?: string } { const match = markdown.match(/^---\n([\s\S]*?)\n---/); if (!match) return {}; const body = match[1] ?? ''; const langMatch = body.match(/^language:\s*(.+)$/m); return langMatch ? { language: langMatch[1]!.trim() } : {}; }