GET
/
v2
/
deployments
# Replace with your values
API_KEY="your_workspace_api_key"
PROMPT_ID="my_prompt_id"
DEPLOYMENT_ID="my_deployment_id"

BASE_URL="https://api.adaline.ai/v2/deployments"
URL="${BASE_URL}?promptId=${PROMPT_ID}&deploymentId=${DEPLOYMENT_ID}"

curl -X GET \
  "${URL}" \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json"
{
  "id": "deployment_id",
  "createdAt": 1704067200000,
  "updatedAt": 1704067200000,
  "createdByUserId": "user_id",
  "updatedByUserId": "user_id",
  "projectId": "project_id",
  "promptId": "prompt_id",
  "deploymentEnvironmentId": "env_id",
  "prompt": {
    "config": {
      "model": "gpt-4o-mini",
      "providerName": "openai",
      "providerId": "provider_id",
      "settings": {
        "temperature": 0.7,
        "maxTokens": 1000,
        "topP": 1,
        "frequencyPenalty": 0,
        "presencePenalty": 0
      }
    },
    "messages": [
      {
          "role": "system",
          "content": [
              {
                  "modality": "text",
                  "value": "You are a helpful assistant. You answer questions based on a reference image and user input."
              }
          ]
      },
      {
          "role": "user",
          "content": [
              {
                  "modality": "text",
                  "value": "This is the user input\n\n###\n{{user_input}}\n###"
              },
              {
                  "modality": "image",
                  "detail": "auto",
                  "value": {
                      "type": "url",
                      "url": "{{reference_image}}"
                  }
              }
          ]
      }
    ],
    "tools": [],
    "variables": [
      {
        "name": "user_input",
        "modality": "text"
      },
      {
        "name": "reference_image",
        "modality": "image"
      }
    ]
  }
}

Request

Authorization
string
required

Bearer Token Authentication

All API requests must include a valid workspace API key in the Authorization header using the Bearer token format.

Authorization: Bearer YOUR_WORKSPACE_API_KEY

You can create your workspace API key in Adaline by visiting Settings > API Keys.

Query Parameters

promptId
string
required

The unique identifier of the prompt.

deploymentId
string
required

The unique identifier of the deployment.

Find your promptId and deploymentId by navigating to the specific deployment in platform.

Response

id
string

The unique identifier of the deployment.

createdAt
number

Unix timestamp when the deployment was created.

updatedAt
number

Unix timestamp when the deployment was last updated.

createdByUserId
string

Unique identifier of the user who created the deployment.

updatedByUserId
string

Unique identifier of the user who last updated the deployment.

projectId
string

The unique identifier of the project.

promptId
string

The unique identifier of the prompt.

deploymentEnvironmentId
string

The unique identifier of the deployment environment.

prompt.config
ConfigType

The configuration and settings for the prompt, see ConfigType for more details.

prompt.messages
MessageType[]

The messages in the prompt, see MessageType for more details.

prompt.tools
ToolType[]

The tools in the prompt, see ToolType for more details.

prompt.variables
{ name: string; modality: 'text' | 'image' }[]

An array of variables with their modality (text or image) used in the prompt. Helpful in detecting and replacing variables in the prompt with end-user inputs, context, etc.

# Replace with your values
API_KEY="your_workspace_api_key"
PROMPT_ID="my_prompt_id"
DEPLOYMENT_ID="my_deployment_id"

BASE_URL="https://api.adaline.ai/v2/deployments"
URL="${BASE_URL}?promptId=${PROMPT_ID}&deploymentId=${DEPLOYMENT_ID}"

curl -X GET \
  "${URL}" \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json"
{
  "id": "deployment_id",
  "createdAt": 1704067200000,
  "updatedAt": 1704067200000,
  "createdByUserId": "user_id",
  "updatedByUserId": "user_id",
  "projectId": "project_id",
  "promptId": "prompt_id",
  "deploymentEnvironmentId": "env_id",
  "prompt": {
    "config": {
      "model": "gpt-4o-mini",
      "providerName": "openai",
      "providerId": "provider_id",
      "settings": {
        "temperature": 0.7,
        "maxTokens": 1000,
        "topP": 1,
        "frequencyPenalty": 0,
        "presencePenalty": 0
      }
    },
    "messages": [
      {
          "role": "system",
          "content": [
              {
                  "modality": "text",
                  "value": "You are a helpful assistant. You answer questions based on a reference image and user input."
              }
          ]
      },
      {
          "role": "user",
          "content": [
              {
                  "modality": "text",
                  "value": "This is the user input\n\n###\n{{user_input}}\n###"
              },
              {
                  "modality": "image",
                  "detail": "auto",
                  "value": {
                      "type": "url",
                      "url": "{{reference_image}}"
                  }
              }
          ]
      }
    ],
    "tools": [],
    "variables": [
      {
        "name": "user_input",
        "modality": "text"
      },
      {
        "name": "reference_image",
        "modality": "image"
      }
    ]
  }
}

Best Practices

  1. Cache Deployments: Cache deployment responses when possible to reduce API calls and improve performance.

  2. Environment Management: Use different deployment environments (production, staging, development) to manage your prompt lifecycle.

  3. Rate Limit Awareness: Monitor your usage to avoid hitting rate limits, especially on free plans.