Integrate Agent700 Agent’s Into Any Workflow with our REST API

Agent700’s comprehensive REST API allows you to programmatically create, customize, and interact with AI agents directly from your applications, script or anything else you can dream up. Access all the power of the platform with intuitive API calls and seamless authentication.

Authentication

All Agent700 API requests (except the login endpoint) require authentication using a Bearer token. You must include this token in the Authorization header of your requests.

Obtaining an Access Token

const response = await fetch('https://agent700.ai/api/auth/login', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ email, password })
});

if (!response.ok) {
    throw new Error(`Login failed with status ${response.status}`);
}

const data = await response.json();
const token = data.accessToken;

Once you have your token, include it in subsequent requests:

const headers = {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${token}`
};

API Endpoints

Create Agent

POST
/api/agents

Creates a new AI agent with specified parameters.

Request Body

{
    "id": "12345678-1234-1234-1234-123456789012",
    "name": "Agent Test",
    "masterPrompt": "",
    "introductoryText": "",
    "streamResponses": true,
    "temperature": 0.35,
    "model": "gpt-4o"
}

Response

Returns the created agent object with its ID and properties.

Update Agent

PUT
/api/agents/{id}

Updates an existing agent with new parameters.

Path Parameters

Parameter Description
id The unique identifier for the agent

Request Body

{
    "name": "This is another test agent.",
    "masterPrompt": "How are you?",
    "temperature": 0.0,
    "topP": null,
    "model": "gpt-4o"
}

Response

Returns the updated agent object.

List All Agents

GET
/api/agents

Retrieves a list of all agents accessible to the authenticated user.

Response

Returns an array of agent objects.

Get Agent by ID

GET
/api/agents/{id}

Retrieves a specific agent by its ID.

Path Parameters

Parameter Description
id The unique identifier for the agent

Response

Returns the agent object matching the provided ID.

Get Agent Revision

GET
/api/agents/{id}/revision/{revisionId}

Retrieves a specific revision of an agent.

Path Parameters

Parameter Description
id The unique identifier for the agent
revisionId The revision ID number

Response

Returns the agent revision object.

Get Agent Revision with Custom URL

GET
/api/agents/{id}/{customUrl}/revision/{revisionId}

Retrieves a specific revision of an agent using a custom URL segment.

Path Parameters

Parameter Description
id The unique identifier for the agent
customUrl Custom URL segment for the agent
revisionId The revision ID number

Response

Returns the agent revision object.

List Agent QA Sheets

GET
/api/agents/{id}/qa-sheets

Retrieves all QA sheets associated with a specific agent.

Path Parameters

Parameter Description
id The unique identifier for the agent

Response

Returns an array of QA sheet objects for the specified agent.

Create QA Sheet

POST
/api/agents/{id}/qa-sheets

Creates a new QA sheet for a specific agent.

Path Parameters

Parameter Description
id The unique identifier for the agent

Request Body

{
    "rows": [
        {
        "question": "What is the capital of France?",
        "answer": "The capital of France is Paris.",
        "notes": "Confirmed from a geography textbook.",
        "tags": ["geography", "capitals"],
        "approved": true
        },
        {
        "question": "What is the boiling point of water?",
        "answer": "The boiling point of water is 100 degrees Celsius at sea level.",
        "notes": "Basic science knowledge.",
        "tags": ["science", "physics"],
        "approved": true
        }
    ]
}

Response

Returns the created QA sheet object.

Get QA Sheet

GET
/api/agents/{agentId}/qa-sheets/{sheetId}

Retrieves a specific QA sheet for an agent.

Path Parameters

Parameter Description
agentId The unique identifier for the agent
sheetId The unique identifier for the QA sheet

Response

Returns the QA sheet object.

Update QA Sheet

PUT
/api/agents/{agentId}/qa-sheets/{sheetId}

Updates a specific QA sheet for an agent.

Path Parameters

Parameter Description
agentId The unique identifier for the agent
sheetId The unique identifier for the QA sheet

Request Body

{
    "rows": [
        {
        "question": "What is the capital of France?",
        "answer": "The capital of France is F.",
        "notes": "Confirmed from a geography textbook.",
        "tags": ["geography", "capitals"],
        "approved": true
        },
        {
        "question": "What is the boiling point of water?",
        "answer": "Water can boil anywhere. Not just at a specific point.",
        "notes": "Basic science knowledge.",
        "tags": ["science", "physics"],
        "approved": true
        }
    ]
}

Response

Returns the updated QA sheet object.

List All Alignment Data

GET
/api/alignment-data

Retrieves all alignment data (data vault items).

Response

Returns an array of alignment data objects.

Get Alignment Data by Key

GET
/api/alignment-data/by-key/{key}

Retrieves specific alignment data by its key.

Path Parameters

Parameter Description
key The unique key for the alignment data

Response

Returns the alignment data object matching the provided key.

Create Alignment Data

POST
/api/alignment-data

Creates new alignment data.

Request Body

{
    "key": "test123",
    "value": "testdoc"
}

Response

Returns the created alignment data object.

Construct JSON from Alignment Data

GET
/api/alignment-data/construct-json

Constructs a JSON structure from all alignment data.

Response

Returns a JSON object constructed from alignment data.

Get Alignment Data by Pattern

GET
/api/alignment-data/by-pattern/{pattern}

Retrieves alignment data whose keys match a specific regex pattern.

Path Parameters

Parameter Description
pattern Regex pattern to match against keys

Response

Returns an array of alignment data objects matching the pattern.

Construct JSON from Pattern-Matched Alignment Data

GET
/api/alignment-data/by-pattern/{pattern}/construct-json

Constructs a JSON structure from alignment data whose keys match a pattern.

Path Parameters

Parameter Description
pattern Regex pattern to match against keys

Response

Returns a JSON object constructed from the matching alignment data.

Login

POST
/api/auth/login

Authenticates a user and returns an access token.

Request Body

{
  "email": "user@example.com",
  "password": "your-password"
}

Response

{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "user": {
    // User object details
  }
}

Reset Password

POST
/api/auth/reset_password

Resets a user’s password.

Request Body

{
  "email": "user@example.com",
  "new_password": "new-password"
}

Response

Returns a success message upon successful password reset.

Get User Billing Information

GET
/api/billing/user

Retrieves billing information for the authenticated user.

Query Parameters

Parameter Description
start_date Start date for billing period (YYYY-MM-DD)
end_date End date for billing period (YYYY-MM-DD)

Response

Returns billing information for the specified period.

Get Organization Billing Information

GET
/api/billing/organization

Retrieves billing information for the authenticated user’s organization.

Response

Returns organization billing information.

Chat Completion

POST
/api/chat

Generates a chat completion response from an AI model.

Request Body

{
    "model": "gpt-4o",
    "temperature": 1,
    "topP": 0.1,
    "agentId": "xy34968c-4f89-4f07-bcab-8e7bd90d672a",
    "messages": [
        {
            "role": "system",
            "content": "You are a helpful assistant."
        },
        {
            "role": "user",
            "content": "Hello, how are you today?"
        }
    ]
}

Response

Returns the AI model’s response to the chat conversation.

Chat Completion (Streaming)

POST
/api/chat

Generates a streaming chat completion response from an AI model.

Request Body

{
    "model": "gpt-4o",
    "streamResponses": true,
    "temperature": 1,
    "topP": 0.3,
    "agentId": "12345678-1234-1234-1234-123456789012",
    "messages": [
        {
            "role": "system",
            "content": "You are a helpful assistant."
        },
        {
            "content": "How can I help you today?",
            "type": "introductorytext",
            "role": "assistant"
        },
        {
            "role": "user",
            "content": "Tell me about AI."
        }
    ]
}

Response

Returns a stream of text chunks that form the AI model’s response.

Image Generation

POST
/api/chat

Generates an image using an AI model.

Request Body

{
    "model": "img-dall-e-3",
    "messages": [
        {
            "role": "system",
            "content": "All images should depict realistic scenes, ala 90's era thriller / horror films."
        },
        {
            "role": "user",
            "content": "A phone booth in a city street, late at night. Lightning flashes in the background."
        }
    ]
}

Response

Returns a link to the generated image.

Parse Document

POST
/api/helpers/parse-document

Parses a document file and extracts text content.

Request Body

Form data with a document file and optional OCR flag:

  • document: The file to parse
  • use_ocr: (Optional) Boolean flag to indicate whether to use OCR

Response

Returns the extracted text content from the document.

Create Rating

POST
/api/ratings

Creates a new rating for an agent conversation.

Request Body

{
    "agentId": "12345678-1234-1234-1234-123456789012",
    "agentRevisionId": 22,
    "messages": [
        {
            "role": "system",
            "content": "System instruction"
        },
        {
            "role": "user",
            "content": "User message"
        },
        {
            "role": "assistant",
            "content": "Assistant response"
        }
    ],
    "rating": 1.0
}

Response

Returns the created rating object.

Update Rating

PUT
/api/ratings/{id}

Updates an existing rating.

Path Parameters

Parameter Description
id The unique identifier for the rating

Request Body

{
    "agentId": "12345678-1234-1234-1234-123456789012",
    "agentRevisionId": 52,
    "messages": [
        // Conversation messages
    ],
    "rating": 0.0,
    "isTestSuite": false
}

Response

Returns the updated rating object.

Get Ratings for Agent

GET
/api/ratings/agent/{id}

Retrieves all ratings for a specific agent.

Path Parameters

Parameter Description
id The unique identifier for the agent

Response

Returns an array of rating objects for the specified agent.

Get Ratings for Agent Revision

GET
/api/ratings/agent/{id}/revision/{revisionId}

Retrieves all ratings for a specific agent revision.

Path Parameters

Parameter Description
id The unique identifier for the agent
revisionId The revision ID number

Response

Returns an array of rating objects for the specified agent revision.

Now in Beta!

Built in center of everything 🌎 Indianapolis, IN.