GET
/
v2
/
deployments
curl -X GET \
  "https://api.adaline.ai/v2/deployments?promptId=prompt_123&deploymentId=deploy_456" \
  -H "Authorization: Bearer your_workspace_api_key" \
  -H "Content-Type: application/json"

{
  "id": "deploy_456",
  "createdAt": 1704067200000,
  "updatedAt": 1704067200000,
  "createdByUserId": "user_789",
  "updatedByUserId": "user_789",
  "projectId": "project_abc",
  "promptId": "prompt_123",
  "deploymentEnvironmentId": "env_123",
  "prompt": {
    "config": {
      "model": "gpt-4o-mini",
      "providerName": "openai",
      "providerId": "6e94350a-95a9-48e7-8eab-a9f35ec2dc9d",
      "settings": {
        "temperature": 0.7,
        "maxTokens": 1000,
        "topP": 1,
        "frequencyPenalty": 0,
        "presencePenalty": 0
      }
    },
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful assistant."
      },
      {
        "role": "user",
        "content": "{{user_input}}"
      }
    ],
    "tools": [],
    "variables": [
      {
        "name": "user_input",
        "description": "The user's input",
        "content": {
          "modality": "text",
          "value": "Who wrote the book 'The Great Gatsby'?"
        }
      }
    ]
  }
}
header
string

All requests require a valid workspace API key passed in the Authorization header:

Authorization: Bearer YOUR_WORKSPACE_API_KEY

Parameters

promptId
string
required

The unique identifier of the prompt.

deploymentId
string
required

The unique identifier of the deployment.

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

ID of the user who created the deployment.

updatedByUserId
string

ID 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
PromptType

The prompt, see PromptType for more details.

curl -X GET \
  "https://api.adaline.ai/v2/deployments?promptId=prompt_123&deploymentId=deploy_456" \
  -H "Authorization: Bearer your_workspace_api_key" \
  -H "Content-Type: application/json"

{
  "id": "deploy_456",
  "createdAt": 1704067200000,
  "updatedAt": 1704067200000,
  "createdByUserId": "user_789",
  "updatedByUserId": "user_789",
  "projectId": "project_abc",
  "promptId": "prompt_123",
  "deploymentEnvironmentId": "env_123",
  "prompt": {
    "config": {
      "model": "gpt-4o-mini",
      "providerName": "openai",
      "providerId": "6e94350a-95a9-48e7-8eab-a9f35ec2dc9d",
      "settings": {
        "temperature": 0.7,
        "maxTokens": 1000,
        "topP": 1,
        "frequencyPenalty": 0,
        "presencePenalty": 0
      }
    },
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful assistant."
      },
      {
        "role": "user",
        "content": "{{user_input}}"
      }
    ],
    "tools": [],
    "variables": [
      {
        "name": "user_input",
        "description": "The user's input",
        "content": {
          "modality": "text",
          "value": "Who wrote the book 'The Great Gatsby'?"
        }
      }
    ]
  }
}

Best Practices

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

  2. Error Handling: Always implement proper error handling for all possible HTTP status codes.

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

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