godo.AgentPlatform.ListAgentsByOpenAIAPIKey()
Generated on 5 Nov 2026
from godo version
v1.236.0
Usage
client.AgentPlatform.ListAgentsByOpenAIAPIKey(ctx context.Context, openaiApiKeyId string, opt *godo.ListOptions) ([]*godo.Agent, *godo.Response, error)Description
This method sends a GET request to /v2/gen-ai/openai/keys/{}/agents.
Parameters
openaiApiKeyIdstring requiredopt*godo.ListOptions
Fields of godo.ListOptions
ListOptions specifies the optional parameters to various List methods that
support pagination.
PageintFor paginated result sets, page of results to retrieve.
PerPageintFor paginated result sets, the number of results to include per page.
WithProjectsboolWhether App responses should include project_id fields. The field will be empty if false or if omitted. (ListApps)
DeployedboolThis parameter is used to only list agents that are deployed in the response.
PublicOnlyboolThis parameter is used to include models that are publicly available.
Usecases[]stringThis parameter is used to include models according to the use cases.
Returns
- []*godo.Agent
- *godo.Response
The HTTP response, with pagination
Links,Meta, andRatelimit information.- error
Non-nil when the request fails. API errors are returned as
*godo.ErrorResponse.
Fields of godo.Agent
Agent represents an Agent Platform Agent
AnthropicApiKey*godo.AnthropicApiKeyInfoApiKeyInfos[]*godo.ApiKeyInfoApiKeys[]*godo.ApiKeyChatBot*godo.ChatBotChatbotIdentifiers[]*godo.AgentChatbotIdentifierCreatedAt*godo.TimestampChildAgents[]*godo.AgentConversationLogsEnabledboolDeployment*godo.AgentDeploymentDescriptionstringFunctions[]*godo.AgentFunctionGuardrails[]*godo.AgentGuardrailIfCasestringInstructionstringKintKnowledgeBases[]*godo.KnowledgeBaseMaxTokensintModel*godo.ModelNamestringOpenAiApiKey*godo.OpenAiApiKeyParentAgents[]*godo.AgentProjectIdstringProvideCitationsboolRegionstringRetrievalMethodstringRouteCreatedAt*godo.TimestampRouteCreatedBystringRouteUuidstringRouteNamestringTags[]stringTemplate*godo.AgentTemplateTemperaturefloat64TopPfloat64UpdatedAt*godo.TimestampUrlstringUserIdstringUuidstringVersionHashstringVPCEgressIPs[]stringVPCUuidstringWorkspacegodo.Workspace
Request Sample
Pagination
This method returns one page of results. Response.Links carries the pagination state; loop until IsLastPage reports true.
More Information
See GET /v2/gen-ai/openai/keys/{}/agents in the API reference for additional detail on responses, headers, parameters, and more.
See the Go package documentation for the source of this method.