{ "openapi": "3.1.0", "info": { "title": "Modaic API", "description": "A FastAPI application for Modaic", "version": "1.0.0" }, "paths": { "/api/v1/user/{userId}": { "get": { "summary": "Get User By Id", "operationId": "get_user_by_id_api_v1_user__userId__get", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string", "title": "Userid" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Delete User", "operationId": "delete_user_api_v1_user__userId__delete", "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "type": "string", "title": "Userid" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/user/username/{username}": { "get": { "summary": "Get User By Username", "operationId": "get_user_by_username_api_v1_user_username__username__get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "summary": "Update User", "description": "Update a user in the database", "operationId": "update_user_api_v1_user_username__username__put", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/user/check/email/": { "get": { "summary": "Check Email", "description": "Check if a user exists with the given email", "operationId": "check_email_api_v1_user_check_email__get", "parameters": [ { "name": "email", "in": "query", "required": true, "schema": { "type": "string", "title": "Email" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/user/check/username/{username}": { "get": { "summary": "Check Username", "description": "Check if a user exists with the given username", "operationId": "check_username_api_v1_user_check_username__username__get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/user/keys/ssh": { "post": { "summary": "Add Ssh Key", "description": "Add SSH public key", "operationId": "add_ssh_key_api_v1_user_keys_ssh_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddSSHKeyRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "summary": "List Ssh Keys", "description": "List user's SSH keys with their access token", "operationId": "list_ssh_keys_api_v1_user_keys_ssh_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/user/keys/ssh/{key_id}": { "get": { "summary": "Get Ssh Key", "description": "Get specific SSH key", "operationId": "get_ssh_key_api_v1_user_keys_ssh__key_id__get", "parameters": [ { "name": "key_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Key Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Delete Ssh Key", "description": "Delete SSH key", "operationId": "delete_ssh_key_api_v1_user_keys_ssh__key_id__delete", "parameters": [ { "name": "key_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Key Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/user/keys/gpg": { "post": { "summary": "Add Gpg Key", "description": "Add GPG public key", "operationId": "add_gpg_key_api_v1_user_keys_gpg_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddGPGKeyRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "summary": "List Gpg Keys", "description": "List user's GPG keys", "operationId": "list_gpg_keys_api_v1_user_keys_gpg_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/user/keys/gpg/{key_id}": { "get": { "summary": "Get Gpg Key", "description": "Get specific GPG key", "operationId": "get_gpg_key_api_v1_user_keys_gpg__key_id__get", "parameters": [ { "name": "key_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Key Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Delete Gpg Key", "description": "Delete GPG key", "operationId": "delete_gpg_key_api_v1_user_keys_gpg__key_id__delete", "parameters": [ { "name": "key_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Key Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/user/{username}/profile/picture": { "post": { "summary": "Update Profile Picture", "operationId": "update_profile_picture_api_v1_user__username__profile_picture_post", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_update_profile_picture_api_v1_user__username__profile_picture_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/user/find/search": { "get": { "summary": "Search Users", "description": "Search for users", "operationId": "search_users_api_v1_user_find_search_get", "parameters": [ { "name": "query", "in": "query", "required": true, "schema": { "type": "string", "title": "Query" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/user/billing/usage": { "get": { "summary": "Get User Usage Stats", "description": "Get logged in user's storage usage statistics", "operationId": "get_user_usage_stats_api_v1_user_billing_usage_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/validate-invite-code": { "post": { "summary": "Validate Invite Code", "description": "Check whether an invite code is valid.", "operationId": "validate_invite_code_api_v1_auth_validate_invite_code_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidateInviteCodeRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/callback": { "post": { "summary": "Oauth Callback", "description": "Handle OAuth callback from GoTrue (Google, GitHub).\n\nThe client-side callback page extracts tokens from the URL hash fragment\nand POSTs them here in the request body (tokens never appear in URLs/logs).", "operationId": "oauth_callback_api_v1_auth_callback_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OAuthCallbackRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/register": { "post": { "summary": "Register", "description": "Register a new user.\n\nCreates a user in Supabase Auth, then creates the user across\nall internal systems (PostgreSQL & Gitea) with automatic rollback on failure.", "operationId": "register_api_v1_auth_register_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/login": { "post": { "summary": "Login", "description": "Login an existing user.\n\nAuthenticates with Supabase Auth using email and password, verifies the user\nexists in the local database, and establishes a session.", "operationId": "login_api_v1_auth_login_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/me": { "get": { "summary": "Get Current User", "description": "Get the current user.", "operationId": "get_current_user_api_v1_auth_me_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/onboarding": { "post": { "summary": "Complete Onboarding", "description": "Complete user onboarding by updating profile information.", "operationId": "complete_onboarding_api_v1_auth_onboarding_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OnboardingPayload" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/session": { "delete": { "summary": "Logout", "description": "Log out the current user by revoking their GoTrue session and clearing cookies.", "operationId": "logout_api_v1_auth_session_delete", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/token/refresh": { "post": { "summary": "Refresh Token", "description": "Refresh an expired access token using the refresh token cookie.", "operationId": "refresh_token_api_v1_auth_token_refresh_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/auth/mfa/verify": { "post": { "summary": "Mfa Verify", "description": "Complete MFA verification during login by validating a TOTP code.\n\nCalled after /login returns ``requires_mfa: true``. The *mfa_ticket*\nis the aal1 access-token issued by GoTrue; on success it is exchanged\nfor an aal2 session whose cookies are set on the response.", "operationId": "mfa_verify_api_v1_auth_mfa_verify_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MfaVerifyRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/mfa/factors": { "get": { "summary": "Mfa List Factors", "description": "List the authenticated user's MFA factors.", "operationId": "mfa_list_factors_api_v1_auth_mfa_factors_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/mfa/enroll": { "post": { "summary": "Mfa Enroll", "description": "Start TOTP enrollment \u2014 returns a QR-code and secret for the authenticator app.", "operationId": "mfa_enroll_api_v1_auth_mfa_enroll_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/mfa/enroll/verify": { "post": { "summary": "Mfa Enroll Verify", "description": "Confirm TOTP enrollment by verifying the first code from the authenticator app.", "operationId": "mfa_enroll_verify_api_v1_auth_mfa_enroll_verify_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MfaEnrollVerifyRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/mfa/{factor_id}": { "delete": { "summary": "Mfa Unenroll", "description": "Remove an MFA factor from the authenticated user's account.\n\nUses the admin API so that verified factors can be deleted without\nrequiring the caller to hold an aal2 session token (which may have\nbeen downgraded by a token refresh).", "operationId": "mfa_unenroll_api_v1_auth_mfa__factor_id__delete", "parameters": [ { "name": "factor_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Factor Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/tokens/{username}": { "post": { "summary": "Create Token", "operationId": "create_token_api_v1_tokens__username__post", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTokenRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/tokens/{username}/id/{token_id}": { "delete": { "summary": "Delete Token", "operationId": "delete_token_api_v1_tokens__username__id__token_id__delete", "parameters": [ { "name": "token_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Token Id" } }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/tokens": { "get": { "summary": "Get Authenticated User Tokens", "description": "Get all personal (non-org-scoped) tokens for the authenticated user.\nOrg-scoped tokens (named \"{org}:{token}\") are excluded \u2014 use GET /orgs/{org_name} for those.", "operationId": "get_authenticated_user_tokens_api_v1_tokens_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/tokens/orgs/{org_name}": { "get": { "summary": "Get Org Tokens", "description": "Get tokens scoped to a specific organization for the authenticated user.\nOnly returns tokens whose name starts with \"{org_name}:\".\nThe org prefix is stripped from the name in the response.\nRequires org owner or admin membership.", "operationId": "get_org_tokens_api_v1_tokens_orgs__org_name__get", "parameters": [ { "name": "org_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Org Name" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/misc/licenses": { "get": { "summary": "List Licenses", "description": "List all available licenses from Gitea.\n\nReturns:\n List of license objects with name, key, and URL", "operationId": "list_licenses_api_v1_misc_licenses_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/chat/completions": { "post": { "summary": "Create Chat Completion", "operationId": "create_chat_completion_api_v1_chat_completions_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/payments/customer": { "post": { "tags": [ "Payment" ], "summary": "Ensure Customer", "description": "Ensure a Stripe customer exists for the current user or org", "operationId": "ensure_customer_api_v1_payments_customer_post", "parameters": [ { "name": "org", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/payments/setup-intent": { "post": { "tags": [ "Payment" ], "summary": "Create Setup Intent", "description": "Create a SetupIntent for saving a payment method", "operationId": "create_setup_intent_api_v1_payments_setup_intent_post", "parameters": [ { "name": "org", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetupIntentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/payments/confirm-payment-method": { "post": { "tags": [ "Payment" ], "summary": "Confirm Payment Method", "description": "Confirm and save a payment method after SetupIntent succeeds", "operationId": "confirm_payment_method_api_v1_payments_confirm_payment_method_post", "parameters": [ { "name": "org", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePaymentMethodRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentMethodSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/payments/payment-methods": { "get": { "tags": [ "Payment" ], "summary": "List Payment Methods", "description": "List all saved payment methods for the current user or org", "operationId": "list_payment_methods_api_v1_payments_payment_methods_get", "parameters": [ { "name": "org", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PaymentMethodSchema" }, "title": "Response List Payment Methods Api V1 Payments Payment Methods Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/payments/payment-methods/{payment_method_id}/make-default": { "post": { "tags": [ "Payment" ], "summary": "Make Default Payment Method", "description": "Make a payment method the default", "operationId": "make_default_payment_method_api_v1_payments_payment_methods__payment_method_id__make_default_post", "parameters": [ { "name": "payment_method_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Payment Method Id" } }, { "name": "org", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/payments/payment-methods/{payment_method_id}": { "delete": { "tags": [ "Payment" ], "summary": "Delete Payment Method", "description": "Delete a saved payment method", "operationId": "delete_payment_method_api_v1_payments_payment_methods__payment_method_id__delete", "parameters": [ { "name": "payment_method_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Payment Method Id" } }, { "name": "org", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/payments/subscriptions/pro/checkout-context": { "get": { "tags": [ "Subscriptions" ], "summary": "Get Checkout Context", "description": "Get checkout context including saved payment methods and pricing", "operationId": "get_checkout_context_api_v1_payments_subscriptions_pro_checkout_context_get", "parameters": [ { "name": "org", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CheckoutContextResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/payments/subscriptions/pro/start-with-saved": { "post": { "tags": [ "Subscriptions" ], "summary": "Start With Saved", "description": "Start subscription using saved payment method", "operationId": "start_with_saved_api_v1_payments_subscriptions_pro_start_with_saved_post", "parameters": [ { "name": "org", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StartWithSavedRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StartWithSavedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/payments/subscriptions/pro/create-intent-for-new-card": { "post": { "tags": [ "Subscriptions" ], "summary": "Create Intent For New Card", "description": "Create SetupIntent for new card subscription", "operationId": "create_intent_for_new_card_api_v1_payments_subscriptions_pro_create_intent_for_new_card_post", "parameters": [ { "name": "org", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateIntentForNewCardResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/payments/subscriptions/pro/create-subscription-with-new-card": { "post": { "tags": [ "Subscriptions" ], "summary": "Create Subscription With New Card", "description": "Create subscription using newly confirmed payment method", "operationId": "create_subscription_with_new_card_api_v1_payments_subscriptions_pro_create_subscription_with_new_card_post", "parameters": [ { "name": "org", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSubscriptionWithNewCardRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StartWithSavedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/payments/subscriptions/pro/confirm-new-card": { "post": { "tags": [ "Subscriptions" ], "summary": "Confirm New Card", "description": "Confirm subscription after PaymentIntent succeeds", "operationId": "confirm_new_card_api_v1_payments_subscriptions_pro_confirm_new_card_post", "parameters": [ { "name": "org", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfirmSubscriptionRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfirmSubscriptionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/payments/subscriptions/active": { "get": { "tags": [ "Subscriptions" ], "summary": "Get Active Subscription", "description": "Get the active subscription for the current user or org", "operationId": "get_active_subscription_api_v1_payments_subscriptions_active_get", "parameters": [ { "name": "org", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/payments/subscriptions/{subscription_id}/cancel": { "post": { "tags": [ "Subscriptions" ], "summary": "Cancel Subscription", "description": "Cancel a subscription at the end of the billing period", "operationId": "cancel_subscription_api_v1_payments_subscriptions__subscription_id__cancel_post", "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Subscription Id" } }, { "name": "org", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/payments/subscriptions/{subscription_id}/reactivate": { "post": { "tags": [ "Subscriptions" ], "summary": "Reactivate Subscription", "description": "Reactivate a canceled subscription", "operationId": "reactivate_subscription_api_v1_payments_subscriptions__subscription_id__reactivate_post", "parameters": [ { "name": "subscription_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Subscription Id" } }, { "name": "org", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/payments/invoices/latest": { "get": { "tags": [ "Invoices" ], "summary": "Get Latest Invoice", "description": "Get the latest invoice for the user's or org's subscription", "operationId": "get_latest_invoice_api_v1_payments_invoices_latest_get", "parameters": [ { "name": "org", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/payments/invoices": { "get": { "tags": [ "Invoices" ], "summary": "List Invoices", "description": "List all invoices for the user or org", "operationId": "list_invoices_api_v1_payments_invoices_get", "parameters": [ { "name": "org", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/payments/webhooks/stripe": { "post": { "tags": [ "Webhooks" ], "summary": "Stripe Webhook", "operationId": "stripe_webhook_api_v1_payments_webhooks_stripe_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/notifications/slack/install": { "get": { "summary": "Slack Install Url", "operationId": "slack_install_url_api_v1_notifications_slack_install_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/notifications/slack/callback": { "get": { "summary": "Slack Callback", "operationId": "slack_callback_api_v1_notifications_slack_callback_get", "parameters": [ { "name": "code", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Code" } }, { "name": "state", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "State" } }, { "name": "error", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/notifications/slack/status": { "get": { "summary": "Slack Status", "operationId": "slack_status_api_v1_notifications_slack_status_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/notifications/slack/{installation_id}": { "delete": { "summary": "Disconnect Slack", "operationId": "disconnect_slack_api_v1_notifications_slack__installation_id__delete", "parameters": [ { "name": "installation_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Installation Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/notifications/slack/{installation_id}/channels": { "get": { "summary": "List Slack Channels", "description": "List available Slack channels for an installation (via conversations.list API).", "operationId": "list_slack_channels_api_v1_notifications_slack__installation_id__channels_get", "parameters": [ { "name": "installation_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Installation Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "summary": "Set Selected Channels", "description": "Replace selected notification channels for an installation.", "operationId": "set_selected_channels_api_v1_notifications_slack__installation_id__channels_put", "parameters": [ { "name": "installation_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Installation Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetNotificationChannelsRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/notifications/slack/{installation_id}/selected-channels": { "get": { "summary": "Get Selected Channels", "description": "Return saved notification channels for an installation.", "operationId": "get_selected_channels_api_v1_notifications_slack__installation_id__selected_channels_get", "parameters": [ { "name": "installation_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Installation Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/notifications/slack/send-annotations": { "post": { "summary": "Send Annotations To Slack", "description": "Send annotation requests to Slack for the given examples.", "operationId": "send_annotations_to_slack_api_v1_notifications_slack_send_annotations_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendAnnotationRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendAnnotationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/notifications/slack/interactions": { "post": { "summary": "Slack Interactions", "description": "Handle Slack interactive message callbacks (button clicks).", "operationId": "slack_interactions_api_v1_notifications_slack_interactions_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/orgs/create": { "post": { "summary": "Create Organization", "operationId": "create_organization_api_v1_orgs_create_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_create_organization_api_v1_orgs_create_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/orgs/{org_name}/members": { "get": { "summary": "Get Organization Members", "operationId": "get_organization_members_api_v1_orgs__org_name__members_get", "parameters": [ { "name": "org_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Org Name" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "default": 1, "title": "Page" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 10, "title": "Limit" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/orgs/{org_name}/permissions": { "get": { "summary": "Get Organization Permissions", "operationId": "get_organization_permissions_api_v1_orgs__org_name__permissions_get", "parameters": [ { "name": "org_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Org Name" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/orgs/user/{username}": { "get": { "summary": "Get User Organizations", "operationId": "get_user_organizations_api_v1_orgs_user__username__get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/orgs/{org_name}/members/{username}": { "post": { "summary": "Add Organization Member", "operationId": "add_organization_member_api_v1_orgs__org_name__members__username__post", "parameters": [ { "name": "org_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Org Name" } }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddOrganizationMemberRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Remove Organization Member", "operationId": "remove_organization_member_api_v1_orgs__org_name__members__username__delete", "parameters": [ { "name": "org_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Org Name" } }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/orgs/{org_name}/members/{username}/role": { "patch": { "summary": "Change Organization Member Role", "operationId": "change_organization_member_role_api_v1_orgs__org_name__members__username__role_patch", "parameters": [ { "name": "org_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Org Name" } }, { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangeOrganizationMemberRoleRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/jobs/confidence-scores": { "post": { "summary": "Start Confidence Score Job", "description": "Start an async job to compute confidence scores for all predictions\nwith null confidence for the given repo.", "operationId": "start_confidence_score_job_api_v1_jobs_confidence_scores_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfidenceScoreJobRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/jobs/confidence-scores/{job_id}": { "get": { "summary": "Get Confidence Score Job Status", "description": "Get the status of a confidence score computation job.", "operationId": "get_confidence_score_job_status_api_v1_jobs_confidence_scores__job_id__get", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Cancel Confidence Score Job", "description": "Cancel a running confidence score computation job.", "operationId": "cancel_confidence_score_job_api_v1_jobs_confidence_scores__job_id__delete", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/jobs/gepa": { "post": { "summary": "Start Optimization Job", "description": "Start an async job to run GEPA optimization on an arbiter.\nUses annotated train/test predictions from ClickHouse to optimize the arbiter.\nRuns in an isolated Modal Sandbox for clean cancellation support.\n\nThe hub_jobs row is created *before* the sandbox starts so that the\nsandbox always has a row to update with logs and terminal state.", "operationId": "start_optimization_job_api_v1_jobs_gepa_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GepaJobRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/jobs/gepa/{job_id}": { "delete": { "summary": "Cancel Optimization Job", "description": "Cancel a running GEPA optimization job.\n\nOnly cancels if the job is still in the ``optimizing`` phase. If the\nsandbox already reached a terminal state (``finalizing`` or ``done``),\nthe UPDATE is a no-op so we don't clobber a successful result or\ninterfere with the finalization pipeline.", "operationId": "cancel_optimization_job_api_v1_jobs_gepa__job_id__delete", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "summary": "Get Optimization Job Status", "description": "Get the status of a GEPA optimization job.\n\nThis endpoint is a pure Postgres reader. The sandbox writes logs and\nterminal state directly to the hub_jobs row; a background Celery task\nhandles finalization (env_var cleanup, Slack notification, re-predict\ntrigger). Subsequent re-predict/scoring phases are tracked via the\n``phase`` column updated by the Celery pipeline.", "operationId": "get_optimization_job_status_api_v1_jobs_gepa__job_id__get", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GepaJobResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/jobs/gepa/{job_id}/logs": { "get": { "summary": "Get Optimization Job Logs", "description": "Get logs from a GEPA optimization job.\n\nLogs are written directly to Postgres by the sandbox \u2014 this endpoint\nis a pure reader.", "operationId": "get_optimization_job_logs_api_v1_jobs_gepa__job_id__logs_get", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/jobs": { "get": { "summary": "List Jobs", "description": "List recent hub jobs for a repo, newest first.", "operationId": "list_jobs_api_v1_jobs_get", "parameters": [ { "name": "repo", "in": "query", "required": true, "schema": { "type": "string", "title": "Repo" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 20, "title": "Limit" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/HubJobResponse" }, "title": "Response List Jobs Api V1 Jobs Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/jobs/batch/predictions": { "post": { "summary": "Start Batch Predictions Job", "description": "Start an async batch prediction job.\n\nTwo input modes (mutually exclusive):\n\n* ``examples`` \u2014 ingest brand-new examples and run predictions on them.\n* ``example_ids`` \u2014 re-predict existing examples (referenced by their\n ClickHouse ids). Predictions are inserted as new versions on the\n existing example rows; no new examples rows are written.\n\nWhen ``compute_confidence=True`` the worker pre-warms a probe scorer\ncontainer per arbiter and, after predictions persist, kicks off Modal\nbatch confidence scoring filtered to the prediction_ids produced by\nthis job (so we don't accidentally re-score unrelated NULL-confidence\nrows). Predictions are visible to clients during the scoring phase via\n``GET /results`` \u2014 confidence populates as Modal streams.\n\nPhases visible via ``GET /{job_id}`` and SSE: ``predicting \u2192 scoring \u2192\ndone`` (or ``failed``).", "operationId": "start_batch_predictions_job_api_v1_jobs_batch_predictions_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchPredictionsJobRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/jobs/batch/predictions/{job_id}": { "get": { "summary": "Get Batch Predictions Job Status", "description": "Get the latest snapshot for a batch predictions job.\n\nReturns the same `BatchPredictionsEvent` shape SSE forwards (minus the\nper-prediction payload). For the per-prediction list, use `GET /results`.\n\nMapping:\n * Celery PROGRESS \u2192 return the latest snapshot stored in `meta`.\n * Celery PENDING \u2192 synthesize a zeroed `event=\"start\"` snapshot.\n * Celery SUCCESS \u2192 return the terminal `event=\"finish\"` snapshot.\n * Celery FAILURE \u2192 synthesize an `event=\"finish\", status=\"failed\"` dict.\n * Celery REVOKED \u2192 synthesize an `event=\"finish\", status=\"failed\",\n error=\"cancelled\"` dict.", "operationId": "get_batch_predictions_job_status_api_v1_jobs_batch_predictions__job_id__get", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Cancel Batch Predictions Job", "description": "Cancel a running batch predictions job. Because all inserts happen in a\nsingle transaction at the end of the task, cancelling mid-execution leaves\nno partial state in ClickHouse.", "operationId": "cancel_batch_predictions_job_api_v1_jobs_batch_predictions__job_id__delete", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/jobs/batch/predictions/{job_id}/events": { "get": { "summary": "Stream Batch Predictions Events", "description": "Stream batch-job progress snapshots as SSE.\n\nEach frame is a `BatchPredictionsEvent`-shaped JSON payload (with the\nper-prediction field stripped server-side; clients fetch the canonical\nlist via `GET /results`). Frames carry both the SSE `id:` (Redis stream\nmsg id) and `event:` (the snapshot's `event` field \u2014 `start`,\n`prediction`, `score`, `finish`).\n\nResumption: clients automatically send `Last-Event-ID` on reconnect;\nwe use it as the `XREAD` start id so no events are missed (provided\nthe stream hasn't been trimmed past it).\n\nHeartbeats every ~15s keep proxies from idling the connection out.\nSynthetic terminal: if Celery reaches a terminal state without a\n`finish` snapshot reaching Redis, emit one so clients don't hang.", "operationId": "stream_batch_predictions_events_api_v1_jobs_batch_predictions__job_id__events_get", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/jobs/batch/predictions/{job_id}/results": { "get": { "summary": "Stream Batch Predictions Results", "description": "Stream results for a batch predictions job as application/x-ndjson.", "operationId": "stream_batch_predictions_results_api_v1_jobs_batch_predictions__job_id__results_get", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/arbiters/": { "get": { "summary": "Get Arbiter", "operationId": "get_arbiter_api_v1_arbiters__get", "parameters": [ { "name": "repo", "in": "query", "required": true, "schema": { "type": "string", "title": "Repo" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/arbiters/schema": { "get": { "summary": "Get Arbiter Schema Output", "operationId": "get_arbiter_schema_output_api_v1_arbiters_schema_get", "parameters": [ { "name": "repo", "in": "query", "required": true, "schema": { "type": "string", "title": "Repo" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/arbiters/predictions": { "post": { "summary": "Create Prediction", "operationId": "create_prediction_api_v1_arbiters_predictions_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__api__v1__arbiters__schemas__PredictExampleRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/arbiters/predictions/confidence": { "post": { "summary": "Get Prediction Confidence", "description": "Synchronous online confidence scoring keyed by request body.\n\nLets a caller score a fresh ``messages`` payload against an arbiter\nwithout first persisting a prediction. If ``prediction_id`` is provided,\nthe server also writes a versioned ``predictions`` row in-process with\nthe new embedding + confidence (Modal returns the embedding; head +\ncalibrator + CH insert happen server-side). Returns the score as a float.", "operationId": "get_prediction_confidence_api_v1_arbiters_predictions_confidence_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetConfidenceRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/arbiters/predictions/{prediction_id}/confidence": { "post": { "summary": "Enqueue Prediction Confidence", "description": "Idempotent: ensure a confidence score exists for ``prediction_id``.\n\n- 404 if the prediction is unknown to both Redis and ClickHouse.\n- 200 ``completed`` if ClickHouse already has a confidence value.\n- 202 ``queued`` otherwise (newly enqueued or already in flight).", "operationId": "enqueue_prediction_confidence_api_v1_arbiters_predictions__prediction_id__confidence_post", "parameters": [ { "name": "prediction_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Prediction Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfidenceStatusResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "summary": "Get Prediction Confidence Status", "description": "Read current state of the confidence resource for ``prediction_id``.\n\nReturns 404 when no one has POSTed and no row exists. Otherwise returns\n200 with status ``completed`` / ``queued`` / ``failed``.", "operationId": "get_prediction_confidence_status_api_v1_arbiters_predictions__prediction_id__confidence_get", "parameters": [ { "name": "prediction_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Prediction Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfidenceStatusResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/arbiters/predictions/{prediction_id}/confidence/stream": { "get": { "summary": "Stream Prediction Confidence", "description": "Stream the confidence result for ``prediction_id`` over SSE.\n\nEmits a ``status`` event on subscribe (``queued`` or ``completed``) and a\nterminal ``completed`` / ``failed`` event when the worker finishes. Sends\na comment line every ``STREAM_KEEPALIVE_INTERVAL_S`` seconds so idle\nproxies don't drop the connection. Closes after ``STREAM_WALL_CAP_S``\nseconds with a final ``status: queued`` event so the client reconnects\ninstead of holding open forever.\n\nReturns 404 if neither a CH row, a pending Redis prediction, nor a\nCelery task exists for ``prediction_id``. Returns 403 if the caller\nlacks read access on the arbiter repo.", "operationId": "stream_prediction_confidence_api_v1_arbiters_predictions__prediction_id__confidence_stream_get", "parameters": [ { "name": "prediction_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Prediction Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/arbiters/predictions/dispatch": { "post": { "summary": "Dispatch Prediction", "operationId": "dispatch_prediction_api_v1_arbiters_predictions_dispatch_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DispatchPredictionRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/arbiters/chat/completions": { "post": { "summary": "Create Chat Completion", "operationId": "create_chat_completion_api_v1_arbiters_chat_completions_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatCompletionRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatCompletionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/arbiters/supported-models": { "get": { "summary": "Get Supported Models", "operationId": "get_supported_models_api_v1_arbiters_supported_models_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/arbiters": { "post": { "summary": "Init Arbiter", "operationId": "init_arbiter_api_v1_arbiters_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InitArbiterRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/arbiters/metadata": { "patch": { "summary": "Update Arbiter Metadata", "description": "Patch YAML frontmatter metadata in the arbiter's README.md.", "operationId": "update_arbiter_metadata_api_v1_arbiters_metadata_patch", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateArbiterMetadataRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/env-vars/{owner_username}": { "get": { "summary": "List Env Vars", "operationId": "list_env_vars_api_v1_env_vars__owner_username__get", "parameters": [ { "name": "owner_username", "in": "path", "required": true, "schema": { "type": "string", "title": "Owner Username" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "summary": "Save Env Vars", "operationId": "save_env_vars_api_v1_env_vars__owner_username__post", "parameters": [ { "name": "owner_username", "in": "path", "required": true, "schema": { "type": "string", "title": "Owner Username" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertEnvVarsRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/examples": { "post": { "summary": "Ingest Examples", "operationId": "ingest_examples_api_v1_examples_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "summary": "List Examples", "description": "Offset-based pagination for examples within a single repo, ordered by (created_at, id) ascending.", "operationId": "list_examples_api_v1_examples_get", "parameters": [ { "name": "user", "in": "query", "required": true, "schema": { "type": "string", "title": "User" } }, { "name": "program", "in": "query", "required": true, "schema": { "type": "string", "title": "Program" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 30, "title": "Page Size" } }, { "name": "version", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Version" } }, { "name": "commit_hash", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Commit Hash" } }, { "name": "commit_hashes", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Comma-separated arbiter hashes to filter by", "title": "Commit Hashes" }, "description": "Comma-separated arbiter hashes to filter by" }, { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Search across input, output, and ground_truth", "title": "Search" }, "description": "Search across input, output, and ground_truth" }, { "name": "sort_by", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Column to sort by (output, ground_truth, confidence, version, input)", "title": "Sort By" }, "description": "Column to sort by (output, ground_truth, confidence, version, input)" }, { "name": "sort_order", "in": "query", "required": false, "schema": { "type": "string", "description": "Sort direction: asc or desc", "default": "asc", "title": "Sort Order" }, "description": "Sort direction: asc or desc" }, { "name": "max_confidence", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "description": "Only return predictions with confidence below this value", "title": "Max Confidence" }, "description": "Only return predictions with confidence below this value" }, { "name": "search_mode", "in": "query", "required": false, "schema": { "enum": [ "keyword", "semantic" ], "type": "string", "description": "Search mode: keyword or semantic", "default": "keyword", "title": "Search Mode" }, "description": "Search mode: keyword or semantic" }, { "name": "hide_graded", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Hide examples that already have ground truth", "default": false, "title": "Hide Graded" }, "description": "Hide examples that already have ground truth" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedPage" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Delete Examples", "description": "Delete one or more examples from a repo.", "operationId": "delete_examples_api_v1_examples_delete", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteExamplesRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/examples/export": { "post": { "summary": "Export Examples", "description": "Export a repo's latest prediction state as parquet and return a signed URL.", "operationId": "export_examples_api_v1_examples_export_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportExamplesRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportExamplesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/examples/export/download": { "get": { "summary": "Download Export", "description": "Stream an exported parquet file from S3.", "operationId": "download_export_api_v1_examples_export_download_get", "parameters": [ { "name": "file_key", "in": "query", "required": true, "schema": { "type": "string", "title": "File Key" } }, { "name": "file_name", "in": "query", "required": false, "schema": { "type": "string", "default": "export.parquet", "title": "File Name" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/examples/distinct-hashes": { "get": { "summary": "Get Distinct Hashes", "description": "Return distinct arbiter_hash values for the repo's latest predictions.", "operationId": "get_distinct_hashes_api_v1_examples_distinct_hashes_get", "parameters": [ { "name": "user", "in": "query", "required": true, "schema": { "type": "string", "title": "User" } }, { "name": "program", "in": "query", "required": true, "schema": { "type": "string", "title": "Program" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" }, "title": "Response Get Distinct Hashes Api V1 Examples Distinct Hashes Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/examples/has-uncalibrated": { "get": { "summary": "Has Uncalibrated Predictions", "description": "Check whether there are predictions without confidence scores.", "operationId": "has_uncalibrated_predictions_api_v1_examples_has_uncalibrated_get", "parameters": [ { "name": "user", "in": "query", "required": true, "schema": { "type": "string", "title": "User" } }, { "name": "program", "in": "query", "required": true, "schema": { "type": "string", "title": "Program" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Has Uncalibrated Predictions Api V1 Examples Has Uncalibrated Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/examples/graded-count": { "get": { "summary": "Get Graded Count", "description": "Count predictions that have been graded (have ground truth).", "operationId": "get_graded_count_api_v1_examples_graded_count_get", "parameters": [ { "name": "user", "in": "query", "required": true, "schema": { "type": "string", "title": "User" } }, { "name": "program", "in": "query", "required": true, "schema": { "type": "string", "title": "Program" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Graded Count Api V1 Examples Graded Count Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/examples/distinct-versions": { "get": { "summary": "Get Distinct Versions", "description": "Return distinct prediction version numbers for the repo.", "operationId": "get_distinct_versions_api_v1_examples_distinct_versions_get", "parameters": [ { "name": "user", "in": "query", "required": true, "schema": { "type": "string", "title": "User" } }, { "name": "program", "in": "query", "required": true, "schema": { "type": "string", "title": "Program" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "integer" }, "title": "Response Get Distinct Versions Api V1 Examples Distinct Versions Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/examples/confidence-distribution": { "get": { "summary": "Get Confidence Distribution", "description": "Return confidence score distribution as histogram bins.", "operationId": "get_confidence_distribution_api_v1_examples_confidence_distribution_get", "parameters": [ { "name": "user", "in": "query", "required": true, "schema": { "type": "string", "title": "User" } }, { "name": "program", "in": "query", "required": true, "schema": { "type": "string", "title": "Program" } }, { "name": "version", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Filter by prediction version", "title": "Version" }, "description": "Filter by prediction version" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Confidence Distribution Api V1 Examples Confidence Distribution Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/examples/prediction-volume": { "get": { "summary": "Get Prediction Volume", "description": "Return prediction counts bucketed by time.\n\n- granularity=daily \u2192 toStartOfDay (for month/week views)\n- granularity=hourly \u2192 toStartOfHour (for day view)\n- granularity=minute \u2192 toStartOfMinute (for hour view)", "operationId": "get_prediction_volume_api_v1_examples_prediction_volume_get", "parameters": [ { "name": "user", "in": "query", "required": true, "schema": { "type": "string", "title": "User" } }, { "name": "program", "in": "query", "required": true, "schema": { "type": "string", "title": "Program" } }, { "name": "starting_on", "in": "query", "required": true, "schema": { "type": "string", "title": "Starting On" } }, { "name": "ending_before", "in": "query", "required": true, "schema": { "type": "string", "title": "Ending Before" } }, { "name": "granularity", "in": "query", "required": false, "schema": { "enum": [ "daily", "hourly", "minute" ], "type": "string", "default": "daily", "title": "Granularity" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Prediction Volume Api V1 Examples Prediction Volume Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/examples/agreement": { "get": { "summary": "Get Agreement", "description": "Compute aggregated output-vs-ground-truth agreement across all graded examples.", "operationId": "get_agreement_api_v1_examples_agreement_get", "parameters": [ { "name": "user", "in": "query", "required": true, "schema": { "type": "string", "title": "User" } }, { "name": "program", "in": "query", "required": true, "schema": { "type": "string", "title": "Program" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Agreement Api V1 Examples Agreement Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/examples/{example_id}/annotation": { "patch": { "summary": "Patch Example", "description": "Updates an example annotation.", "operationId": "patch_example_api_v1_examples__example_id__annotation_patch", "parameters": [ { "name": "example_id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the example", "title": "Example Id" }, "description": "The ID of the example" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnnotateExampleRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/examples/{example_id}": { "get": { "summary": "Get Example By Id", "operationId": "get_example_by_id_api_v1_examples__example_id__get", "parameters": [ { "name": "example_id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the example", "title": "Example Id" }, "description": "The ID of the example" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PredictedExample" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/contact": { "post": { "summary": "Submit Contact Form", "operationId": "submit_contact_form_api_v1_contact_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactFormRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/usage/me": { "get": { "summary": "Get My Usage", "operationId": "get_my_usage_api_v1_usage_me_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/usage/orgs/{org_name}": { "get": { "summary": "Get Org Usage", "operationId": "get_org_usage_api_v1_usage_orgs__org_name__get", "parameters": [ { "name": "org_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Org Name" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/search": { "get": { "summary": "Search Repositories", "description": "Fetch *all* public repos from Gitea, then apply local filtering / sorting /\npagination. If `task` is given we keep only repos whose `topics` array\ncontains that task (case-insensitive). Response now includes `total_count`.", "operationId": "search_repositories_api_v2_repos_search_get", "parameters": [ { "name": "repo_type", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "program", "dataset" ], "type": "string" }, { "type": "null" } ], "description": "Type of repository to search for", "default": "program", "title": "Repo Type" }, "description": "Type of repository to search for" }, { "name": "q", "in": "query", "required": false, "schema": { "type": "string", "description": "Search query", "default": "", "title": "Q" }, "description": "Search query" }, { "name": "tags", "in": "query", "required": false, "schema": { "type": "string", "description": "Comma-separated list of tags to filter by", "default": "", "title": "Tags" }, "description": "Comma-separated list of tags to filter by" }, { "name": "sort", "in": "query", "required": false, "schema": { "type": "string", "description": "Sort by attribute", "default": "alpha", "title": "Sort" }, "description": "Sort by attribute" }, { "name": "order", "in": "query", "required": false, "schema": { "type": "string", "description": "Sort order", "default": "asc", "title": "Order" }, "description": "Sort order" }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "description": "Page number (1-based)", "default": 1, "title": "Page" }, "description": "Page number (1-based)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "description": "Results per page", "default": 20, "title": "Limit" }, "description": "Results per page" }, { "name": "license", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by licence", "title": "License" }, "description": "Filter by licence" }, { "name": "task", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Task keyword to match repo topics", "title": "Task" }, "description": "Task keyword to match repo topics" }, { "name": "autonomy_min", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Minimum autonomy level (0-100)", "title": "Autonomy Min" }, "description": "Minimum autonomy level (0-100)" }, { "name": "autonomy_max", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Maximum autonomy level (0-100)", "title": "Autonomy Max" }, "description": "Maximum autonomy level (0-100)" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}": { "get": { "summary": "Get User Repositories", "description": "Get all repos for a user by username. Gitea handles authentication logic.", "operationId": "get_user_repositories_api_v2_repos__username__get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos": { "post": { "summary": "Create Repository", "description": "Create a new repository for the authenticated user or organization.", "operationId": "create_repository_api_v2_repos_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateRepositoryRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}": { "delete": { "summary": "Delete Repository", "description": "Delete a repository by username and repo name.", "operationId": "delete_repository_api_v2_repos__username___repo_name__delete", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "is_arbiter", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Is Arbiter" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "summary": "Update Repository", "description": "Update a repository by username and repo name.", "operationId": "update_repository_api_v2_repos__username___repo_name__patch", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateRepositoryRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "summary": "Get Repository", "description": "Get repo by username and name.", "operationId": "get_repository_api_v2_repos__username___repo_name__get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/star/{username}/{repo_name}": { "put": { "summary": "Star Repository", "description": "Star a repository by username and repo name.", "operationId": "star_repository_api_v2_repos_star__username___repo_name__put", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/unstar/{username}/{repo_name}": { "delete": { "summary": "Unstar Repository", "description": "Unstar a repository by username and repo name.", "operationId": "unstar_repository_api_v2_repos_unstar__username___repo_name__delete", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/starred/{username}/{repo_name}": { "get": { "summary": "Check Starred Repository", "description": "Check if the authenticated user has starred a repository.", "operationId": "check_starred_repository_api_v2_repos_starred__username___repo_name__get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/languages": { "get": { "summary": "Get Repo Languages", "description": "Get the languages used in a repository.", "operationId": "get_repo_languages_api_v2_repos__username___repo_name__languages_get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/contents/{file_path}": { "get": { "summary": "Get Repo File Contents", "description": "Get file contents or directory listing from repo repository", "operationId": "get_repo_file_contents_api_v2_repos__username___repo_name__contents__file_path__get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "file_path", "in": "path", "required": true, "schema": { "type": "string", "title": "File Path" } }, { "name": "ref", "in": "query", "required": false, "schema": { "type": "string", "description": "Git reference (branch, tag, or commit SHA)", "default": "main", "title": "Ref" }, "description": "Git reference (branch, tag, or commit SHA)" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/raw/{file_path}": { "get": { "summary": "Get Repository Raw File", "description": "Get raw file contents from repo repository", "operationId": "get_repository_raw_file_api_v2_repos__username___repo_name__raw__file_path__get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "file_path", "in": "path", "required": true, "schema": { "type": "string", "title": "File Path" } }, { "name": "ref", "in": "query", "required": false, "schema": { "type": "string", "description": "Git reference (branch, tag, or commit SHA)", "default": "main", "title": "Ref" }, "description": "Git reference (branch, tag, or commit SHA)" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/git/trees/{sha}": { "get": { "summary": "Get Repository Git Tree", "description": "Get git tree object for repo repository", "operationId": "get_repository_git_tree_api_v2_repos__username___repo_name__git_trees__sha__get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "sha", "in": "path", "required": true, "schema": { "type": "string", "title": "Sha" } }, { "name": "recursive", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Whether to recursively fetch the entire tree", "default": false, "title": "Recursive" }, "description": "Whether to recursively fetch the entire tree" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/branches": { "get": { "summary": "Get Repository Branches", "description": "List all branches in repo repository", "operationId": "get_repository_branches_api_v2_repos__username___repo_name__branches_get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "description": "Page number", "default": 1, "title": "Page" }, "description": "Page number" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "description": "Number of branches per page", "default": 50, "title": "Limit" }, "description": "Number of branches per page" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/branches/{branch_name}": { "get": { "summary": "Get Repository Branch", "description": "Get specific branch information from repo repository", "operationId": "get_repository_branch_api_v2_repos__username___repo_name__branches__branch_name__get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "branch_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Branch Name" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/commits": { "get": { "summary": "Get Repository Commits", "description": "Get commit history for repo repository", "operationId": "get_repository_commits_api_v2_repos__username___repo_name__commits_get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "sha", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Branch name, tag, or commit SHA to start from", "title": "Sha" }, "description": "Branch name, tag, or commit SHA to start from" }, { "name": "path", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Only show commits containing this file path", "title": "Path" }, "description": "Only show commits containing this file path" }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "description": "Page number", "default": 1, "title": "Page" }, "description": "Page number" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "description": "Number of commits per page", "default": 50, "title": "Limit" }, "description": "Number of commits per page" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/commits/{sha}": { "get": { "summary": "Get Repository Commit", "description": "Get specific commit details from repo repository", "operationId": "get_repository_commit_api_v2_repos__username___repo_name__commits__sha__get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "sha", "in": "path", "required": true, "schema": { "type": "string", "title": "Sha" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/git/commits/{sha}": { "get": { "summary": "Get Repository Git Commit", "description": "Get git commit object from repo repository", "operationId": "get_repository_git_commit_api_v2_repos__username___repo_name__git_commits__sha__get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "sha", "in": "path", "required": true, "schema": { "type": "string", "title": "Sha" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/collaborators": { "get": { "summary": "Get Repository Collaborators", "description": "Get repository collaborators for repo", "operationId": "get_repository_collaborators_api_v2_repos__username___repo_name__collaborators_get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/contributors": { "get": { "summary": "Get Repository Contributors", "description": "Get repository contributors with commit statistics for repo", "operationId": "get_repository_contributors_api_v2_repos__username___repo_name__contributors_get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/issues": { "get": { "summary": "Get Repository Issues", "description": "List repository issues for repo", "operationId": "get_repository_issues_api_v2_repos__username___repo_name__issues_get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "state", "in": "query", "required": false, "schema": { "type": "string", "description": "Issue state (open, closed, all)", "default": "open", "title": "State" }, "description": "Issue state (open, closed, all)" }, { "name": "labels", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Comma-separated list of label names", "title": "Labels" }, "description": "Comma-separated list of label names" }, { "name": "q", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Search query for issues", "title": "Q" }, "description": "Search query for issues" }, { "name": "type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Issue type filter (issues, pulls)", "title": "Type" }, "description": "Issue type filter (issues, pulls)" }, { "name": "milestones", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Comma-separated list of milestone names", "title": "Milestones" }, "description": "Comma-separated list of milestone names" }, { "name": "since", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Only show issues updated after this time (ISO 8601)", "title": "Since" }, "description": "Only show issues updated after this time (ISO 8601)" }, { "name": "before", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Only show issues updated before this time (ISO 8601)", "title": "Before" }, "description": "Only show issues updated before this time (ISO 8601)" }, { "name": "created_by", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Only show issues created by this user", "title": "Created By" }, "description": "Only show issues created by this user" }, { "name": "assigned_by", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Only show issues assigned by this user", "title": "Assigned By" }, "description": "Only show issues assigned by this user" }, { "name": "mentioned_by", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Only show issues mentioning this user", "title": "Mentioned By" }, "description": "Only show issues mentioning this user" }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "description": "Page number", "default": 1, "title": "Page" }, "description": "Page number" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "description": "Number of issues per page", "default": 50, "title": "Limit" }, "description": "Number of issues per page" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "summary": "Create Repository Issue", "description": "Create new issue in repo repository", "operationId": "create_repository_issue_api_v2_repos__username___repo_name__issues_post", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateIssueRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/issues/{issue_number}": { "get": { "summary": "Get Repository Issue", "description": "Get issue from repo repository", "operationId": "get_repository_issue_api_v2_repos__username___repo_name__issues__issue_number__get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "issue_number", "in": "path", "required": true, "schema": { "type": "integer", "title": "Issue Number" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/issues/{issue_number}/comments": { "get": { "summary": "Get Repository Issue Comments", "description": "Get comments for issue in repo repository", "operationId": "get_repository_issue_comments_api_v2_repos__username___repo_name__issues__issue_number__comments_get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "issue_number", "in": "path", "required": true, "schema": { "type": "integer", "title": "Issue Number" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/pulls": { "get": { "summary": "Get Repository Pulls", "description": "List pull requests for repo repository", "operationId": "get_repository_pulls_api_v2_repos__username___repo_name__pulls_get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "state", "in": "query", "required": false, "schema": { "type": "string", "description": "PR state (open, closed, all)", "default": "open", "title": "State" }, "description": "PR state (open, closed, all)" }, { "name": "head", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by head branch (format: user:branch)", "title": "Head" }, "description": "Filter by head branch (format: user:branch)" }, { "name": "base", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by base branch", "title": "Base" }, "description": "Filter by base branch" }, { "name": "sort", "in": "query", "required": false, "schema": { "type": "string", "description": "Sort order (created, updated, popularity, long-running)", "default": "created", "title": "Sort" }, "description": "Sort order (created, updated, popularity, long-running)" }, { "name": "milestone", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by milestone name", "title": "Milestone" }, "description": "Filter by milestone name" }, { "name": "labels", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Comma-separated list of label names", "title": "Labels" }, "description": "Comma-separated list of label names" }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "description": "Page number", "default": 1, "title": "Page" }, "description": "Page number" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "description": "Number of PRs per page", "default": 50, "title": "Limit" }, "description": "Number of PRs per page" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "summary": "Create Repository Pull Request", "description": "Create pull request in repo repository", "operationId": "create_repository_pull_request_api_v2_repos__username___repo_name__pulls_post", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePullRequestRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/markdown": { "post": { "summary": "Render Markdown", "description": "Render markdown content to HTML", "operationId": "render_markdown_api_v2_repos_markdown_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarkdownRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/markdown/raw": { "post": { "summary": "Render Raw Markdown", "description": "Render raw markdown to HTML", "operationId": "render_raw_markdown_api_v2_repos_markdown_raw_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RawMarkdownRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/file/blob/{sha}": { "get": { "summary": "Get File Blob From Repository", "description": "Get file blob", "operationId": "get_file_blob_from_repository_api_v2_repos__username___repo_name__file_blob__sha__get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "sha", "in": "path", "required": true, "schema": { "type": "string", "title": "Sha" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/topics": { "put": { "summary": "Replace Repository Topics", "description": "Replace all repository topics for repo", "operationId": "replace_repository_topics_api_v2_repos__username___repo_name__topics_put", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TopicsRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/topics/{topic}": { "put": { "summary": "Add Repository Topic", "description": "Add topic to repo repository", "operationId": "add_repository_topic_api_v2_repos__username___repo_name__topics__topic__put", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "topic", "in": "path", "required": true, "schema": { "type": "string", "title": "Topic" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Delete Repository Topic", "description": "Delete topic from repo repository", "operationId": "delete_repository_topic_api_v2_repos__username___repo_name__topics__topic__delete", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "topic", "in": "path", "required": true, "schema": { "type": "string", "title": "Topic" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{username}/{repo_name}/collaborators/{collaborator}/permission": { "get": { "summary": "Get Repository Permissions", "description": "Get permissions for a collaborator on an repo repository", "operationId": "get_repository_permissions_api_v2_repos__username___repo_name__collaborators__collaborator__permission_get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "collaborator", "in": "path", "required": true, "schema": { "type": "string", "title": "Collaborator" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{entity_name}/{repo_name}/metadata": { "get": { "summary": "Get Repository Metadata", "description": "Get metadata for an repo repository", "operationId": "get_repository_metadata_api_v2_repos__entity_name___repo_name__metadata_get", "parameters": [ { "name": "entity_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Entity Name" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/repos/{entity_name}/{repo_name}/contents/{filepath}": { "put": { "summary": "Update Repository File", "description": "Update a file in a repo repository", "operationId": "update_repository_file_api_v2_repos__entity_name___repo_name__contents__filepath__put", "parameters": [ { "name": "entity_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Entity Name" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "filepath", "in": "path", "required": true, "schema": { "type": "string", "title": "Filepath" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateFileRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "summary": "Create Repository File", "description": "Create a file in a repo repository", "operationId": "create_repository_file_api_v2_repos__entity_name___repo_name__contents__filepath__post", "parameters": [ { "name": "entity_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Entity Name" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "filepath", "in": "path", "required": true, "schema": { "type": "string", "title": "Filepath" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateFileRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Delete Repository File", "description": "Delete a file from a repo repository", "operationId": "delete_repository_file_api_v2_repos__entity_name___repo_name__contents__filepath__delete", "parameters": [ { "name": "entity_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Entity Name" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Repo Name" } }, { "name": "filepath", "in": "path", "required": true, "schema": { "type": "string", "title": "Filepath" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteFileRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/users/search": { "get": { "summary": "Search Users", "description": "Search for users", "operationId": "search_users_api_v2_users_search_get", "parameters": [ { "name": "query", "in": "query", "required": true, "schema": { "type": "string", "title": "Query" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/users": { "get": { "summary": "Get Authenticated User", "description": "Get the current authenticated user.\n\n:return: The current authenticated user", "operationId": "get_authenticated_user_api_v2_users_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/users/id/{user_id}": { "get": { "summary": "Get User By Id", "operationId": "get_user_by_id_api_v2_users_id__user_id__get", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/users/{username}": { "get": { "summary": "Get User By Username", "description": "Get a user by username.\n\n:param username: The username of the user to get\n:param db: The database session\n:param session_user: The authenticated user\n:return: The user", "operationId": "get_user_by_username_api_v2_users__username__get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "summary": "Update User", "description": "Update a user in the database", "operationId": "update_user_api_v2_users__username__put", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/users/{user_id}": { "delete": { "summary": "Purge Delete User By Id", "description": "Delete a user.\n\n:param user_id: The ID of the user to delete\n:param user: The authenticated user\n:param db: The database session\n:return: The deleted user ID", "operationId": "purge_delete_user_by_id_api_v2_users__user_id__delete", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/users/check/{source_type}": { "get": { "summary": "Check User Exists By Email", "description": "Check if a user exists with the given type and value", "operationId": "check_user_exists_by_email_api_v2_users_check__source_type__get", "parameters": [ { "name": "source_type", "in": "path", "required": true, "schema": { "type": "string", "title": "Source Type" } }, { "name": "value", "in": "query", "required": true, "schema": { "type": "string", "title": "Value" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/users/keys/ssh": { "post": { "summary": "Add Ssh Key", "description": "Add SSH public key", "operationId": "add_ssh_key_api_v2_users_keys_ssh_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddSSHKeyRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "summary": "List Ssh Keys", "description": "List user's SSH keys with their access token", "operationId": "list_ssh_keys_api_v2_users_keys_ssh_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/users/keys/ssh/{key_id}": { "get": { "summary": "Get Ssh Key", "description": "Get specific SSH key", "operationId": "get_ssh_key_api_v2_users_keys_ssh__key_id__get", "parameters": [ { "name": "key_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Key Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Delete Ssh Key", "description": "Delete SSH key", "operationId": "delete_ssh_key_api_v2_users_keys_ssh__key_id__delete", "parameters": [ { "name": "key_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Key Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/users/keys/gpg": { "post": { "summary": "Add Gpg Key", "description": "Add GPG public key", "operationId": "add_gpg_key_api_v2_users_keys_gpg_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddGPGKeyRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "summary": "List Gpg Keys", "description": "List user's GPG keys", "operationId": "list_gpg_keys_api_v2_users_keys_gpg_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/users/keys/gpg/{key_id}": { "get": { "summary": "Get Gpg Key", "description": "Get specific GPG key", "operationId": "get_gpg_key_api_v2_users_keys_gpg__key_id__get", "parameters": [ { "name": "key_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Key Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Delete Gpg Key", "description": "Delete GPG key", "operationId": "delete_gpg_key_api_v2_users_keys_gpg__key_id__delete", "parameters": [ { "name": "key_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Key Id" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/users/{username}/profile-picture": { "post": { "summary": "Update Profile Picture", "operationId": "update_profile_picture_api_v2_users__username__profile_picture_post", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_update_profile_picture_api_v2_users__username__profile_picture_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/users/billing/usage": { "get": { "summary": "Get Authenticated User Usage Stats", "description": "Get logged in user's storage usage statistics", "operationId": "get_authenticated_user_usage_stats_api_v2_users_billing_usage_get", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/orgs": { "post": { "summary": "Create Organization", "description": "Create a new organization in Gitea.\n\nThis endpoint creates a new organization in Gitea with the provided details.\nThe organization will be created with the specified username, full name, and other details.", "operationId": "create_organization_api_v2_orgs_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_create_organization_api_v2_orgs_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/orgs/{org}/email": { "put": { "summary": "Change Organization Email", "operationId": "change_organization_email_api_v2_orgs__org__email_put", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string", "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangeOrganizationEmailRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/orgs/{org}": { "delete": { "summary": "Delete Organization", "description": "Purge-delete an organization and all its resources.\n\nFlow:\n1. Verify the requesting user is an org owner\n2. Delete all org repos (Gitea repos)\n3. Delete org-scoped Gitea tokens stored on user accounts\n4. Delete org from Gitea\n5. Delete org profile pictures from S3\n6. Delete org from the database\nBackground: Soft-delete ClickHouse examples/predictions via Celery", "operationId": "delete_organization_api_v2_orgs__org__delete", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string", "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/orgs/{org}/billing/usage": { "get": { "summary": "Get Org Billing Usage", "description": "Get storage usage statistics for an organization", "operationId": "get_org_billing_usage_api_v2_orgs__org__billing_usage_get", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string", "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/orgs/{org}/members": { "get": { "summary": "Get Organization Members", "description": "Get the list of members for a specific organization.\n\nThis endpoint retrieves the list of members for the specified organization.\nIt returns the members with their permissions and other details.", "operationId": "get_organization_members_api_v2_orgs__org__members_get", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string", "title": "Org" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "default": 1, "title": "Page" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 10, "title": "Limit" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/orgs/{org}/permissions": { "get": { "summary": "Get Organization Permissions", "description": "Get the permissions for the logged-in user in a specific organization.\n\nThis endpoint retrieves the permissions for the logged-in user in the specified organization.\nIt returns the permissions with their details and other information.", "operationId": "get_organization_permissions_api_v2_orgs__org__permissions_get", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string", "title": "Org" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/orgs/user/{username}": { "get": { "summary": "Get User Organizations", "description": "Get the list of organizations for a specific user.\n\nThis endpoint retrieves the list of organizations for the specified user.\nIt returns the organizations with their details and other information.", "operationId": "get_user_organizations_api_v2_orgs_user__username__get", "parameters": [ { "name": "username", "in": "path", "required": true, "schema": { "type": "string", "title": "Username" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/orgs/{org}/members/{member}": { "post": { "summary": "Add Organization Member", "description": "Add a member to an organization.\n\nThis endpoint adds a member to the specified organization with the provided permission.\nThe member will be added with the specified permission level.", "operationId": "add_organization_member_api_v2_orgs__org__members__member__post", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string", "title": "Org" } }, { "name": "member", "in": "path", "required": true, "schema": { "type": "string", "title": "Member" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddOrganizationMemberRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Remove Organization Member", "description": "Remove a member from an organization.\n\nThis endpoint removes a user from an organization in Gitea.\nOnly owners and admins can remove members from the organization.", "operationId": "remove_organization_member_api_v2_orgs__org__members__member__delete", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string", "title": "Org" } }, { "name": "member", "in": "path", "required": true, "schema": { "type": "string", "title": "Member" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/orgs/{org}/members/{member}/role": { "patch": { "summary": "Change Organization Member Role", "description": "Change the role of a member in an organization.\n\nThis endpoint changes the role of a user in an organization in Gitea.\nOnly owners and admins can change the role of members in the organization.", "operationId": "change_organization_member_role_api_v2_orgs__org__members__member__role_patch", "parameters": [ { "name": "org", "in": "path", "required": true, "schema": { "type": "string", "title": "Org" } }, { "name": "member", "in": "path", "required": true, "schema": { "type": "string", "title": "Member" } }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangeOrganizationMemberRoleRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/arbiters/predictions": { "post": { "summary": "Create Prediction", "description": "Run a single arbiter against a single example and return a flat result.\n\nUnlike v1's ``POST /api/v1/arbiters/predictions`` (which takes a list of\narbiters and wraps the response in a ``predictions`` array), v2 takes\nexactly one arbiter and returns ``{example_id, prediction_id, output,\nreasoning, messages}``.", "operationId": "create_prediction_api_v2_arbiters_predictions_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__api__v2__arbiters__schemas__PredictExampleRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PredictExampleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/examples/{example_id}/annotation": { "patch": { "summary": "Patch Example V2", "description": "Updates an example annotation using v2 dict-based ground truth format.", "operationId": "patch_example_v2_api_v2_examples__example_id__annotation_patch", "parameters": [ { "name": "example_id", "in": "path", "required": true, "schema": { "type": "string", "description": "The ID of the example", "title": "Example Id" }, "description": "The ID of the example" }, { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "modaic_session", "in": "cookie", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Modaic Session" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnnotateExampleRequestV2" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/waitlist": { "post": { "summary": "Join Waitlist", "operationId": "join_waitlist_api_v2_waitlist_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WaitlistRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/": { "get": { "summary": "Root", "operationId": "root__get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/badge": { "get": { "summary": "Read Badge", "description": "Return a simple placeholder payload for the badge endpoint.\nReplace this with logic to generate and return an actual badge (e.g., SVG).", "operationId": "read_badge_badge_get", "parameters": [ { "name": "link", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Link" } }, { "name": "repo", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Repo" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Read Badge Badge Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/health": { "get": { "summary": "Health Check", "operationId": "health_check_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } } }, "components": { "schemas": { "AddGPGKeyRequest": { "properties": { "armored_public_key": { "type": "string", "title": "Armored Public Key" } }, "type": "object", "required": [ "armored_public_key" ], "title": "AddGPGKeyRequest" }, "AddOrganizationMemberRequest": { "properties": { "permission": { "type": "string", "enum": [ "read", "write", "admin", "owner" ], "title": "Permission" } }, "type": "object", "required": [ "permission" ], "title": "AddOrganizationMemberRequest" }, "AddSSHKeyRequest": { "properties": { "title": { "type": "string", "title": "Title" }, "key": { "type": "string", "title": "Key" }, "read_only": { "type": "boolean", "title": "Read Only", "default": false } }, "type": "object", "required": [ "title", "key" ], "title": "AddSSHKeyRequest" }, "AnnotateExampleRequest": { "properties": { "annotations": { "items": { "$ref": "#/components/schemas/PredictionAnnotation" }, "type": "array", "title": "Annotations" } }, "type": "object", "required": [ "annotations" ], "title": "AnnotateExampleRequest", "description": "Annotate an example with one or more prediction annotations." }, "AnnotateExampleRequestV2": { "properties": { "annotations": { "items": { "$ref": "#/components/schemas/PredictionAnnotationV2" }, "type": "array", "title": "Annotations" } }, "type": "object", "required": [ "annotations" ], "title": "AnnotateExampleRequestV2", "description": "Annotate an example with one or more prediction annotations (v2 dict format)." }, "ArbiterRequest": { "properties": { "arbiter_repo": { "type": "string", "title": "Arbiter Repo" }, "arbiter_revision": { "type": "string", "title": "Arbiter Revision", "default": "main" }, "ground_truth": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ground Truth" }, "ground_reasoning": { "type": "string", "title": "Ground Reasoning", "default": "" } }, "type": "object", "required": [ "arbiter_repo" ], "title": "ArbiterRequest" }, "Author": { "properties": { "email": { "type": "string", "title": "Email" }, "name": { "type": "string", "title": "Name" } }, "type": "object", "required": [ "email", "name" ], "title": "Author" }, "BaseModel": { "properties": {}, "type": "object", "title": "BaseModel" }, "BatchArbiter": { "properties": { "arbiter_repo": { "type": "string", "title": "Arbiter Repo" }, "arbiter_revision": { "type": "string", "title": "Arbiter Revision", "default": "main" } }, "type": "object", "required": [ "arbiter_repo" ], "title": "BatchArbiter" }, "BatchExample": { "properties": { "input": { "additionalProperties": true, "type": "object", "title": "Input" }, "alt_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Alt Id" }, "ground_truth": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Ground Truth" }, "ground_reasoning": { "type": "string", "title": "Ground Reasoning", "default": "" }, "split": { "anyOf": [ { "type": "string", "enum": [ "train", "test", "none" ] }, { "type": "null" } ], "title": "Split" } }, "type": "object", "required": [ "input" ], "title": "BatchExample", "description": "One row in a batch predictions request.\n\nSplit contract (mirrors `examples/schemas.py::PredictedExample`):\nonly `\"train\"` and `\"test\"` are valid downstream \u2014 `\"none\"` exists\npurely as the storage marker for unannotated rows. Callers MUST NOT\nsend `\"none\"` explicitly; omit `split` instead and let `get_split`\nrandomly assign train/test (80/20) when `ground_truth` is provided.\nWithout that auto-assignment, annotated batch rows would land in\nClickHouse with `split='none'` and be skipped by every downstream\nconsumer (GEPA, scoring, dataset export)." }, "BatchPredictionsJobRequest": { "properties": { "arbiters": { "items": { "$ref": "#/components/schemas/BatchArbiter" }, "type": "array", "maxItems": 5, "minItems": 1, "title": "Arbiters" }, "examples": { "anyOf": [ { "items": { "$ref": "#/components/schemas/BatchExample" }, "type": "array", "maxItems": 1000, "minItems": 1 }, { "type": "null" } ], "title": "Examples" }, "example_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array", "maxItems": 1000, "minItems": 1 }, { "type": "null" } ], "title": "Example Ids" }, "compute_confidence": { "type": "boolean", "title": "Compute Confidence", "default": false } }, "type": "object", "required": [ "arbiters" ], "title": "BatchPredictionsJobRequest", "description": "Request body for ``POST /api/v1/jobs/batch/predictions``.\n\nEither ``examples`` or ``example_ids`` must be set, not both. The\n``example_ids`` path re-predicts existing examples (by their ClickHouse\nids) instead of ingesting brand-new ones; predictions are inserted as new\nversions on the existing example rows." }, "Body_create_organization_api_v1_orgs_create_post": { "properties": { "username": { "type": "string", "title": "Username" }, "fullName": { "type": "string", "title": "Fullname" }, "organizationType": { "type": "string", "title": "Organizationtype" }, "email": { "type": "string", "title": "Email" }, "bio": { "type": "string", "title": "Bio" }, "githubUrl": { "type": "string", "title": "Githuburl" }, "linkedinUrl": { "type": "string", "title": "Linkedinurl" }, "xUrl": { "type": "string", "title": "Xurl" }, "websiteUrl": { "type": "string", "title": "Websiteurl" }, "isOrganization": { "type": "boolean", "title": "Isorganization", "default": true }, "file": { "type": "string", "contentMediaType": "application/octet-stream", "title": "File" } }, "type": "object", "required": [ "username", "fullName", "organizationType" ], "title": "Body_create_organization_api_v1_orgs_create_post" }, "Body_create_organization_api_v2_orgs_post": { "properties": { "username": { "type": "string", "title": "Username" }, "fullName": { "type": "string", "title": "Fullname" }, "organizationType": { "type": "string", "title": "Organizationtype" }, "email": { "type": "string", "title": "Email" }, "bio": { "type": "string", "title": "Bio" }, "githubUrl": { "type": "string", "title": "Githuburl" }, "linkedinUrl": { "type": "string", "title": "Linkedinurl" }, "xUrl": { "type": "string", "title": "Xurl" }, "websiteUrl": { "type": "string", "title": "Websiteurl" }, "isOrganization": { "type": "boolean", "title": "Isorganization", "default": true }, "file": { "type": "string", "contentMediaType": "application/octet-stream", "title": "File" } }, "type": "object", "required": [ "username", "fullName", "organizationType" ], "title": "Body_create_organization_api_v2_orgs_post" }, "Body_update_profile_picture_api_v1_user__username__profile_picture_post": { "properties": { "isOrganization": { "type": "boolean", "title": "Isorganization" }, "file": { "type": "string", "contentMediaType": "application/octet-stream", "title": "File" } }, "type": "object", "required": [ "isOrganization", "file" ], "title": "Body_update_profile_picture_api_v1_user__username__profile_picture_post" }, "Body_update_profile_picture_api_v2_users__username__profile_picture_post": { "properties": { "isOrganization": { "type": "boolean", "title": "Isorganization" }, "file": { "type": "string", "contentMediaType": "application/octet-stream", "title": "File" } }, "type": "object", "required": [ "isOrganization", "file" ], "title": "Body_update_profile_picture_api_v2_users__username__profile_picture_post" }, "ChangeOrganizationEmailRequest": { "properties": { "email": { "type": "string", "format": "email", "title": "Email" } }, "type": "object", "required": [ "email" ], "title": "ChangeOrganizationEmailRequest" }, "ChangeOrganizationMemberRoleRequest": { "properties": { "permission": { "type": "string", "enum": [ "read", "write", "admin", "owner" ], "title": "Permission" } }, "type": "object", "required": [ "permission" ], "title": "ChangeOrganizationMemberRoleRequest" }, "ChatCompletionChoice": { "properties": { "index": { "type": "integer", "title": "Index" }, "message": { "$ref": "#/components/schemas/ChatMessage" }, "finish_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Finish Reason" } }, "type": "object", "required": [ "index", "message" ], "title": "ChatCompletionChoice" }, "ChatCompletionRequest": { "properties": { "model": { "type": "string", "title": "Model" }, "messages": { "items": { "$ref": "#/components/schemas/ChatMessage" }, "type": "array", "minItems": 1, "title": "Messages" }, "temperature": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Temperature", "default": 1.0 }, "top_p": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Top P", "default": 1.0 }, "n": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "N", "default": 1 }, "stream": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Stream", "default": false }, "stop": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Stop" }, "max_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Tokens" }, "presence_penalty": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Presence Penalty", "default": 0.0 }, "frequency_penalty": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Frequency Penalty", "default": 0.0 }, "logit_bias": { "anyOf": [ { "additionalProperties": { "type": "number" }, "type": "object" }, { "type": "null" } ], "title": "Logit Bias" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User" } }, "type": "object", "required": [ "model", "messages" ], "title": "ChatCompletionRequest" }, "ChatCompletionResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "object": { "type": "string", "title": "Object", "default": "chat.completion" }, "created": { "type": "integer", "title": "Created" }, "model": { "type": "string", "title": "Model" }, "choices": { "items": { "$ref": "#/components/schemas/ChatCompletionChoice" }, "type": "array", "title": "Choices" }, "usage": { "$ref": "#/components/schemas/CompletionUsage" }, "system_fingerprint": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "System Fingerprint" } }, "type": "object", "required": [ "model", "choices", "usage" ], "title": "ChatCompletionResponse" }, "ChatMessage": { "properties": { "role": { "type": "string", "title": "Role" }, "content": { "type": "string", "title": "Content" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "tool_calls": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Tool Calls" } }, "type": "object", "required": [ "role", "content" ], "title": "ChatMessage" }, "CheckoutContextResponse": { "properties": { "has_saved_payment_method": { "type": "boolean", "title": "Has Saved Payment Method" }, "default_payment_method": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Default Payment Method" }, "plan": { "additionalProperties": true, "type": "object", "title": "Plan" } }, "type": "object", "required": [ "has_saved_payment_method", "plan" ], "title": "CheckoutContextResponse", "description": "Response for checkout context." }, "Committer": { "properties": { "email": { "type": "string", "title": "Email" }, "name": { "type": "string", "title": "Name" } }, "type": "object", "required": [ "email", "name" ], "title": "Committer" }, "CompletionUsage": { "properties": { "prompt_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Prompt Tokens" }, "completion_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Completion Tokens" }, "total_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Total Tokens" } }, "type": "object", "required": [ "prompt_tokens", "completion_tokens", "total_tokens" ], "title": "CompletionUsage" }, "ConfidenceScoreJobRequest": { "properties": { "arbiter_repo": { "type": "string", "title": "Arbiter Repo" } }, "type": "object", "required": [ "arbiter_repo" ], "title": "ConfidenceScoreJobRequest" }, "ConfidenceStatusResponse": { "properties": { "status": { "type": "string", "enum": [ "queued", "completed", "failed" ], "title": "Status" }, "prediction_id": { "type": "string", "title": "Prediction Id" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Score" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" } }, "type": "object", "required": [ "status", "prediction_id" ], "title": "ConfidenceStatusResponse" }, "ConfirmSubscriptionRequest": { "properties": { "subscription_id": { "type": "string", "title": "Subscription Id" } }, "type": "object", "required": [ "subscription_id" ], "title": "ConfirmSubscriptionRequest", "description": "Request to confirm subscription." }, "ConfirmSubscriptionResponse": { "properties": { "status": { "type": "string", "title": "Status" }, "subscription_id": { "type": "string", "title": "Subscription Id" } }, "type": "object", "required": [ "status", "subscription_id" ], "title": "ConfirmSubscriptionResponse", "description": "Response for confirming subscription." }, "ContactFormRequest": { "properties": { "name": { "type": "string", "title": "Name" }, "email": { "type": "string", "format": "email", "title": "Email" }, "subject": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Subject" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "name", "email", "message" ], "title": "ContactFormRequest" }, "CreateFileRequest": { "properties": { "author": { "$ref": "#/components/schemas/Author" }, "branch": { "type": "string", "title": "Branch", "default": "main" }, "comitter": { "$ref": "#/components/schemas/Committer" }, "content": { "type": "string", "title": "Content" }, "message": { "type": "string", "title": "Message" }, "new_branch": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "New Branch" }, "signoff": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Signoff" } }, "type": "object", "required": [ "author", "comitter", "content", "message" ], "title": "CreateFileRequest" }, "CreateIntentForNewCardResponse": { "properties": { "subscription_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Subscription Id" }, "payment_intent_client_secret": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Payment Intent Client Secret" }, "publishable_key": { "type": "string", "title": "Publishable Key" }, "customer_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Customer Id" }, "price_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Price Id" }, "requires_setup": { "type": "boolean", "title": "Requires Setup", "default": false } }, "type": "object", "required": [ "publishable_key" ], "title": "CreateIntentForNewCardResponse", "description": "Response for creating intent for new card." }, "CreateIssueRequest": { "properties": { "title": { "type": "string", "title": "Title" }, "body": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Body" }, "assignee": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Assignee" }, "assignees": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Assignees" }, "milestone": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Milestone" }, "labels": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Labels" } }, "type": "object", "required": [ "title" ], "title": "CreateIssueRequest" }, "CreatePaymentMethodRequest": { "properties": { "setupIntentId": { "type": "string", "minLength": 1, "title": "Setupintentid" } }, "type": "object", "required": [ "setupIntentId" ], "title": "CreatePaymentMethodRequest", "description": "Request schema for creating/saving a payment method." }, "CreatePullRequestRequest": { "properties": { "title": { "type": "string", "title": "Title" }, "head": { "type": "string", "title": "Head" }, "base": { "type": "string", "title": "Base" }, "body": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Body" }, "assignee": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Assignee" }, "assignees": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Assignees" }, "reviewers": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Reviewers" }, "team_reviewers": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Team Reviewers" }, "milestone": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Milestone" }, "labels": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Labels" } }, "type": "object", "required": [ "title", "head", "base" ], "title": "CreatePullRequestRequest" }, "CreateRepositoryRequest": { "properties": { "username": { "type": "string", "title": "Username" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description", "default": "" }, "private": { "type": "boolean", "title": "Private", "default": false }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "License", "default": "" }, "issue_labels": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Issue Labels" }, "auto_init": { "type": "boolean", "title": "Auto Init", "default": false }, "gitignores": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Gitignores", "default": "" }, "readme": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Readme", "default": "" }, "default_branch": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Default Branch", "default": "main" }, "template": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Template", "default": false }, "trust_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trust Model", "default": "default" }, "topics": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Topics" } }, "type": "object", "required": [ "username", "name" ], "title": "CreateRepositoryRequest" }, "CreateSubscriptionWithNewCardRequest": { "properties": { "customer_id": { "type": "string", "title": "Customer Id" }, "price_id": { "type": "string", "title": "Price Id" }, "payment_method_id": { "type": "string", "title": "Payment Method Id" }, "promotion_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Promotion Code" } }, "type": "object", "required": [ "customer_id", "price_id", "payment_method_id" ], "title": "CreateSubscriptionWithNewCardRequest", "description": "Request to create subscription with new payment method." }, "CreateTokenRequest": { "properties": { "tokenName": { "type": "string", "title": "Tokenname" }, "scopes": { "items": { "type": "string" }, "type": "array", "title": "Scopes" }, "orgName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Orgname" } }, "type": "object", "required": [ "tokenName", "scopes" ], "title": "CreateTokenRequest" }, "CustomerResponse": { "properties": { "stripe_customer_id": { "type": "string", "title": "Stripe Customer Id" } }, "type": "object", "required": [ "stripe_customer_id" ], "title": "CustomerResponse", "description": "Response for customer creation/retrieval." }, "DeleteExamplesRequest": { "properties": { "example_ids": { "items": { "type": "string" }, "type": "array", "title": "Example Ids" }, "arbiter_repo": { "type": "string", "title": "Arbiter Repo" } }, "type": "object", "required": [ "example_ids", "arbiter_repo" ], "title": "DeleteExamplesRequest", "description": "Delete one or more examples from a repo." }, "DeleteFileRequest": { "properties": { "author": { "$ref": "#/components/schemas/Author" }, "branch": { "type": "string", "title": "Branch", "default": "main" }, "comitter": { "$ref": "#/components/schemas/Committer" }, "message": { "type": "string", "title": "Message" }, "new_branch": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "New Branch" }, "sha": { "type": "string", "title": "Sha" }, "signoff": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Signoff" } }, "type": "object", "required": [ "author", "comitter", "message", "sha" ], "title": "DeleteFileRequest" }, "DispatchPredictionRequest": { "properties": { "input": { "additionalProperties": true, "type": "object", "title": "Input" }, "arbiters_map": { "additionalProperties": { "$ref": "#/components/schemas/ArbiterRequest" }, "type": "object", "title": "Arbiters Map" }, "alt_id": { "type": "string", "title": "Alt Id" } }, "type": "object", "required": [ "input", "arbiters_map", "alt_id" ], "title": "DispatchPredictionRequest", "description": "Request to dispatch a prediction to multiple arbiters. Will get the prediction then send it to a backend of choice.\nArgs:\n input: The input to the prediction.\n arbiters_map: A map of score names to arbiter requests." }, "EnvVarItem": { "properties": { "key": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Key" }, "value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Value" } }, "type": "object", "required": [ "key" ], "title": "EnvVarItem" }, "ExportExamplesRequest": { "properties": { "arbiter_repo": { "type": "string", "title": "Arbiter Repo" } }, "type": "object", "required": [ "arbiter_repo" ], "title": "ExportExamplesRequest", "description": "Export examples and predictions for a repo." }, "ExportExamplesResponse": { "properties": { "download_url": { "type": "string", "title": "Download Url" }, "file_key": { "type": "string", "title": "File Key" }, "file_name": { "type": "string", "title": "File Name" }, "expires_in": { "type": "integer", "title": "Expires In" }, "row_count": { "type": "integer", "title": "Row Count" } }, "type": "object", "required": [ "download_url", "file_key", "file_name", "expires_in", "row_count" ], "title": "ExportExamplesResponse", "description": "A presigned parquet download for exported examples." }, "FieldSchema": { "properties": { "name": { "type": "string", "title": "Name" }, "type": { "type": "string", "title": "Type" }, "allowed_values": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "title": "Allowed Values" }, "object_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Object Schema" }, "nullable": { "type": "boolean", "title": "Nullable", "default": false }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, "type": "object", "required": [ "name", "type" ], "title": "FieldSchema" }, "GepaJobRequest": { "properties": { "arbiter_repo": { "type": "string", "title": "Arbiter Repo" }, "arbiter_revision": { "type": "string", "title": "Arbiter Revision", "default": "main" }, "push_branch": { "type": "string", "title": "Push Branch", "default": "main" }, "push_tag": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Push Tag" }, "gepa_kwargs": { "$ref": "#/components/schemas/GepaKwargs" } }, "type": "object", "required": [ "arbiter_repo" ], "title": "GepaJobRequest" }, "GepaJobResponse": { "properties": { "job_id": { "type": "string", "title": "Job Id" }, "status": { "type": "string", "enum": [ "in_progress", "completed", "failed" ], "title": "Status" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message" }, "results": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Results" }, "phase": { "anyOf": [ { "type": "string", "enum": [ "optimizing", "finalizing", "re_predicting", "scoring", "tuning", "done" ] }, { "type": "null" } ], "title": "Phase" }, "commit_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Commit Hash" } }, "type": "object", "required": [ "job_id", "status" ], "title": "GepaJobResponse" }, "GepaKwargs": { "properties": { "auto": { "anyOf": [ { "type": "string", "enum": [ "light", "medium", "heavy" ] }, { "type": "null" } ], "title": "Auto" }, "max_full_evals": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Full Evals" }, "max_metric_calls": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Metric Calls" }, "reflection_minibatch_size": { "type": "integer", "title": "Reflection Minibatch Size", "default": 3 }, "candidate_selection_strategy": { "type": "string", "enum": [ "pareto", "current_best" ], "title": "Candidate Selection Strategy", "default": "pareto" }, "reflection_lm": { "anyOf": [ { "$ref": "#/components/schemas/LM" }, { "type": "null" } ], "default": { "model": "openai/gpt-5.5" } }, "skip_perfect_score": { "type": "boolean", "title": "Skip Perfect Score", "default": true }, "add_format_failure_as_feedback": { "type": "boolean", "title": "Add Format Failure As Feedback", "default": false }, "component_selector": { "type": "string", "enum": [ "round_robin", "all" ], "title": "Component Selector", "default": "round_robin" }, "use_merge": { "type": "boolean", "title": "Use Merge", "default": true }, "max_merge_invocations": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Merge Invocations", "default": 5 }, "seed": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Seed", "default": 0 }, "gepa_kwargs": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Gepa Kwargs" } }, "type": "object", "title": "GepaKwargs" }, "GetConfidenceRequest": { "properties": { "arbiter_repo": { "type": "string", "title": "Arbiter Repo" }, "prediction_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Prediction Id" }, "messages": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Messages" } }, "type": "object", "required": [ "arbiter_repo", "messages" ], "title": "GetConfidenceRequest" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "HubJobResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "job_type": { "type": "string", "title": "Job Type" }, "arbiter_repo": { "type": "string", "title": "Arbiter Repo" }, "backend_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Backend Id" }, "status": { "type": "string", "title": "Status" }, "phase": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Phase" }, "result": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Result" }, "commit_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Commit Hash" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "logs": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Logs" }, "slack_notifications": { "type": "boolean", "title": "Slack Notifications", "default": true }, "created_at": { "type": "string", "title": "Created At" }, "started_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Completed At" }, "updated_at": { "type": "string", "title": "Updated At" } }, "type": "object", "required": [ "id", "job_type", "arbiter_repo", "status", "created_at", "updated_at" ], "title": "HubJobResponse", "description": "Serializable view of a HubJob Postgres row returned to API callers." }, "InitArbiterRequest": { "properties": { "repo": { "type": "string", "title": "Repo" }, "inputs": { "items": { "$ref": "#/components/schemas/FieldSchema" }, "type": "array", "title": "Inputs" }, "outputs": { "items": { "$ref": "#/components/schemas/FieldSchema" }, "type": "array", "title": "Outputs" }, "instructions": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Instructions" }, "model": { "type": "string", "title": "Model", "default": "qwen3-vl-32b-instruct" }, "base_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Base Url" } }, "type": "object", "required": [ "repo", "inputs", "outputs" ], "title": "InitArbiterRequest" }, "LM": { "properties": { "model": { "type": "string", "title": "Model" }, "kwargs": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Kwargs" } }, "type": "object", "required": [ "model" ], "title": "LM" }, "LoginRequest": { "properties": { "email": { "type": "string", "title": "Email" }, "password": { "type": "string", "title": "Password" }, "returnTo": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Returnto" } }, "type": "object", "required": [ "email", "password" ], "title": "LoginRequest" }, "MarkdownRequest": { "properties": { "text": { "type": "string", "title": "Text" }, "mode": { "type": "string", "title": "Mode", "default": "markdown" }, "context": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Context" }, "wiki": { "type": "boolean", "title": "Wiki", "default": false } }, "type": "object", "required": [ "text" ], "title": "MarkdownRequest" }, "MfaEnrollVerifyRequest": { "properties": { "factor_id": { "type": "string", "title": "Factor Id" }, "code": { "type": "string", "title": "Code" } }, "type": "object", "required": [ "factor_id", "code" ], "title": "MfaEnrollVerifyRequest" }, "MfaVerifyRequest": { "properties": { "mfa_ticket": { "type": "string", "title": "Mfa Ticket" }, "factor_id": { "type": "string", "title": "Factor Id" }, "code": { "type": "string", "title": "Code" } }, "type": "object", "required": [ "mfa_ticket", "factor_id", "code" ], "title": "MfaVerifyRequest" }, "OAuthCallbackRequest": { "properties": { "access_token": { "type": "string", "title": "Access Token" }, "refresh_token": { "type": "string", "title": "Refresh Token", "default": "" }, "invite_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Invite Code" } }, "type": "object", "required": [ "access_token" ], "title": "OAuthCallbackRequest" }, "OnboardingPayload": { "properties": { "firstName": { "type": "string", "title": "Firstname" }, "lastName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Lastname", "default": "" }, "username": { "type": "string", "title": "Username" }, "bio": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Bio", "default": "" }, "occupation": { "type": "string", "title": "Occupation" }, "company": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Company", "default": "" }, "purpose": { "type": "string", "title": "Purpose" }, "interest": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Interest", "default": "" } }, "type": "object", "required": [ "firstName", "username", "occupation", "purpose" ], "title": "OnboardingPayload" }, "PaginatedPage": { "properties": { "items": { "items": { "$ref": "#/components/schemas/PredictedExample" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "unfiltered_total": { "type": "integer", "title": "Unfiltered Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" }, "total_pages": { "type": "integer", "title": "Total Pages" } }, "type": "object", "required": [ "items", "total", "unfiltered_total", "page", "page_size", "total_pages" ], "title": "PaginatedPage" }, "PaymentMethodSchema": { "properties": { "id": { "type": "integer", "title": "Id" }, "userId": { "type": "string", "title": "Userid" }, "stripePaymentMethodId": { "type": "string", "title": "Stripepaymentmethodid" }, "brand": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Brand" }, "last4": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last4" }, "expMonth": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Expmonth" }, "expYear": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Expyear" }, "isDefault": { "type": "boolean", "title": "Isdefault", "default": false }, "created": { "type": "string", "title": "Created" }, "updated": { "type": "string", "title": "Updated" } }, "type": "object", "required": [ "id", "userId", "stripePaymentMethodId", "created", "updated" ], "title": "PaymentMethodSchema", "description": "Full payment method schema." }, "PredictExampleResponse": { "properties": { "example_id": { "type": "string", "title": "Example Id" }, "prediction_id": { "type": "string", "title": "Prediction Id" }, "output": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Output" }, "reasoning": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reasoning" }, "messages": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Messages" } }, "type": "object", "required": [ "example_id", "prediction_id" ], "title": "PredictExampleResponse" }, "PredictedExample": { "properties": { "id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Id" }, "alt_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Alt Id" }, "arbiter_repo": { "type": "string", "title": "Arbiter Repo" }, "arbiter_hash": { "type": "string", "title": "Arbiter Hash", "default": "" }, "input": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "string" }, { "type": "null" } ], "title": "Input" }, "ground_truth": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ground Truth" }, "ground_reasoning": { "type": "string", "title": "Ground Reasoning", "default": "" }, "messages": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Messages" }, "serialized_output": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Serialized Output" }, "reasoning": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reasoning" }, "error": { "type": "string", "title": "Error", "default": "" }, "split": { "anyOf": [ { "type": "string", "enum": [ "train", "test", "none" ] }, { "type": "null" } ], "title": "Split" }, "version": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Version" }, "prediction_timestamp": { "type": "string", "format": "date-time", "title": "Prediction Timestamp" }, "confidence": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Confidence" } }, "type": "object", "required": [ "arbiter_repo" ], "title": "PredictedExample", "description": "A predicted example from a arbiter.\nUsed for both ingestion (POST) and retrieval (GET) of examples.\n\nSplit contract: `\"none\"` is the ClickHouse marker for unannotated\nrows. Callers MUST NOT send `\"none\"` explicitly \u2014 omit `split` and\nlet `get_split` decide. When `ground_truth` is set, `get_split`\nrandomly assigns train/test (80/20); when it isn't, split is forced\nto `\"none\"`. Downstream consumers (GEPA, scoring, dataset export)\nfilter on `split in ('train','test')`, so a row stuck at `\"none\"`\nis invisible to them. The same rule lives on\n`jobs/schemas.py::BatchExample`; if you change one, change the other." }, "PredictionAnnotation": { "properties": { "arbiter_repo": { "type": "string", "title": "Arbiter Repo" }, "ground_truth": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ground Truth" }, "ground_reasoning": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ground Reasoning" } }, "type": "object", "required": [ "arbiter_repo" ], "title": "PredictionAnnotation", "description": "A single annotation for a specific arbiter's prediction." }, "PredictionAnnotationV2": { "properties": { "arbiter_repo": { "type": "string", "title": "Arbiter Repo" }, "ground_truth": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Ground Truth" }, "ground_reasoning": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ground Reasoning" } }, "type": "object", "required": [ "arbiter_repo" ], "title": "PredictionAnnotationV2", "description": "A single annotation for a specific arbiter's prediction.\n\nV2 uses a dict for ground_truth (field_name -> value) instead of a\nplain string, matching the format used by batch predictions." }, "RawMarkdownRequest": { "properties": { "text": { "type": "string", "title": "Text" } }, "type": "object", "required": [ "text" ], "title": "RawMarkdownRequest" }, "RegisterRequest": { "properties": { "email": { "type": "string", "title": "Email" }, "password": { "type": "string", "title": "Password" }, "username": { "type": "string", "title": "Username" }, "fullName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Fullname" }, "returnTo": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Returnto" }, "inviteCode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Invitecode" } }, "type": "object", "required": [ "email", "password", "username" ], "title": "RegisterRequest" }, "SchemaField": { "properties": { "title": { "type": "string", "title": "Title" }, "type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Type" }, "enum": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Enum" } }, "type": "object", "required": [ "title" ], "title": "SchemaField" }, "SendAnnotationRequest": { "properties": { "example_ids": { "items": { "type": "string" }, "type": "array", "title": "Example Ids" }, "arbiter_repo": { "type": "string", "title": "Arbiter Repo" }, "enum_values": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Enum Values" }, "schema_fields": { "anyOf": [ { "additionalProperties": { "$ref": "#/components/schemas/SchemaField" }, "type": "object" }, { "type": "null" } ], "title": "Schema Fields" }, "schema_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Schema Type" }, "annotation_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Annotation Url" } }, "type": "object", "required": [ "example_ids", "arbiter_repo" ], "title": "SendAnnotationRequest" }, "SendAnnotationResponse": { "properties": { "sent": { "type": "integer", "title": "Sent" }, "failed": { "type": "integer", "title": "Failed" }, "skipped": { "type": "integer", "title": "Skipped" } }, "type": "object", "required": [ "sent", "failed", "skipped" ], "title": "SendAnnotationResponse" }, "SetNotificationChannelsRequest": { "properties": { "installationId": { "type": "integer", "title": "Installationid" }, "channels": { "items": { "$ref": "#/components/schemas/SlackChannel" }, "type": "array", "title": "Channels" } }, "type": "object", "required": [ "installationId", "channels" ], "title": "SetNotificationChannelsRequest" }, "SetupIntentResponse": { "properties": { "client_secret": { "type": "string", "title": "Client Secret" }, "id": { "type": "string", "title": "Id" } }, "type": "object", "required": [ "client_secret", "id" ], "title": "SetupIntentResponse", "description": "Response for setup intent creation." }, "SlackChannel": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "is_private": { "type": "boolean", "title": "Is Private", "default": false } }, "type": "object", "required": [ "id", "name" ], "title": "SlackChannel" }, "StartWithSavedRequest": { "properties": { "use_saved_payment_method": { "type": "boolean", "title": "Use Saved Payment Method" }, "promotion_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Promotion Code" } }, "type": "object", "required": [ "use_saved_payment_method" ], "title": "StartWithSavedRequest", "description": "Request to start subscription with saved payment method." }, "StartWithSavedResponse": { "properties": { "subscription_id": { "type": "string", "title": "Subscription Id" }, "status": { "type": "string", "title": "Status" }, "requires_client_action": { "type": "boolean", "title": "Requires Client Action" }, "payment_intent_client_secret": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Payment Intent Client Secret" } }, "type": "object", "required": [ "subscription_id", "status", "requires_client_action" ], "title": "StartWithSavedResponse", "description": "Response for starting subscription with saved method." }, "TopicsRequest": { "properties": { "topics": { "items": { "type": "string" }, "type": "array", "title": "Topics" } }, "type": "object", "required": [ "topics" ], "title": "TopicsRequest" }, "UpdateArbiterMetadataRequest": { "properties": { "repo": { "type": "string", "title": "Repo" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" } }, "type": "object", "required": [ "repo", "metadata" ], "title": "UpdateArbiterMetadataRequest" }, "UpdateFileRequest": { "properties": { "author": { "$ref": "#/components/schemas/Author" }, "branch": { "type": "string", "title": "Branch", "default": "main" }, "comitter": { "$ref": "#/components/schemas/Committer" }, "content": { "type": "string", "title": "Content" }, "from_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "From Path" }, "message": { "type": "string", "title": "Message" }, "new_branch": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "New Branch" }, "sha": { "type": "string", "title": "Sha" }, "signoff": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Signoff" } }, "type": "object", "required": [ "author", "comitter", "content", "message", "sha" ], "title": "UpdateFileRequest" }, "UpdateRepositoryRequest": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "private": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Private" }, "default_branch": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Default Branch" }, "website": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Website" }, "archived": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Archived" } }, "type": "object", "title": "UpdateRepositoryRequest" }, "UpdateUserRequest": { "properties": { "isOrganization": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Isorganization", "default": false }, "fullName": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Fullname" }, "profilePictureUrl": { "anyOf": [ { "type": "string", "maxLength": 2048 }, { "type": "null" } ], "title": "Profilepictureurl" }, "bio": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Bio" }, "githubUrl": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Githuburl" }, "linkedinUrl": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Linkedinurl" }, "xUrl": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Xurl" }, "websiteUrl": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Websiteurl" }, "updated": { "type": "string", "title": "Updated" } }, "type": "object", "title": "UpdateUserRequest", "description": "Request schema for updating user information." }, "UpsertEnvVarsRequest": { "properties": { "variables": { "items": { "$ref": "#/components/schemas/EnvVarItem" }, "type": "array", "title": "Variables" } }, "type": "object", "required": [ "variables" ], "title": "UpsertEnvVarsRequest" }, "ValidateInviteCodeRequest": { "properties": { "code": { "type": "string", "title": "Code" } }, "type": "object", "required": [ "code" ], "title": "ValidateInviteCodeRequest" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" }, "input": { "title": "Input" }, "ctx": { "type": "object", "title": "Context" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "WaitlistRequest": { "properties": { "name": { "type": "string", "title": "Name" }, "email": { "type": "string", "format": "email", "title": "Email" }, "company": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Company" } }, "type": "object", "required": [ "name", "email" ], "title": "WaitlistRequest" }, "src__api__v1__arbiters__schemas__PredictExampleRequest": { "properties": { "input": { "additionalProperties": true, "type": "object", "title": "Input" }, "alt_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Alt Id" }, "arbiters": { "items": { "$ref": "#/components/schemas/ArbiterRequest" }, "type": "array", "title": "Arbiters" } }, "type": "object", "required": [ "input", "arbiters" ], "title": "PredictExampleRequest" }, "src__api__v2__arbiters__schemas__PredictExampleRequest": { "properties": { "input": { "additionalProperties": true, "type": "object", "title": "Input" }, "alt_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Alt Id" }, "arbiter_repo": { "type": "string", "title": "Arbiter Repo" }, "arbiter_revision": { "type": "string", "title": "Arbiter Revision", "default": "main" }, "ground_truth": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Ground Truth" }, "ground_reasoning": { "type": "string", "title": "Ground Reasoning", "default": "" }, "compute_confidence": { "type": "boolean", "title": "Compute Confidence", "default": false } }, "type": "object", "required": [ "input", "arbiter_repo" ], "title": "PredictExampleRequest", "description": "v2 single-arbiter, single-example prediction request.\n\nDiffers from v1 ``PredictExampleRequest`` (which takes a list of arbiters)\nby accepting exactly one arbiter and putting ground-truth on the example\nrather than on the arbiter entry." } } } }