Back to Continue

openapi_client.DefaultApi

packages/continue-sdk/python/api/docs/DefaultApi.md

1.5.4524.5 KB
Original Source

openapi_client.DefaultApi

All URIs are relative to https://api.continue.dev

MethodHTTP requestDescription
get_assistantGET /ide/get-assistant/{ownerSlug}/{packageSlug}Get a specific agent by slug
get_free_trial_statusGET /ide/free-trial-statusGet free trial status for user
get_models_add_on_checkout_urlGET /ide/get-models-add-on-checkout-urlGet Stripe checkout URL for models add-on
get_policyGET /ide/policyGet organization policy
list_assistant_full_slugsGET /ide/list-assistant-full-slugsList agent full slugs (currently returns 429)
list_assistantsGET /ide/list-assistantsList agents for IDE
list_organizationsGET /ide/list-organizationsList organizations for user
sync_secretsPOST /ide/sync-secretsSynchronize secrets for user

get_assistant

GetAssistant200Response get_assistant(owner_slug, package_slug, always_use_proxy=always_use_proxy, organization_id=organization_id)

Get a specific agent by slug

Returns a single agent configuration by its owner and package slug. This endpoint is useful when you need to retrieve or refresh a specific agent without fetching the entire list.

Example

  • Bearer Authentication (apiKeyAuth):
python
import openapi_client
from openapi_client.models.get_assistant200_response import GetAssistant200Response
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.continue.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "https://api.continue.dev"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: apiKeyAuth
configuration = openapi_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.DefaultApi(api_client)
    owner_slug = 'owner_slug_example' # str | Slug of the user or organization that owns the agent
    package_slug = 'package_slug_example' # str | Slug of the agent package
    always_use_proxy = 'always_use_proxy_example' # str | Whether to always use the Continue-managed proxy for model requests (optional)
    organization_id = 'organization_id_example' # str | ID of the organization to scope agents to. If not provided, personal agents are returned. (optional)

    try:
        # Get a specific agent by slug
        api_response = api_instance.get_assistant(owner_slug, package_slug, always_use_proxy=always_use_proxy, organization_id=organization_id)
        print("The response of DefaultApi->get_assistant:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_assistant: %s\n" % e)

Parameters

NameTypeDescriptionNotes
owner_slugstrSlug of the user or organization that owns the agent
package_slugstrSlug of the agent package
always_use_proxystrWhether to always use the Continue-managed proxy for model requests[optional]
organization_idstrID of the organization to scope agents to. If not provided, personal agents are returned.[optional]

Return type

GetAssistant200Response

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successfully retrieved agent-
401Unauthorized - Authentication failed-
403Forbidden - Assistant not allowed in organization-
404User or agent not found-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_free_trial_status

GetFreeTrialStatus200Response get_free_trial_status()

Get free trial status for user

Returns the current free trial status for the authenticated user, including usage counts and limits for chat and autocomplete features.

Example

  • Bearer Authentication (apiKeyAuth):
