|
| 1 | +--- |
| 2 | +id: general-purpose-ai-interactions |
| 3 | +title: "General-purpose AI interactions" |
| 4 | +description: "This is a general-purpose endpoint that is not tied to any specific agent. Its purpose is to allow you to send requests directly to Port AI, enabling interactions and executions without being bound to a predefined agent context." |
| 5 | +sidebar_label: "General-purpose AI interactions" |
| 6 | +hide_title: true |
| 7 | +hide_table_of_contents: true |
| 8 | +api: eJztV99v4zYM/lcE7WEbECfprX0pMAzZDwzBNlzR67CHIhhkm4l1dSxPktPmgvzv91GyY6dJsD7sbQccerZFiuRH8iOzk16tnLx9lLO5XIxkTi6zuvbaVPJWPhTaCfxTYkUVWVUmdWNr40hQlddGV174QnkWqQyeNeXCG6GqrXA1ZXqpM6Gg6sdi7p3olCHOUmVpnsXWNPzicKGw9E9DDoK5tpT5cssnd8Z6MZuPYFKlpa5WAmbhS8Y+wjXo0QtlTXx91r4wjRcpsWRqmip6JGpLOS11BQ+DRyIzuObFj+VIOqhb7beAYSdTUpYsHhd74NG69KPJcbqTQany/KjqutSZYrOTj47h2kmXFbRW/OS3NQFAk35EIDBRW1OTBUCOTxtH9s6ade0Hss5b+CxPc0CC5b92Yk3OwXlhrIBXNsCTEkIzGU4QWbrt4BrL/UiWKqXSnXPn2MT78KBKGPAqyZVXQqWMoodtXW1MDJOhUnmuo/DdUUTHMez3IeKNzhnJt0Q4m4tOgaNCwGKJMH0owN4DMV+GSmuri/JR8BGZVU3p+yuedVkyNLgnZ7epatZc5HC5Uprj+NRYSvrXyheIR2d4TikHoE+cNGApF4hlbXIqzwXS3buqfXKD96xUTU4JyqEin1wn76bvbqY3V9fhFrd1ntZvzfsMPeGFWSJ8SDRtuYd2WzUIkksfsKEsUirURgMtFXrI1RDEMYoh4hF6Bl1lTUkjgaTBPTUK0pxC1SbfNiVfGrOe0kpXFWvCAxga9Nw4uBoAh5tcZ4f++wM4vS3fBxXB2La5Pio28VdB+BTKQTXerPE5A2dsW10CPuUyQWdsdEai5YNhsmedFr7NasYCUd6jocEueSS7LorTY4TljTnqHmWt2p5E87t2IU33tKIXgTvAF+wzLGcFuEZx/kJw4T5RKbTxWDwYUYJpOH5Lg3ZTG6XRt2UrPkJClxEEPn3MTdaswUABo8U3hfe1u51M8NmNuVzH2kyUTkK6lgq0MOGvidITs2Gk6PmHA/QJQ+++X6uqUeVXB8NJMPwtI6lRr2fbex+ZMSAFpAd81sG2uMQVS1U6enUD6puYMpQFOPDcBSY+YdPOPBxj5AMHwiAjite+dv5Ge1Se+cHKoZlg+rTPmkrjKtErnStHGadB21zs1PV0yv8d3/Zzy0T3rSRzwn8zM8zTQCYFxqSq0HzWmjMky6wVx8XZsxxMr8/PhgsUf5J0wxQZrf9rsqF6Pf3uC1xvh+vmS3W9Ha7gDhY/aGJouxCe8gXeJpsr8OGEG/mJwqpnNx2/NBYzXXYUqmrdMShCOHfauF5g0W+NHxjiiGK3O/Yjo9a/0YCjMJIKY/WnkCTZ8lhBivckjoLTdt+vnL+8qHVd0uuVsR+shw3vaOHq15x2cTnsJ8criJQns/vMJDwMwsfO7iIw8NKEQLVnB2XcO+/mEGeAY71ejadcDpwSTBkWb3H49dXPCax/w63+9ZAdLN7/l98kbQHx66QusUQwkKEmd21tP8rNFTeUDnUU6htVWXD542y3S5WjP2253/PnOCu56nPteMpfGIdDpN86GS84+4TCvzyVw6IU9scFv1jNToVfXaOuIdjbeMlP0afkge30uieEx30bNWZZRmEbuSy7GJDG3fsPD7z6tz/z1rEXrHrm/QF/Q6uYOhYnBMK3HdqvWjWBBGW8k3sYy2pxTAFPgQLaB46qO6q2Aw9fc0MMhP9yWGdVdrtIMMhxJx+PLmq00PbZAQ7w+jNq/57X |
| 9 | +sidebar_class_name: "post api-method" |
| 10 | +info_path: api-reference/port-api |
| 11 | +custom_edit_url: null |
| 12 | +--- |
| 13 | + |
| 14 | +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; |
| 15 | +import ParamsDetails from "@theme/ParamsDetails"; |
| 16 | +import RequestSchema from "@theme/RequestSchema"; |
| 17 | +import StatusCodes from "@theme/StatusCodes"; |
| 18 | +import OperationTabs from "@theme/OperationTabs"; |
| 19 | +import TabItem from "@theme/TabItem"; |
| 20 | +import Heading from "@theme/Heading"; |
| 21 | + |
| 22 | +<Heading |
| 23 | + as={"h1"} |
| 24 | + className={"openapi__heading"} |
| 25 | + children={"General-purpose AI interactions"} |
| 26 | +> |
| 27 | +</Heading> |
| 28 | + |
| 29 | +<MethodEndpoint |
| 30 | + method={"post"} |
| 31 | + path={"/v1/ai/invoke"} |
| 32 | + context={"endpoint"} |
| 33 | +> |
| 34 | + |
| 35 | +</MethodEndpoint> |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | +This is a general-purpose endpoint that is not tied to any specific agent. Its purpose is to allow you to send requests directly to Port AI, enabling interactions and executions without being bound to a predefined agent context. |
| 40 | + |
| 41 | +<Heading |
| 42 | + id={"request"} |
| 43 | + as={"h2"} |
| 44 | + className={"openapi-tabs__heading"} |
| 45 | + children={"Request"} |
| 46 | +> |
| 47 | +</Heading> |
| 48 | + |
| 49 | +<ParamsDetails |
| 50 | + parameters={[{"schema":{"type":"string"},"in":"query","name":"invocation_identifier","required":false,"description":"A unique identifier for the invocation."}]} |
| 51 | +> |
| 52 | + |
| 53 | +</ParamsDetails> |
| 54 | + |
| 55 | +<RequestSchema |
| 56 | + title={"Body"} |
| 57 | + body={{"content":{"application/json":{"schema":{"type":"object","properties":{"userPrompt":{"type":"string","description":"The user's message or query to be processed by Port AI."},"labels":{"type":"object","description":"Optional meta-data about the invocation.","additionalProperties":{"type":"string"}},"provider":{"type":"string","description":"The AI provider to use for this invocation. If not specified, the default provider will be used.","enum":["openai","azure-openai","anthropic","bedrock","port"]},"model":{"type":"string","enum":["gpt-5","claude-sonnet-4-20250514"]},"systemPrompt":{"type":"string","description":"A set of instructions that guides an AI's behavior and responses by providing its role, persona, and operational rules at the beginning of an interaction.","default":""},"executionMode":{"type":"string","description":"The execution mode for the invocation. Whether to automatically execute self-service actions.","enum":["Automatic","Approval Required"],"default":"Approval Required"},"tools":{"type":"array","description":"List of Regex values to match against the tools names. To learn more about the available tools, refer to the [documentation](https://docs.port.io/ai-interfaces/port-ai/overview?execution-modes=manual#available-tools).","items":{"type":"string"}}},"required":["userPrompt","tools"],"additionalProperties":false}}},"required":true}} |
| 58 | +> |
| 59 | + |
| 60 | +</RequestSchema> |
| 61 | + |
| 62 | +<StatusCodes |
| 63 | + id={undefined} |
| 64 | + label={undefined} |
| 65 | + responses={{"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["ok","error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["ok","error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["ok","error"],"additionalProperties":false}}}}}} |
| 66 | +> |
| 67 | + |
| 68 | +</StatusCodes> |
| 69 | + |
| 70 | + |
| 71 | + |
0 commit comments