CodeGPT Developer Hub

Welcome to the CodeGPT developer hub. You'll find comprehensive guides and documentation to help you start working with the CodeGPT API as quickly as possible, as well as support if you get stuck. Let's jump right in!

from judini import CodeGPTPlus
codegpt = CodeGPTPlus(api_key=CODEGPT_API_KEY, org_id=ORG_ID)

AGENT_ID = "0000000-0000-0000-0000-000000000000"
messages = [{"role": "user", "content": "What is the meaning of life?"}]

# No streaming
chat = codegpt.chat_completion(agent_id=AGENT_ID,
                               messages=messages)
print(chat)

# Streaming
for chunk in codegpt.chat_completion(agent_id=AGENT_ID,
                                  messages=messages,
                                  stream=True):
    print(chunk, end="")
import { CodeGPTPlus } from 'judini'

async function main () {
    // Replace with your own API Key
    const codegpt = new CodeGPTPlus({ apiKey: 'YOUR_API_KEY' }) // optional orgId

    // Define the message
    const msg = [{ role: 'user', content: 'What is the capital of Australia?' }]

    // Send the message and process the response
    const res = await codegpt.chatCompletion({
        messages: msg,
        agentId: 'YOUR_AGENT_ID'
    }, (chunk) => {
        console.log(chunk) // show the streaming response
    })
    console.log({ res }) // show the final response

    codegpt.getAgents().then((res) => { // get all agents
        console.log(res)
    })

    codegpt.getAgent('YOUR_AGENT_ID').then((res) => { // get a specific agent
        console.log(res)
    })
}

main()
curl --request POST \
     --url 
https://api.codegpt.co/api/v1/chat/completions \
     --header 'accept: application/json' \
     --header 'content-type: application/json'

Introduction

Discover the future of coding with the CodeGPT API! This tool is your gateway to integrating the custom agents you’ve meticulously crafted in the CodeGPT Playground into any application. Designed with the innovative developers in mind, those who are already harnessing the power of CodeGPT within VSCode, our API opens a world of endless possibilities.

With our REST API and its interactive endpoints, you can easily communicate with your agents, making them an integral part of your application. Plus, with our robust SDKs in Python and JavaScript, you can effortlessly implement the API, regardless of your preferred programming language.

Take your apps to the next level, create a unique and engaging user experience, and stand out in the ever-evolving tech landscape. Embrace the future of coding with the CodeGPT API today!

Playground

The CodeGPT Playground is an interactive platform where you can create and interact with AI Agents.

It allows you to input prompts and see the responses generated by the AI in real-time.

It's an excellent tool for understanding how the AI Agents function, and for testing different prompts and parameters in a user-friendly environment.

Visit the Playground

VSCode Extension

The CodeGPT VSCode Extension is a tool that brings the power of AI Agents into the Visual Studio Code environment.

It allows developers to interact with these AI Agents directly within their coding workspace.

These AI Agents can assist with tasks such as code completion, debugging, and learning new languages or frameworks, effectively enhancing the programming experience.

Download Extension

API

API is a service that allows developers to interact programmatically with the AI Agents created in the Playground.

It provides endpoints for generating responses from these AI Agents based on user input, enabling the integration of these AI-driven conversational capabilities into applications, services, or processes.

It's a powerful tool for leveraging the intelligence of AI Agents in various contexts.

Try the Endpoints