python
import openapi_client
from openapi_client.models.get_free_trial_status200_response import GetFreeTrialStatus200Response
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.continue.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "https://api.continue.dev"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: apiKeyAuth
configuration = openapi_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.DefaultApi(api_client)

    try:
        # Get free trial status for user
        api_response = api_instance.get_free_trial_status()
        print("The response of DefaultApi->get_free_trial_status:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_free_trial_status: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

GetFreeTrialStatus200Response

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successfully retrieved free trial status-
404User not found-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_models_add_on_checkout_url

GetModelsAddOnCheckoutUrl200Response get_models_add_on_checkout_url(profile_id=profile_id, vscode_uri_scheme=vscode_uri_scheme)

Get Stripe checkout URL for models add-on

Creates a Stripe checkout session for the models add-on subscription and returns the checkout URL.

Example

  • Bearer Authentication (apiKeyAuth):
python
import openapi_client
from openapi_client.models.get_models_add_on_checkout_url200_response import GetModelsAddOnCheckoutUrl200Response
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.continue.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "https://api.continue.dev"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: apiKeyAuth
configuration = openapi_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.DefaultApi(api_client)
    profile_id = 'profile_id_example' # str | Profile ID to include in the callback URL (optional)
    vscode_uri_scheme = 'vscode_uri_scheme_example' # str | VS Code URI scheme to include in the callback URL (optional)

    try:
        # Get Stripe checkout URL for models add-on
        api_response = api_instance.get_models_add_on_checkout_url(profile_id=profile_id, vscode_uri_scheme=vscode_uri_scheme)
        print("The response of DefaultApi->get_models_add_on_checkout_url:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_models_add_on_checkout_url: %s\n" % e)

Parameters

NameTypeDescriptionNotes
profile_idstrProfile ID to include in the callback URL[optional]
vscode_uri_schemestrVS Code URI scheme to include in the callback URL[optional]

Return type

GetModelsAddOnCheckoutUrl200Response

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successfully created checkout session-
404User not found-
500Failed to create checkout session-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_policy

GetPolicy200Response get_policy()

Get organization policy

Returns the policy configuration for the first organization that the user belongs to which has a policy configured.

Example

  • Bearer Authentication (apiKeyAuth):
python
import openapi_client
from openapi_client.models.get_policy200_response import GetPolicy200Response
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.continue.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "https://api.continue.dev"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: apiKeyAuth
configuration = openapi_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.DefaultApi(api_client)

    try:
        # Get organization policy
        api_response = api_instance.get_policy()
        print("The response of DefaultApi->get_policy:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_policy: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

GetPolicy200Response

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successfully retrieved policy-
404User not found-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_assistant_full_slugs

list_assistant_full_slugs()

List agent full slugs (currently returns 429)

This endpoint is temporarily disabled and returns a 429 status code to prevent constant refreshes of the full agent list until a fixed client version can be deployed.

Example

  • Bearer Authentication (apiKeyAuth):
python
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.continue.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "https://api.continue.dev"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: apiKeyAuth
configuration = openapi_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.DefaultApi(api_client)

    try:
        # List agent full slugs (currently returns 429)
        api_instance.list_assistant_full_slugs()
    except Exception as e:
        print("Exception when calling DefaultApi->list_assistant_full_slugs: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
429Too many requests - endpoint temporarily disabled-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_assistants

List[ListAssistants200ResponseInner] list_assistants(always_use_proxy=always_use_proxy, organization_id=organization_id)

List agents for IDE

Returns a complete list of agents available to the user, with their full configurations, icons, and other metadata needed by the IDE to display and use them.

This endpoint performs a full refresh of the list of agents, including unrolling configurations and resolving secrets.

Example

  • Bearer Authentication (apiKeyAuth):
python
import openapi_client
from openapi_client.models.list_assistants200_response_inner import ListAssistants200ResponseInner
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.continue.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "https://api.continue.dev"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: apiKeyAuth
configuration = openapi_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.DefaultApi(api_client)
    always_use_proxy = 'always_use_proxy_example' # str | Whether to always use the Continue-managed proxy for model requests (optional)
    organization_id = 'organization_id_example' # str | ID of the organization to scope agents to. If not provided, personal agents are returned. (optional)

    try:
        # List agents for IDE
        api_response = api_instance.list_assistants(always_use_proxy=always_use_proxy, organization_id=organization_id)
        print("The response of DefaultApi->list_assistants:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->list_assistants: %s\n" % e)

Parameters

NameTypeDescriptionNotes
always_use_proxystrWhether to always use the Continue-managed proxy for model requests[optional]
organization_idstrID of the organization to scope agents to. If not provided, personal agents are returned.[optional]

Return type

List[ListAssistants200ResponseInner]

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successfully retrieved agents-
401Unauthorized - Authentication failed-
404User not found-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_organizations

ListOrganizations200Response list_organizations()

List organizations for user

Returns a list of organizations that the authenticated user belongs to, including organization metadata and pre-signed icon URLs.

Example

  • Bearer Authentication (apiKeyAuth):
python
import openapi_client
from openapi_client.models.list_organizations200_response import ListOrganizations200Response
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.continue.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "https://api.continue.dev"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: apiKeyAuth
configuration = openapi_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.DefaultApi(api_client)

    try:
        # List organizations for user
        api_response = api_instance.list_organizations()
        print("The response of DefaultApi->list_organizations:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->list_organizations: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

ListOrganizations200Response

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successfully retrieved organizations-
404User not found-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

sync_secrets

List[Optional[object]] sync_secrets(sync_secrets_request)

Synchronize secrets for user

Resolves and synchronizes secrets for the authenticated user based on the provided Fully Qualified Secret Names (FQSNs).

Example

  • Bearer Authentication (apiKeyAuth):
python
import openapi_client
from openapi_client.models.sync_secrets_request import SyncSecretsRequest
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.continue.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "https://api.continue.dev"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: apiKeyAuth
configuration = openapi_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.DefaultApi(api_client)
    sync_secrets_request = openapi_client.SyncSecretsRequest() # SyncSecretsRequest |

    try:
        # Synchronize secrets for user
        api_response = api_instance.sync_secrets(sync_secrets_request)
        print("The response of DefaultApi->sync_secrets:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->sync_secrets: %s\n" % e)

Parameters

NameTypeDescriptionNotes
sync_secrets_requestSyncSecretsRequest

Return type

List[Optional[object]]

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successfully resolved secrets-
404User not found-

[Back to top] [Back to API list] [Back to Model list] [Back to README]